Logging cleanup: BTIF and APPL.
Change-Id: I5b1214642bbb4b9aecc0fd2c899a6ec2c9793286
diff --git a/bta/ag/bta_ag_act.c b/bta/ag/bta_ag_act.c
index cedbb3d..18185d8 100644
--- a/bta/ag/bta_ag_act.c
+++ b/bta/ag/bta_ag_act.c
@@ -244,7 +244,7 @@
{
UINT16 event = BTA_AG_DISC_FAIL_EVT;
- APPL_TRACE_DEBUG1 ("bta_ag_disc_int_res: Status: %d", p_data->disc_result.status);
+ APPL_TRACE_DEBUG ("bta_ag_disc_int_res: Status: %d", p_data->disc_result.status);
/* if found service */
if (p_data->disc_result.status == SDP_SUCCESS ||
@@ -556,13 +556,13 @@
/* set role */
p_scb->role = BTA_AG_ACP;
- APPL_TRACE_DEBUG2 ("bta_ag_rfc_acp_open: serv_handle0 = %d serv_handle1 = %d",
+ APPL_TRACE_DEBUG ("bta_ag_rfc_acp_open: serv_handle0 = %d serv_handle1 = %d",
p_scb->serv_handle[0], p_scb->serv_handle[1]);
/* get bd addr of peer */
if (PORT_SUCCESS != (status=PORT_CheckConnection(p_data->rfc.port_handle, dev_addr, &lcid)))
{
- APPL_TRACE_DEBUG1 ("bta_ag_rfc_acp_open error PORT_CheckConnection returned status %d", status);
+ APPL_TRACE_DEBUG ("bta_ag_rfc_acp_open error PORT_CheckConnection returned status %d", status);
}
/* Collision Handling */
@@ -602,7 +602,7 @@
/* determine connected service from port handle */
for (i = 0; i < BTA_AG_NUM_IDX; i++)
{
- APPL_TRACE_DEBUG3 ("bta_ag_rfc_acp_open: i = %d serv_handle = %d port_handle = %d",
+ APPL_TRACE_DEBUG ("bta_ag_rfc_acp_open: i = %d serv_handle = %d port_handle = %d",
i, p_scb->serv_handle[i], p_data->rfc.port_handle);
if (p_scb->serv_handle[i] == p_data->rfc.port_handle)
@@ -613,7 +613,7 @@
}
}
- APPL_TRACE_DEBUG2 ("bta_ag_rfc_acp_open: conn_service = %d conn_handle = %d",
+ APPL_TRACE_DEBUG ("bta_ag_rfc_acp_open: conn_service = %d conn_handle = %d",
p_scb->conn_service, p_scb->conn_handle);
/* close any unopened server */
@@ -867,7 +867,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG1("bta_ag_rcvd_slc_ready: handle = %d", bta_ag_scb_to_idx(p_scb));
+ APPL_TRACE_DEBUG("bta_ag_rcvd_slc_ready: handle = %d", bta_ag_scb_to_idx(p_scb));
if (bta_ag_cb.parse_mode == BTA_AG_PASS_THROUGH)
{
diff --git a/bta/ag/bta_ag_api.c b/bta/ag/bta_ag_api.c
index c80ba8f..5bfa492 100644
--- a/bta/ag/bta_ag_api.c
+++ b/bta/ag/bta_ag_api.c
@@ -65,7 +65,7 @@
{
if (bta_ag_cb.scb[idx].in_use)
{
- APPL_TRACE_ERROR0 ("BTA_AgEnable: FAILED, AG already enabled.");
+ APPL_TRACE_ERROR ("BTA_AgEnable: FAILED, AG already enabled.");
return BTA_FAILURE;
}
}
diff --git a/bta/ag/bta_ag_ci.c b/bta/ag/bta_ag_ci.c
index fd39e34..c9f0a10 100644
--- a/bta/ag/bta_ag_ci.c
+++ b/bta/ag/bta_ag_ci.c
@@ -65,7 +65,7 @@
bta_sys_sendmsg(p_buf);
} else {
- APPL_TRACE_ERROR1("ERROR: Unable to allocate buffer to hold AT response code. len=%i", len);
+ APPL_TRACE_ERROR("ERROR: Unable to allocate buffer to hold AT response code. len=%i", len);
break;
}
diff --git a/bta/ag/bta_ag_cmd.c b/bta/ag/bta_ag_cmd.c
index 577ebdf..285c70a 100644
--- a/bta/ag/bta_ag_cmd.c
+++ b/bta/ag/bta_ag_cmd.c
@@ -356,7 +356,7 @@
if(*(p+COLON_IDX_4_VGSVGM) == ':')
{
#if defined(BTA_AG_RESULT_DEBUG) && (BTA_AG_RESULT_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("[HSP] ':'symbol is changed as '=' for HSP compatibility");
+ APPL_TRACE_DEBUG("[HSP] ':'symbol is changed as '=' for HSP compatibility");
#endif
*(p+COLON_IDX_4_VGSVGM) = '=';
}
@@ -382,7 +382,7 @@
*p++ = '\n';
#if defined(BTA_AG_RESULT_DEBUG) && (BTA_AG_RESULT_DEBUG == TRUE)
- APPL_TRACE_DEBUG1("bta_ag_send_result: %s", buf);
+ APPL_TRACE_DEBUG("bta_ag_send_result: %s", buf);
#endif
/* send to RFCOMM */
@@ -409,7 +409,7 @@
if((!m_res_cb) || (m_res_cb->num_result == 0) || (m_res_cb->num_result > BTA_AG_AT_MULTI_LEN))
{
- APPL_TRACE_DEBUG0("m_res_cb is NULL or num_result is out of range.");
+ APPL_TRACE_DEBUG("m_res_cb is NULL or num_result is out of range.");
return;
}
@@ -446,7 +446,7 @@
}
#if defined(BTA_AG_RESULT_DEBUG) && (BTA_AG_RESULT_DEBUG == TRUE)
- APPL_TRACE_DEBUG1("send_result: %s", buf);
+ APPL_TRACE_DEBUG("send_result: %s", buf);
#endif
/* send to RFCOMM */
@@ -684,7 +684,7 @@
case UUID_CODEC_CVSD: retval |= BTA_AG_CODEC_CVSD; break;
case UUID_CODEC_MSBC: retval |= BTA_AG_CODEC_MSBC; break;
default:
- APPL_TRACE_ERROR1("Unknown Codec UUID(%d) received", uuid_codec);
+ APPL_TRACE_ERROR("Unknown Codec UUID(%d) received", uuid_codec);
return BTA_AG_CODEC_NONE;
}
@@ -826,7 +826,7 @@
{
tBTA_AG_VAL val;
- APPL_TRACE_DEBUG4("AT cmd:%d arg_type:%d arg:%d arg:%s", cmd, arg_type,
+ APPL_TRACE_DEBUG("AT cmd:%d arg_type:%d arg:%d arg:%s", cmd, arg_type,
int_arg, p_arg);
/* send OK */
@@ -864,7 +864,7 @@
tBTA_AG_PEER_CODEC codec_type, codec_sent;
#endif
- APPL_TRACE_DEBUG4("HFP AT cmd:%d arg_type:%d arg:%d arg:%s", cmd, arg_type,
+ APPL_TRACE_DEBUG("HFP AT cmd:%d arg_type:%d arg:%d arg:%s", cmd, arg_type,
int_arg, p_arg);
val.hdr.handle = bta_ag_scb_to_idx(p_scb);
@@ -1196,12 +1196,12 @@
if (p_scb->peer_codecs & BTA_AG_CODEC_MSBC)
{
p_scb->sco_codec = UUID_CODEC_MSBC;
- APPL_TRACE_DEBUG0("Received AT+BAC, updating sco codec to MSBC");
+ APPL_TRACE_DEBUG("Received AT+BAC, updating sco codec to MSBC");
}
else
{
p_scb->sco_codec = UUID_CODEC_CVSD;
- APPL_TRACE_DEBUG0("Received AT+BAC, updating sco codec to CVSD");
+ APPL_TRACE_DEBUG("Received AT+BAC, updating sco codec to CVSD");
}
/* Received BAC while in codec negotiation. */
@@ -1213,7 +1213,7 @@
else
{
p_scb->peer_codecs = BTA_AG_CODEC_NONE;
- APPL_TRACE_ERROR0("Unexpected CMD:AT+BAC, Codec Negotiation is not supported");
+ APPL_TRACE_ERROR("Unexpected CMD:AT+BAC, Codec Negotiation is not supported");
}
break;
@@ -1226,7 +1226,7 @@
case UUID_CODEC_CVSD: codec_type = BTA_AG_CODEC_CVSD; break;
case UUID_CODEC_MSBC: codec_type = BTA_AG_CODEC_MSBC; break;
default:
- APPL_TRACE_ERROR1("Unknown codec_uuid %d", int_arg);
+ APPL_TRACE_ERROR("Unknown codec_uuid %d", int_arg);
codec_type = 0xFFFF;
break;
}
@@ -1278,7 +1278,7 @@
if(unknown && (!strlen(p_arg)))
{
- APPL_TRACE_DEBUG0("Empty AT cmd string received");
+ APPL_TRACE_DEBUG("Empty AT cmd string received");
bta_ag_send_ok(p_scb);
return;
}
@@ -1313,7 +1313,7 @@
{
UINT8 code = bta_ag_trans_result[p_result->result];
- APPL_TRACE_DEBUG1("bta_ag_hsp_result : res = %d", p_result->result);
+ APPL_TRACE_DEBUG("bta_ag_hsp_result : res = %d", p_result->result);
switch(p_result->result)
{
@@ -1386,7 +1386,7 @@
case BTA_AG_INBAND_RING_RES:
p_scb->inband_enabled = p_result->data.state;
- APPL_TRACE_DEBUG1("inband_enabled set to %d", p_scb->inband_enabled);
+ APPL_TRACE_DEBUG("inband_enabled set to %d", p_scb->inband_enabled);
break;
case BTA_AG_UNAT_RES:
@@ -1426,7 +1426,7 @@
{
UINT8 code = bta_ag_trans_result[p_result->result];
- APPL_TRACE_DEBUG1("bta_ag_hfp_result : res = %d", p_result->result);
+ APPL_TRACE_DEBUG("bta_ag_hfp_result : res = %d", p_result->result);
switch(p_result->result)
{
@@ -1449,7 +1449,7 @@
p_result->data.num = BTA_AG_CLIP_TYPE_DEFAULT;
}
- APPL_TRACE_DEBUG1("CLIP type :%d", p_result->data.num);
+ APPL_TRACE_DEBUG("CLIP type :%d", p_result->data.num);
p_scb->clip[0] = 0;
if (p_result->data.str[0] != 0)
sprintf(p_scb->clip,"%s,%d", p_result->data.str, p_result->data.num);
@@ -1597,7 +1597,7 @@
case BTA_AG_INBAND_RING_RES:
p_scb->inband_enabled = p_result->data.state;
- APPL_TRACE_DEBUG1("inband_enabled set to %d", p_scb->inband_enabled);
+ APPL_TRACE_DEBUG("inband_enabled set to %d", p_scb->inband_enabled);
bta_ag_send_result(p_scb, code, NULL, p_result->data.state);
break;
@@ -1609,7 +1609,7 @@
p_scb->signal_ind = p_result->data.str[6] - '0';
p_scb->roam_ind = p_result->data.str[8] - '0';
p_scb->battchg_ind = p_result->data.str[10] - '0';
- APPL_TRACE_DEBUG2("cind call:%d callsetup:%d", p_scb->call_ind, p_scb->callsetup_ind);
+ APPL_TRACE_DEBUG("cind call:%d callsetup:%d", p_scb->call_ind, p_scb->callsetup_ind);
bta_ag_send_result(p_scb, code, p_result->data.str, 0);
bta_ag_send_ok(p_scb);
@@ -1642,7 +1642,7 @@
if (p_result->data.str[0] != 0)
{
bta_ag_process_unat_res(p_result->data.str);
- APPL_TRACE_DEBUG1("BTA_AG_RES :%s",p_result->data.str);
+ APPL_TRACE_DEBUG("BTA_AG_RES :%s",p_result->data.str);
bta_ag_send_result(p_scb, code, p_result->data.str, 0);
}
@@ -1738,7 +1738,7 @@
(codec_type != BTA_AG_CODEC_CVSD) &&
(codec_type != BTA_AG_CODEC_MSBC))
{
- APPL_TRACE_ERROR1("bta_ag_setcodec error: unsupported codec type %d", codec_type);
+ APPL_TRACE_ERROR("bta_ag_setcodec error: unsupported codec type %d", codec_type);
return;
}
@@ -1746,11 +1746,11 @@
{
p_scb->sco_codec = codec_type;
p_scb->codec_updated = TRUE;
- APPL_TRACE_DEBUG1("bta_ag_setcodec: Updated codec type %d", codec_type);
+ APPL_TRACE_DEBUG("bta_ag_setcodec: Updated codec type %d", codec_type);
}
else
{
- APPL_TRACE_ERROR1("bta_ag_setcodec error: unsupported codec type %d", codec_type);
+ APPL_TRACE_ERROR("bta_ag_setcodec error: unsupported codec type %d", codec_type);
}
#else
UNUSED(p_scb);
@@ -1785,7 +1785,7 @@
case BTA_AG_CODEC_CVSD: codec_uuid = UUID_CODEC_CVSD; break;
case BTA_AG_CODEC_MSBC: codec_uuid = UUID_CODEC_MSBC; break;
default:
- APPL_TRACE_ERROR1("bta_ag_send_bcs: unknown codec %d, use CVSD", p_scb->sco_codec);
+ APPL_TRACE_ERROR("bta_ag_send_bcs: unknown codec %d, use CVSD", p_scb->sco_codec);
codec_uuid = UUID_CODEC_CVSD;
break;
}
diff --git a/bta/ag/bta_ag_main.c b/bta/ag/bta_ag_main.c
index 7eaec30..020d542 100644
--- a/bta/ag/bta_ag_main.c
+++ b/bta/ag/bta_ag_main.c
@@ -323,7 +323,7 @@
p_scb->act_timer.param = (UINT32) p_scb;
p_scb->act_timer.p_cback = bta_ag_timer_cback;
- APPL_TRACE_DEBUG1("bta_ag_scb_alloc %d", bta_ag_scb_to_idx(p_scb));
+ APPL_TRACE_DEBUG("bta_ag_scb_alloc %d", bta_ag_scb_to_idx(p_scb));
break;
}
}
@@ -332,7 +332,7 @@
{
/* out of scbs */
p_scb = NULL;
- APPL_TRACE_WARNING0("Out of ag scbs");
+ APPL_TRACE_WARNING("Out of ag scbs");
}
return p_scb;
}
@@ -352,7 +352,7 @@
UINT8 idx;
BOOLEAN allocated = FALSE;
- APPL_TRACE_DEBUG1("bta_ag_scb_dealloc %d", bta_ag_scb_to_idx(p_scb));
+ APPL_TRACE_DEBUG("bta_ag_scb_dealloc %d", bta_ag_scb_to_idx(p_scb));
/* stop timers */
bta_sys_stop_timer(&p_scb->act_timer);
@@ -421,13 +421,13 @@
if (!p_scb->in_use)
{
p_scb = NULL;
- APPL_TRACE_WARNING1("ag scb idx %d not allocated", idx);
+ APPL_TRACE_WARNING("ag scb idx %d not allocated", idx);
}
}
else
{
p_scb = NULL;
- APPL_TRACE_DEBUG1("ag scb idx %d out of range", idx);
+ APPL_TRACE_DEBUG("ag scb idx %d out of range", idx);
}
return p_scb;
}
@@ -481,7 +481,7 @@
}
/* no scb found */
- APPL_TRACE_WARNING0("No ag scb for peer addr");
+ APPL_TRACE_WARNING("No ag scb for peer addr");
return 0;
}
@@ -509,7 +509,7 @@
}
/* no other scb found */
- APPL_TRACE_DEBUG0("No other ag scb open");
+ APPL_TRACE_DEBUG("No other ag scb open");
return FALSE;
}
@@ -537,7 +537,7 @@
}
/* no other scb found */
- APPL_TRACE_DEBUG0("bta_ag_get_other_idle_scb: No idle AG scb");
+ APPL_TRACE_DEBUG("bta_ag_get_other_idle_scb: No idle AG scb");
return NULL;
}
@@ -555,7 +555,7 @@
{
tBTA_AG_SCB *p_scb;
- APPL_TRACE_DEBUG0 ("bta_ag_colli_timer_cback");
+ APPL_TRACE_DEBUG ("bta_ag_colli_timer_cback");
if (p_tle)
{
@@ -598,15 +598,15 @@
{
if (id == BTA_ID_SYS) /* ACL collision */
{
- APPL_TRACE_WARNING0 ("AG found collision (ACL) ...");
+ APPL_TRACE_WARNING ("AG found collision (ACL) ...");
}
else if (id == BTA_ID_AG) /* RFCOMM collision */
{
- APPL_TRACE_WARNING0 ("AG found collision (RFCOMM) ...");
+ APPL_TRACE_WARNING ("AG found collision (RFCOMM) ...");
}
else
{
- APPL_TRACE_WARNING0 ("AG found collision (\?\?\?) ...");
+ APPL_TRACE_WARNING ("AG found collision (\?\?\?) ...");
}
p_scb->state = BTA_AG_INIT_ST;
@@ -646,7 +646,7 @@
{
if (p_scb)
{
- APPL_TRACE_DEBUG1 ("bta_ag_resume_open, Handle(%d)", bta_ag_scb_to_idx(p_scb));
+ APPL_TRACE_DEBUG ("bta_ag_resume_open, Handle(%d)", bta_ag_scb_to_idx(p_scb));
/* resume opening process. */
if (p_scb->state == BTA_AG_INIT_ST)
@@ -657,7 +657,7 @@
}
else
{
- APPL_TRACE_ERROR0 ("bta_ag_resume_open, Null p_scb");
+ APPL_TRACE_ERROR ("bta_ag_resume_open, Null p_scb");
}
}
@@ -708,7 +708,7 @@
if (!bta_sys_is_register (BTA_ID_AG))
{
- APPL_TRACE_ERROR0("BTA AG is already disabled, ignoring ...");
+ APPL_TRACE_ERROR("BTA AG is already disabled, ignoring ...");
return;
}
@@ -751,7 +751,7 @@
/* allocate an scb */
if ((p_scb = bta_ag_scb_alloc()) != NULL)
{
- APPL_TRACE_DEBUG1("bta_ag_api_register: p_scb 0x%08x ", p_scb);
+ APPL_TRACE_DEBUG("bta_ag_api_register: p_scb 0x%08x ", p_scb);
bta_ag_sm_execute(p_scb, p_data->hdr.event, p_data);
}
else
@@ -780,7 +780,7 @@
{
if ((p_scb = bta_ag_scb_by_idx(p_data->hdr.layer_specific)) != NULL)
{
- APPL_TRACE_DEBUG1("bta_ag_api_result: p_scb 0x%08x ", p_scb);
+ APPL_TRACE_DEBUG("bta_ag_api_result: p_scb 0x%08x ", p_scb);
bta_ag_sm_execute(p_scb, BTA_AG_API_RESULT_EVT, p_data);
}
}
@@ -790,7 +790,7 @@
{
if (p_scb->in_use && p_scb->svc_conn)
{
- APPL_TRACE_DEBUG1("bta_ag_api_result p_scb 0x%08x ", p_scb);
+ APPL_TRACE_DEBUG("bta_ag_api_result p_scb 0x%08x ", p_scb);
bta_ag_sm_execute(p_scb, BTA_AG_API_RESULT_EVT, p_data);
}
}
@@ -820,20 +820,20 @@
/* Ignore displaying of AT results when not connected (Ignored in state machine) */
if (in_event != BTA_AG_API_RESULT_EVT || p_scb->state == BTA_AG_OPEN_ST)
{
- APPL_TRACE_EVENT5("AG evt (hdl 0x%04x): State %d (%s), Event 0x%04x (%s)",
+ APPL_TRACE_EVENT("AG evt (hdl 0x%04x): State %d (%s), Event 0x%04x (%s)",
bta_ag_scb_to_idx(p_scb),
p_scb->state, bta_ag_state_str(p_scb->state),
event, bta_ag_evt_str(event, p_data->api_result.result));
}
#else
- APPL_TRACE_EVENT3("AG evt (hdl 0x%04x): State %d, Event 0x%04x",
+ APPL_TRACE_EVENT("AG evt (hdl 0x%04x): State %d, Event 0x%04x",
bta_ag_scb_to_idx(p_scb), p_scb->state, event);
#endif
event &= 0x00FF;
if (event >= (BTA_AG_MAX_EVT & 0x00FF))
{
- APPL_TRACE_ERROR0("AG evt out of range, ignoring...");
+ APPL_TRACE_ERROR("AG evt out of range, ignoring...");
return;
}
@@ -858,7 +858,7 @@
#if BTA_AG_DEBUG == TRUE
if (p_scb->state != in_state)
{
- APPL_TRACE_EVENT3("BTA AG State Change: [%s] -> [%s] after Event [%s]",
+ APPL_TRACE_EVENT("BTA AG State Change: [%s] -> [%s] after Event [%s]",
bta_ag_state_str(in_state),
bta_ag_state_str(p_scb->state),
bta_ag_evt_str(in_event, p_data->api_result.result));
@@ -880,7 +880,7 @@
{
tBTA_AG_SCB *p_scb;
- APPL_TRACE_DEBUG1("bta_ag_hdl_event: Event 0x%04x ", p_msg->event);
+ APPL_TRACE_DEBUG("bta_ag_hdl_event: Event 0x%04x ", p_msg->event);
switch (p_msg->event)
{
/* handle enable event */
@@ -907,7 +907,7 @@
default:
if ((p_scb = bta_ag_scb_by_idx(p_msg->layer_specific)) != NULL)
{
- APPL_TRACE_DEBUG1("bta_ag_hdl_event: p_scb 0x%08x ", p_scb);
+ APPL_TRACE_DEBUG("bta_ag_hdl_event: p_scb 0x%08x ", p_scb);
bta_ag_sm_execute(p_scb, p_msg->event, (tBTA_AG_DATA *) p_msg);
}
break;
diff --git a/bta/ag/bta_ag_rfc.c b/bta/ag/bta_ag_rfc.c
index d6b5329..c0a9d3b 100644
--- a/bta/ag/bta_ag_rfc.c
+++ b/bta/ag/bta_ag_rfc.c
@@ -97,7 +97,7 @@
/* ignore port events for port handles other than connected handle */
if (port_handle != p_scb->conn_handle)
{
- APPL_TRACE_DEBUG3("ag_port_cback ignoring handle:%d conn_handle = %d other handle = %d",
+ APPL_TRACE_DEBUG("ag_port_cback ignoring handle:%d conn_handle = %d other handle = %d",
port_handle, p_scb->conn_handle, handle);
return;
}
@@ -129,7 +129,7 @@
UINT8 i;
BOOLEAN found_handle = FALSE;
- APPL_TRACE_DEBUG3("ag_mgmt_cback : code = %d, port_handle = %d, handle = %d",
+ APPL_TRACE_DEBUG("ag_mgmt_cback : code = %d, port_handle = %d, handle = %d",
code, port_handle, handle);
if ((p_scb = bta_ag_scb_by_idx(handle)) != NULL)
@@ -137,7 +137,7 @@
/* ignore close event for port handles other than connected handle */
if ((code != PORT_SUCCESS) && (port_handle != p_scb->conn_handle))
{
- APPL_TRACE_DEBUG1("ag_mgmt_cback ignoring handle:%d", port_handle);
+ APPL_TRACE_DEBUG("ag_mgmt_cback ignoring handle:%d", port_handle);
return;
}
@@ -159,7 +159,7 @@
if (!found_handle)
{
- APPL_TRACE_ERROR1 ("bta_ag_mgmt_cback: PORT_SUCCESS, ignoring handle = %d", port_handle);
+ APPL_TRACE_ERROR ("bta_ag_mgmt_cback: PORT_SUCCESS, ignoring handle = %d", port_handle);
return;
}
@@ -306,7 +306,7 @@
else
{
/* TODO: CR#137125 to handle to error properly */
- APPL_TRACE_DEBUG1("bta_ag_start_servers: RFCOMM_CreateConnection returned error:%d", bta_ag_port_status);
+ APPL_TRACE_DEBUG("bta_ag_start_servers: RFCOMM_CreateConnection returned error:%d", bta_ag_port_status);
}
}
}
@@ -382,7 +382,7 @@
bta_ag_mgmt_cback_tbl[bta_ag_scb_to_idx(p_scb) - 1]) == PORT_SUCCESS)
{
bta_ag_setup_port(p_scb, p_scb->conn_handle);
- APPL_TRACE_DEBUG1("bta_ag_rfc_do_open : conn_handle = %d", p_scb->conn_handle);
+ APPL_TRACE_DEBUG("bta_ag_rfc_do_open : conn_handle = %d", p_scb->conn_handle);
}
/* RFCOMM create connection failed; send ourselves RFCOMM close event */
else
diff --git a/bta/ag/bta_ag_sco.c b/bta/ag/bta_ag_sco.c
index 87d9188..9081ba2 100644
--- a/bta/ag/bta_ag_sco.c
+++ b/bta/ag/bta_ag_sco.c
@@ -184,11 +184,11 @@
BT_HDR *p_buf;
UINT16 handle = 0;
- APPL_TRACE_DEBUG3 ("bta_ag_sco_disc_cback(): sco_idx: 0x%x p_cur_scb: 0x%08x sco.state: %d", sco_idx, bta_ag_cb.sco.p_curr_scb, bta_ag_cb.sco.state);
+ APPL_TRACE_DEBUG ("bta_ag_sco_disc_cback(): sco_idx: 0x%x p_cur_scb: 0x%08x sco.state: %d", sco_idx, bta_ag_cb.sco.p_curr_scb, bta_ag_cb.sco.state);
- APPL_TRACE_DEBUG4 ("bta_ag_sco_disc_cback(): scb[0] addr: 0x%08x in_use: %u sco_idx: 0x%x sco state: %u",
+ APPL_TRACE_DEBUG ("bta_ag_sco_disc_cback(): scb[0] addr: 0x%08x in_use: %u sco_idx: 0x%x sco state: %u",
&bta_ag_cb.scb[0], bta_ag_cb.scb[0].in_use, bta_ag_cb.scb[0].sco_idx, bta_ag_cb.scb[0].state);
- APPL_TRACE_DEBUG4 ("bta_ag_sco_disc_cback(): scb[1] addr: 0x%08x in_use: %u sco_idx: 0x%x sco state: %u",
+ APPL_TRACE_DEBUG ("bta_ag_sco_disc_cback(): scb[1] addr: 0x%08x in_use: %u sco_idx: 0x%x sco state: %u",
&bta_ag_cb.scb[1], bta_ag_cb.scb[1].in_use, bta_ag_cb.scb[1].sco_idx, bta_ag_cb.scb[1].state);
/* match callback to scb */
@@ -207,7 +207,7 @@
{
#if (BTM_SCO_HCI_INCLUDED == TRUE )
tBTM_STATUS status = BTM_ConfigScoPath(BTM_SCO_ROUTE_PCM, NULL, NULL, TRUE);
- APPL_TRACE_DEBUG1("bta_ag_sco_disc_cback sco close config status = %d", status);
+ APPL_TRACE_DEBUG("bta_ag_sco_disc_cback sco close config status = %d", status);
/* SCO clean up here */
bta_dm_sco_co_close();
#endif
@@ -223,7 +223,7 @@
if (bta_ag_sco_is_opening (bta_ag_cb.sco.p_curr_scb))
{
bta_ag_cb.sco.p_curr_scb->codec_fallback = TRUE;
- APPL_TRACE_DEBUG0("Fallback to CVSD");
+ APPL_TRACE_DEBUG("Fallback to CVSD");
}
}
@@ -240,7 +240,7 @@
/* no match found */
else
{
- APPL_TRACE_DEBUG0("no scb for ag_sco_disc_cback");
+ APPL_TRACE_DEBUG("no scb for ag_sco_disc_cback");
/* sco could be closed after scb dealloc'ed */
if (bta_ag_cb.sco.p_curr_scb != NULL)
@@ -266,7 +266,7 @@
{
if (status != BTM_SCO_DATA_CORRECT)
{
- APPL_TRACE_DEBUG1("bta_ag_sco_read_cback: status(%d)", status);
+ APPL_TRACE_DEBUG("bta_ag_sco_read_cback: status(%d)", status);
}
/* Callout function must free the data. */
@@ -294,7 +294,7 @@
{
status = BTM_RemoveSco(p_scb->sco_idx);
- APPL_TRACE_DEBUG2("ag remove sco: inx 0x%04x, status:0x%x", p_scb->sco_idx, status);
+ APPL_TRACE_DEBUG("ag remove sco: inx 0x%04x, status:0x%x", p_scb->sco_idx, status);
if (status == BTM_CMD_STARTED)
{
@@ -341,7 +341,7 @@
/* If no other SCO active, allow this one */
if (!bta_ag_cb.sco.p_curr_scb)
{
- APPL_TRACE_EVENT1("bta_ag_esco_connreq_cback: Accept Conn Request (sco_inx 0x%04x)", sco_inx);
+ APPL_TRACE_EVENT("bta_ag_esco_connreq_cback: Accept Conn Request (sco_inx 0x%04x)", sco_inx);
bta_ag_sco_conn_rsp(p_scb, &p_data->conn_evt);
bta_ag_cb.sco.state = BTA_AG_SCO_OPENING_ST;
@@ -350,14 +350,14 @@
}
else /* Begin a transfer: Close current SCO before responding */
{
- APPL_TRACE_DEBUG0("bta_ag_esco_connreq_cback: Begin XFER");
+ APPL_TRACE_DEBUG("bta_ag_esco_connreq_cback: Begin XFER");
bta_ag_cb.sco.p_xfer_scb = p_scb;
bta_ag_cb.sco.conn_data = p_data->conn_evt;
bta_ag_cb.sco.state = BTA_AG_SCO_OPEN_XFER_ST;
if (!bta_ag_remove_sco(bta_ag_cb.sco.p_curr_scb, TRUE))
{
- APPL_TRACE_ERROR1("bta_ag_esco_connreq_cback: Nothing to remove so accept Conn Request (sco_inx 0x%04x)", sco_inx);
+ APPL_TRACE_ERROR("bta_ag_esco_connreq_cback: Nothing to remove so accept Conn Request (sco_inx 0x%04x)", sco_inx);
bta_ag_cb.sco.p_xfer_scb = NULL;
bta_ag_cb.sco.state = BTA_AG_SCO_LISTEN_ST;
@@ -368,14 +368,14 @@
/* If error occurred send reject response immediately */
else
{
- APPL_TRACE_WARNING0("no scb for bta_ag_esco_connreq_cback or no resources");
+ APPL_TRACE_WARNING("no scb for bta_ag_esco_connreq_cback or no resources");
BTM_EScoConnRsp(p_data->conn_evt.sco_inx, HCI_ERR_HOST_REJECT_RESOURCES, NULL);
}
}
/* Received a change in the esco link */
else if (event == BTM_ESCO_CHG_EVT)
{
- APPL_TRACE_EVENT5("eSCO change event (inx %d): rtrans %d, rxlen %d, txlen %d, txint %d",
+ APPL_TRACE_EVENT("eSCO change event (inx %d): rtrans %d, rxlen %d, txlen %d, txint %d",
p_data->chg_evt.sco_inx,
p_data->chg_evt.retrans_window, p_data->chg_evt.rx_pkt_len,
p_data->chg_evt.tx_pkt_len, p_data->chg_evt.tx_interval);
@@ -431,7 +431,7 @@
/* Make sure this sco handle is not already in use */
if (p_scb->sco_idx != BTM_INVALID_SCO_INDEX)
{
- APPL_TRACE_WARNING1("bta_ag_create_sco: Index 0x%04x Already In Use!",
+ APPL_TRACE_WARNING("bta_ag_create_sco: Index 0x%04x Already In Use!",
p_scb->sco_idx);
return;
}
@@ -491,23 +491,23 @@
if (esco_codec != BTA_AG_CODEC_MSBC)
{
p_scb->retry_with_sco_only = TRUE;
- APPL_TRACE_API0("Setting retry_with_sco_only to TRUE");
+ APPL_TRACE_API("Setting retry_with_sco_only to TRUE");
}
else /* Do not use SCO when using mSBC */
{
p_scb->retry_with_sco_only = FALSE;
- APPL_TRACE_API0("Setting retry_with_sco_only to FALSE");
+ APPL_TRACE_API("Setting retry_with_sco_only to FALSE");
}
#else
p_scb->retry_with_sco_only = TRUE;
- APPL_TRACE_API0("Setting retry_with_sco_only to TRUE");
+ APPL_TRACE_API("Setting retry_with_sco_only to TRUE");
#endif
}
}
else
{
if(p_scb->retry_with_sco_only)
- APPL_TRACE_API0("retrying with SCO only");
+ APPL_TRACE_API("retrying with SCO only");
p_scb->retry_with_sco_only = FALSE;
BTM_SetEScoMode(BTM_LINK_TYPE_SCO, ¶ms);
@@ -579,7 +579,7 @@
}
}
- APPL_TRACE_API4("ag create sco: orig %d, inx 0x%04x, status 0x%x, pkt types 0x%04x",
+ APPL_TRACE_API("ag create sco: orig %d, inx 0x%04x, status 0x%x, pkt types 0x%04x",
is_orig, p_scb->sco_idx, status, params.packet_types);
}
@@ -670,12 +670,12 @@
#if BTA_AG_SCO_DEBUG == TRUE
UINT8 in_state = p_sco->state;
- APPL_TRACE_EVENT5("BTA ag sco evt (hdl 0x%04x): State %d (%s), Event %d (%s)",
+ APPL_TRACE_EVENT("BTA ag sco evt (hdl 0x%04x): State %d (%s), Event %d (%s)",
p_scb->sco_idx,
p_sco->state, bta_ag_sco_state_str(p_sco->state),
event, bta_ag_sco_evt_str(event));
#else
- APPL_TRACE_EVENT3("BTA ag sco evt (hdl 0x%04x): State %d, Event %d",
+ APPL_TRACE_EVENT("BTA ag sco evt (hdl 0x%04x): State %d, Event %d",
p_scb->sco_idx, p_sco->state, event);
#endif
@@ -712,7 +712,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_SHUTDOWN_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_SHUTDOWN_ST: Ignoring event %d", event);
break;
}
break;
@@ -757,7 +757,7 @@
case BTA_AG_SCO_CLOSE_E:
/* remove listening connection */
/* Ignore the event. We need to keep listening SCO for the active SLC */
- APPL_TRACE_WARNING1("BTA_AG_SCO_LISTEN_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_LISTEN_ST: Ignoring event %d", event);
break;
case BTA_AG_SCO_CONN_CLOSE_E:
@@ -767,7 +767,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_LISTEN_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_LISTEN_ST: Ignoring event %d", event);
break;
}
break;
@@ -819,7 +819,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_CODEC_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_CODEC_ST: Ignoring event %d", event);
break;
}
break;
@@ -878,7 +878,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_OPENING_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_OPENING_ST: Ignoring event %d", event);
break;
}
break;
@@ -923,7 +923,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_OPEN_CL_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_OPEN_CL_ST: Ignoring event %d", event);
break;
}
break;
@@ -959,7 +959,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_OPEN_XFER_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_OPEN_XFER_ST: Ignoring event %d", event);
break;
}
break;
@@ -1012,7 +1012,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_OPEN_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_OPEN_ST: Ignoring event %d", event);
break;
}
break;
@@ -1059,7 +1059,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_CLOSING_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_CLOSING_ST: Ignoring event %d", event);
break;
}
break;
@@ -1096,7 +1096,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_CLOSE_OP_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_CLOSE_OP_ST: Ignoring event %d", event);
break;
}
break;
@@ -1145,7 +1145,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_CLOSE_XFER_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_CLOSE_XFER_ST: Ignoring event %d", event);
break;
}
break;
@@ -1202,7 +1202,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_AG_SCO_SHUTTING_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_AG_SCO_SHUTTING_ST: Ignoring event %d", event);
break;
}
break;
@@ -1213,7 +1213,7 @@
#if BTA_AG_SCO_DEBUG == TRUE
if (p_sco->state != in_state)
{
- APPL_TRACE_EVENT3("BTA AG SCO State Change: [%s] -> [%s] after Event [%s]",
+ APPL_TRACE_EVENT("BTA AG SCO State Change: [%s] -> [%s] after Event [%s]",
bta_ag_sco_state_str(in_state),
bta_ag_sco_state_str(p_sco->state),
bta_ag_sco_evt_str(event));
@@ -1333,7 +1333,7 @@
if (p_scb->sco_idx != BTM_INVALID_SCO_INDEX)
#endif
{
- APPL_TRACE_DEBUG1("bta_ag_sco_close: sco_inx = %d", p_scb->sco_idx);
+ APPL_TRACE_DEBUG("bta_ag_sco_close: sco_inx = %d", p_scb->sco_idx);
bta_ag_sco_event(p_scb, BTA_AG_SCO_CLOSE_E);
}
}
@@ -1593,13 +1593,13 @@
if(set_reset == FALSE) /* reset the parameters to default */
{
bta_ag_cb.sco.param_updated = FALSE;
- APPL_TRACE_DEBUG0("bta_ag_set_esco_param : Resetting ESCO parameters to default");
+ APPL_TRACE_DEBUG("bta_ag_set_esco_param : Resetting ESCO parameters to default");
}
else
{
bta_ag_cb.sco.param_updated = TRUE;
bta_ag_cb.sco.params = *param;
- APPL_TRACE_DEBUG0("bta_ag_set_esco_param : Setting ESCO parameters");
+ APPL_TRACE_DEBUG("bta_ag_set_esco_param : Setting ESCO parameters");
}
}
diff --git a/bta/ag/bta_ag_sdp.c b/bta/ag/bta_ag_sdp.c
index 333cb1b..8099d5f 100644
--- a/bta/ag/bta_ag_sdp.c
+++ b/bta/ag/bta_ag_sdp.c
@@ -74,7 +74,7 @@
UINT16 event;
tBTA_AG_SCB *p_scb;
- APPL_TRACE_DEBUG1("bta_ag_sdp_cback status:0x%x", status);
+ APPL_TRACE_DEBUG("bta_ag_sdp_cback status:0x%x", status);
if ((p_scb = bta_ag_scb_by_idx(idx)) != NULL)
{
@@ -140,7 +140,7 @@
BOOLEAN codec_supported = FALSE;
UINT8 buf[2];
- APPL_TRACE_DEBUG1("bta_ag_add_record uuid: %x", service_uuid);
+ APPL_TRACE_DEBUG("bta_ag_add_record uuid: %x", service_uuid);
memset( proto_elem_list, 0 , BTA_AG_NUM_PROTO_ELEMS*sizeof(tSDP_PROTOCOL_ELEM));
@@ -280,7 +280,7 @@
/* if service registered for this scb and not registered for any other scb */
if (((services & 1) == 1) && ((others & 1) == 0))
{
- APPL_TRACE_DEBUG1("bta_ag_del_records %d", i);
+ APPL_TRACE_DEBUG("bta_ag_del_records %d", i);
if (bta_ag_cb.profile[i].sdp_handle != 0)
{
SDP_DeleteRecord(bta_ag_cb.profile[i].sdp_handle);
diff --git a/bta/ar/bta_ar.c b/bta/ar/bta_ar.c
index 89b732a..25b27d3 100644
--- a/bta/ar/bta_ar.c
+++ b/bta/ar/bta_ar.c
@@ -115,7 +115,7 @@
#if (BTA_AR_DEBUG == TRUE)
else
{
- APPL_TRACE_ERROR1("bta_ar_reg_avdt: the registration is from wrong sys_id:%d", sys_id);
+ APPL_TRACE_ERROR("bta_ar_reg_avdt: the registration is from wrong sys_id:%d", sys_id);
}
#endif
diff --git a/bta/av/bta_av_aact.c b/bta/av/bta_av_aact.c
index b2a4f0f..acde0b5 100644
--- a/bta/av/bta_av_aact.c
+++ b/bta/av/bta_av_aact.c
@@ -244,7 +244,7 @@
(p_scb->seps[xx].codec_type == p_scb->codec_type))
return (p_scb->seps[xx].av_handle);
}
- APPL_TRACE_DEBUG0(" bta_av_get_scb_handle appropiate sep_type not found")
+ APPL_TRACE_DEBUG(" bta_av_get_scb_handle appropiate sep_type not found")
return 0; /* return invalid handle */
}
@@ -265,7 +265,7 @@
if (p_scb->seps[xx].av_handle == tavdt_handle)
return (p_scb->seps[xx].tsep);
}
- APPL_TRACE_DEBUG0(" bta_av_get_scb_sep_type appropiate handle not found")
+ APPL_TRACE_DEBUG(" bta_av_get_scb_sep_type appropiate handle not found")
return 3; /* return invalid sep type */
}
@@ -281,11 +281,11 @@
*******************************************************************************/
static void bta_av_save_addr(tBTA_AV_SCB *p_scb, const BD_ADDR b)
{
- APPL_TRACE_DEBUG2("bta_av_save_addr r:%d, s:%d",
+ APPL_TRACE_DEBUG("bta_av_save_addr r:%d, s:%d",
p_scb->recfg_sup, p_scb->suspend_sup);
if(bdcmp(p_scb->peer_addr, b) != 0)
{
- APPL_TRACE_ERROR0("reset flags");
+ APPL_TRACE_ERROR("reset flags");
/* a new addr, reset the supported flags */
p_scb->recfg_sup = TRUE;
p_scb->suspend_sup = TRUE;
@@ -333,7 +333,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG2("bta_av_st_rc_timer rc_handle:%d, use_rc: %d",
+ APPL_TRACE_DEBUG("bta_av_st_rc_timer rc_handle:%d, use_rc: %d",
p_scb->rc_handle, p_scb->use_rc);
/* for outgoing RC connection as INT/CT */
if( (p_scb->rc_handle == BTA_AV_RC_HANDLE_NONE) &&
@@ -455,7 +455,7 @@
if (bd_addr != NULL)
{
bdcpy(p_msg->bd_addr, bd_addr);
- APPL_TRACE_DEBUG6(" bd_addr:%02x-%02x-%02x-%02x-%02x-%02x",
+ APPL_TRACE_DEBUG(" bd_addr:%02x-%02x-%02x-%02x-%02x-%02x",
bd_addr[0], bd_addr[1],
bd_addr[2], bd_addr[3],
bd_addr[4], bd_addr[5]);
@@ -468,7 +468,7 @@
switch (event)
{
case AVDT_RECONFIG_CFM_EVT:
- APPL_TRACE_DEBUG4("reconfig cfm event codec info = 0x%06x-%06x-%06x-%02x",
+ APPL_TRACE_DEBUG("reconfig cfm event codec info = 0x%06x-%06x-%06x-%02x",
(p_msg->msg.reconfig_cfm.p_cfg->codec_info[0]<<16)+(p_msg->msg.reconfig_cfm.p_cfg->codec_info[1]<<8)+p_msg->msg.reconfig_cfm.p_cfg->codec_info[2],
(p_msg->msg.reconfig_cfm.p_cfg->codec_info[3]<<16)+(p_msg->msg.reconfig_cfm.p_cfg->codec_info[4]<<8)+p_msg->msg.reconfig_cfm.p_cfg->codec_info[5],
(p_msg->msg.reconfig_cfm.p_cfg->codec_info[6]<<16)+(p_msg->msg.reconfig_cfm.p_cfg->codec_info[7]<<8)+p_msg->msg.reconfig_cfm.p_cfg->codec_info[8],
@@ -544,7 +544,7 @@
if (event == AVDT_SUSPEND_CFM_EVT)
p_msg->initiator = TRUE;
- APPL_TRACE_VERBOSE1("hndl:x%x", p_scb->hndl);
+ APPL_TRACE_VERBOSE("hndl:x%x", p_scb->hndl);
p_msg->hdr.layer_specific = p_scb->hndl;
p_msg->handle = handle;
p_msg->avdt_event = event;
@@ -570,9 +570,9 @@
{
int index = 0;
tBTA_AV_SCB *p_scb ;
- APPL_TRACE_DEBUG3("bta_av_stream_data_cback avdt_handle: %d pkt_len=0x%x ofst = 0x%x", handle,p_pkt->len,p_pkt->offset);
- APPL_TRACE_DEBUG1(" Number of frames 0x%x",*((UINT8*)(p_pkt + 1) + p_pkt->offset));
- APPL_TRACE_DEBUG1("Sequence Number 0x%x",p_pkt->layer_specific);
+ APPL_TRACE_DEBUG("bta_av_stream_data_cback avdt_handle: %d pkt_len=0x%x ofst = 0x%x", handle,p_pkt->len,p_pkt->offset);
+ APPL_TRACE_DEBUG(" Number of frames 0x%x",*((UINT8*)(p_pkt + 1) + p_pkt->offset));
+ APPL_TRACE_DEBUG("Sequence Number 0x%x",p_pkt->layer_specific);
/* Get SCB and correct sep type*/
for(index = 0; index < BTA_AV_NUM_STRS;index ++ )
{
@@ -601,7 +601,7 @@
*******************************************************************************/
static void bta_av_stream0_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CTRL *p_data)
{
- APPL_TRACE_VERBOSE2("bta_av_stream0_cback avdt_handle: %d event=0x%x", handle, event);
+ APPL_TRACE_VERBOSE("bta_av_stream0_cback avdt_handle: %d event=0x%x", handle, event);
bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 0);
}
@@ -616,7 +616,7 @@
*******************************************************************************/
static void bta_av_stream1_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CTRL *p_data)
{
- APPL_TRACE_EVENT2("bta_av_stream1_cback avdt_handle: %d event=0x%x", handle, event);
+ APPL_TRACE_EVENT("bta_av_stream1_cback avdt_handle: %d event=0x%x", handle, event);
bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 1);
}
@@ -632,7 +632,7 @@
*******************************************************************************/
static void bta_av_stream2_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CTRL *p_data)
{
- APPL_TRACE_EVENT2("bta_av_stream2_cback avdt_handle: %d event=0x%x", handle, event);
+ APPL_TRACE_EVENT("bta_av_stream2_cback avdt_handle: %d event=0x%x", handle, event);
bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 2);
}
#endif
@@ -649,7 +649,7 @@
*******************************************************************************/
static void bta_av_stream3_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CTRL *p_data)
{
- APPL_TRACE_EVENT2("bta_av_stream3_cback avdt_handle: %d event=0x%x", handle, event);
+ APPL_TRACE_EVENT("bta_av_stream3_cback avdt_handle: %d event=0x%x", handle, event);
bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 3);
}
#endif
@@ -666,7 +666,7 @@
#if BTA_AV_NUM_STRS > 4
static void bta_av_stream4_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CTRL *p_data)
{
- APPL_TRACE_EVENT2("bta_av_stream4_cback avdt_handle: %d event=0x%x", handle, event);
+ APPL_TRACE_EVENT("bta_av_stream4_cback avdt_handle: %d event=0x%x", handle, event);
bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 4);
}
#endif
@@ -683,7 +683,7 @@
#if BTA_AV_NUM_STRS > 5
static void bta_av_stream5_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CTRL *p_data)
{
- APPL_TRACE_EVENT2("bta_av_stream5_cback avdt_handle: %d event=0x%x", handle, event);
+ APPL_TRACE_EVENT("bta_av_stream5_cback avdt_handle: %d event=0x%x", handle, event);
bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 5);
}
#endif
@@ -719,7 +719,7 @@
}
else
{
- APPL_TRACE_ERROR1 ("bta_av_a2d_sdp_cback, no scb found for handle(0x%x)", bta_av_cb.handle);
+ APPL_TRACE_ERROR ("bta_av_a2d_sdp_cback, no scb found for handle(0x%x)", bta_av_cb.handle);
}
}
}
@@ -736,10 +736,10 @@
static void bta_av_adjust_seps_idx(tBTA_AV_SCB *p_scb, UINT8 avdt_handle)
{
int xx;
- APPL_TRACE_DEBUG1("bta_av_adjust_seps_idx codec_type: %d", p_scb->codec_type);
+ APPL_TRACE_DEBUG("bta_av_adjust_seps_idx codec_type: %d", p_scb->codec_type);
for(xx=0; xx<BTA_AV_MAX_SEPS; xx++)
{
- APPL_TRACE_DEBUG2("av_handle: %d codec_type: %d",
+ APPL_TRACE_DEBUG("av_handle: %d codec_type: %d",
p_scb->seps[xx].av_handle, p_scb->seps[xx].codec_type);
if((p_scb->seps[xx].av_handle && p_scb->codec_type == p_scb->seps[xx].codec_type)
&& (p_scb->seps[xx].av_handle == avdt_handle))
@@ -767,7 +767,7 @@
tBTA_AV_API_OPEN *p_buf = &p_scb->q_info.open;
UNUSED(p_data);
- APPL_TRACE_DEBUG1("bta_av_switch_role wait:x%x", p_scb->wait);
+ APPL_TRACE_DEBUG("bta_av_switch_role wait:x%x", p_scb->wait);
if (p_scb->wait & BTA_AV_WAIT_ROLE_SW_RES_START)
p_scb->wait |= BTA_AV_WAIT_ROLE_SW_RETRY;
@@ -822,7 +822,7 @@
tBTA_AV_START start;
tBTA_AV_OPEN av_open;
- APPL_TRACE_DEBUG3("bta_av_role_res q_tag:%d, wait:x%x, role:x%x", p_scb->q_tag, p_scb->wait, p_scb->role);
+ APPL_TRACE_DEBUG("bta_av_role_res q_tag:%d, wait:x%x, role:x%x", p_scb->q_tag, p_scb->wait, p_scb->role);
if (p_scb->role & BTA_AV_ROLE_START_INT)
initiator = TRUE;
@@ -879,11 +879,11 @@
}
else
{
- APPL_TRACE_WARNING2 ("Unexpected role switch event: q_tag = %d wait = %d", p_scb->q_tag, p_scb->wait);
+ APPL_TRACE_WARNING ("Unexpected role switch event: q_tag = %d wait = %d", p_scb->q_tag, p_scb->wait);
}
}
- APPL_TRACE_DEBUG2("wait:x%x, role:x%x", p_scb->wait, p_scb->role);
+ APPL_TRACE_DEBUG("wait:x%x, role:x%x", p_scb->wait, p_scb->role);
}
/*******************************************************************************
@@ -919,7 +919,7 @@
ATTR_ID_BT_PROFILE_DESC_LIST};
UINT16 sdp_uuid = 0; /* UUID for which SDP has to be done */
- APPL_TRACE_DEBUG3("bta_av_do_disc_a2d use_rc: %d rs:%d, oc:%d",
+ APPL_TRACE_DEBUG("bta_av_do_disc_a2d use_rc: %d rs:%d, oc:%d",
p_data->api_open.use_rc, p_data->api_open.switch_res, bta_av_cb.audio_open_cnt);
memcpy (&(p_scb->open_api), &(p_data->api_open), sizeof(tBTA_AV_API_OPEN));
@@ -964,7 +964,7 @@
break;
}
- APPL_TRACE_DEBUG3("ok_continue: %d wait:x%x, q_tag: %d", ok_continue, p_scb->wait, p_scb->q_tag);
+ APPL_TRACE_DEBUG("ok_continue: %d wait:x%x, q_tag: %d", ok_continue, p_scb->wait, p_scb->q_tag);
if (!ok_continue)
return;
@@ -1016,7 +1016,7 @@
else if (p_scb->uuid_int == UUID_SERVCLASS_AUDIO_SOURCE)
sdp_uuid = UUID_SERVCLASS_AUDIO_SINK;
- APPL_TRACE_DEBUG2("uuid_int 0x%x, Doing SDP For 0x%x", p_scb->uuid_int, sdp_uuid);
+ APPL_TRACE_DEBUG("uuid_int 0x%x, Doing SDP For 0x%x", p_scb->uuid_int, sdp_uuid);
if(A2D_FindService(sdp_uuid, p_scb->peer_addr, &db_params,
bta_av_a2d_sdp_cback) == A2D_SUCCESS)
{
@@ -1045,7 +1045,7 @@
UINT8 role = BTA_AV_ROLE_AD_INT;
UNUSED(p_data);
- APPL_TRACE_DEBUG0("bta_av_cleanup");
+ APPL_TRACE_DEBUG("bta_av_cleanup");
/* free any buffers */
utl_freebuf((void **) &p_scb->p_cap);
@@ -1162,7 +1162,7 @@
p_scb->num_seps = 1;
p_scb->sep_info_idx = 0;
- APPL_TRACE_DEBUG3("bta_av_config_ind: SEID: %d use_rc: %d cur_psc_mask:0x%x", p_info->seid, p_scb->use_rc, p_scb->cur_psc_mask);
+ APPL_TRACE_DEBUG("bta_av_config_ind: SEID: %d use_rc: %d cur_psc_mask:0x%x", p_info->seid, p_scb->use_rc, p_scb->cur_psc_mask);
/* in case of A2DP SINK this is the first time peer data is being sent to co functions */
if (local_sep == AVDT_TSEP_SNK)
{
@@ -1203,7 +1203,7 @@
tBTA_AV_RCB *p_rcb;
UNUSED(p_data);
- APPL_TRACE_DEBUG1("bta_av_disconnect_req conn_lcb: 0x%x", bta_av_cb.conn_lcb);
+ APPL_TRACE_DEBUG("bta_av_disconnect_req conn_lcb: 0x%x", bta_av_cb.conn_lcb);
bta_sys_stop_timer(&bta_av_cb.sig_tmr);
bta_sys_stop_timer(&p_scb->timer);
@@ -1281,7 +1281,7 @@
/* we like this codec_type. find the sep_idx */
local_sep = bta_av_get_scb_sep_type(p_scb,avdt_handle);
bta_av_adjust_seps_idx(p_scb, avdt_handle);
- APPL_TRACE_DEBUG2("bta_av_setconfig_rsp: sep_idx: %d cur_psc_mask:0x%x", p_scb->sep_idx, p_scb->cur_psc_mask);
+ APPL_TRACE_DEBUG("bta_av_setconfig_rsp: sep_idx: %d cur_psc_mask:0x%x", p_scb->sep_idx, p_scb->cur_psc_mask);
if ((AVDT_TSEP_SNK == local_sep) && (p_data->ci_setconfig.err_code == AVDT_SUCCESS) &&
(p_scb->seps[p_scb->sep_idx].p_app_data_cback != NULL))
p_scb->seps[p_scb->sep_idx].p_app_data_cback(BTA_AV_MEDIA_SINK_CFG_EVT,
@@ -1298,7 +1298,7 @@
p_scb->wait = BTA_AV_WAIT_ACP_CAPS_ON;
if(p_data->ci_setconfig.recfg_needed)
p_scb->role |= BTA_AV_ROLE_SUSPEND_OPT;
- APPL_TRACE_ERROR3("bta_av_setconfig_rsp recfg_needed:%d role:x%x num:%d",
+ APPL_TRACE_ERROR("bta_av_setconfig_rsp recfg_needed:%d role:x%x num:%d",
p_data->ci_setconfig.recfg_needed, p_scb->role, num);
/* callout module tells BTA the number of "good" SEPs and their SEIDs.
* getcap on these SEID */
@@ -1327,7 +1327,7 @@
for (i = 1; i < num; i++)
{
- APPL_TRACE_DEBUG2("sep_info[%d] SEID: %d", i, p_seid[i-1]);
+ APPL_TRACE_DEBUG("sep_info[%d] SEID: %d", i, p_seid[i-1]);
/* initialize the sep_info[] to get capabilities */
p_scb->sep_info[i].in_use = FALSE;
p_scb->sep_info[i].tsep = AVDT_TSEP_SNK;
@@ -1367,7 +1367,7 @@
p_scb->stream_mtu = p_data->str_msg.msg.open_ind.peer_mtu - AVDT_MEDIA_HDR_SIZE;
mtu = bta_av_chk_mtu(p_scb, p_scb->stream_mtu);
- APPL_TRACE_DEBUG3("bta_av_str_opened l2c_cid: 0x%x stream_mtu: %d mtu: %d",
+ APPL_TRACE_DEBUG("bta_av_str_opened l2c_cid: 0x%x stream_mtu: %d mtu: %d",
p_scb->l2c_cid, p_scb->stream_mtu, mtu);
if(mtu == 0 || mtu > p_scb->stream_mtu)
mtu = p_scb->stream_mtu;
@@ -1442,7 +1442,7 @@
protect_req.chnl = p_scb->chnl;
protect_req.hndl = p_scb->hndl;
/*
- APPL_TRACE_EVENT1("sec ind handle: x%x", protect_req.hndl);
+ APPL_TRACE_EVENT("sec ind handle: x%x", protect_req.hndl);
*/
protect_req.p_data = p_data->str_msg.msg.security_ind.p_data;
protect_req.len = p_data->str_msg.msg.security_ind.len;
@@ -1537,7 +1537,7 @@
{
/* SNK initiated L2C connection while SRC was doing SDP. */
/* Wait until timeout to check if SNK starts signalling. */
- APPL_TRACE_EVENT1("bta_av_connect_req: coll_mask = 0x%2X", p_scb->coll_mask);
+ APPL_TRACE_EVENT("bta_av_connect_req: coll_mask = 0x%2X", p_scb->coll_mask);
return;
}
@@ -1579,7 +1579,7 @@
/* our uuid in case we initiate connection */
UINT16 uuid_int = p_scb->uuid_int;
- APPL_TRACE_DEBUG1(" initiator UUID 0x%x", uuid_int);
+ APPL_TRACE_DEBUG(" initiator UUID 0x%x", uuid_int);
/* store number of stream endpoints returned */
p_scb->num_seps = p_data->str_msg.msg.discover_cfm.num_seps;
@@ -1688,7 +1688,7 @@
UINT8 old_wait = p_scb->wait;
BOOLEAN getcap_done = FALSE;
- APPL_TRACE_DEBUG3("bta_av_save_caps num_seps:%d sep_info_idx:%d wait:x%x",
+ APPL_TRACE_DEBUG("bta_av_save_caps num_seps:%d sep_info_idx:%d wait:x%x",
p_scb->num_seps, p_scb->sep_info_idx, p_scb->wait);
memcpy(&cfg, p_scb->p_cap, sizeof(tAVDT_CFG));
/* let application know the capability of the SNK */
@@ -1773,7 +1773,7 @@
UINT8 idx;
tBTA_AV_OPEN open;
- APPL_TRACE_DEBUG0("bta_av_open_failed");
+ APPL_TRACE_DEBUG("bta_av_open_failed");
p_scb->open_status = BTA_AV_FAIL_STREAM;
bta_av_cco_close(p_scb, p_data);
@@ -1839,10 +1839,10 @@
memcpy(cfg.protect_info, p_scb->p_cap->protect_info, AVDT_PROTECT_SIZE);
media_type = p_scb->p_cap->codec_info[BTA_AV_MEDIA_TYPE_IDX] >> 4;
- APPL_TRACE_DEBUG1("num_codec %d", p_scb->p_cap->num_codec);
- APPL_TRACE_DEBUG2("media type x%x, x%x", media_type, p_scb->media_type);
+ APPL_TRACE_DEBUG("num_codec %d", p_scb->p_cap->num_codec);
+ APPL_TRACE_DEBUG("media type x%x, x%x", media_type, p_scb->media_type);
#if AVDT_MULTIPLEXING == TRUE
- APPL_TRACE_DEBUG2("mux x%x, x%x", cfg.mux_mask, p_scb->p_cap->mux_mask);
+ APPL_TRACE_DEBUG("mux x%x, x%x", cfg.mux_mask, p_scb->p_cap->mux_mask);
#endif
/* if codec present and we get a codec configuration */
@@ -1854,14 +1854,14 @@
{
#if AVDT_MULTIPLEXING == TRUE
cfg.mux_mask &= p_scb->p_cap->mux_mask;
- APPL_TRACE_DEBUG1("mux_mask used x%x", cfg.mux_mask);
+ APPL_TRACE_DEBUG("mux_mask used x%x", cfg.mux_mask);
#endif
/* save copy of codec type and configuration */
p_scb->codec_type = cfg.codec_info[BTA_AV_CODEC_TYPE_IDX];
memcpy(&p_scb->cfg, &cfg, sizeof(tAVDT_CFG));
uuid_int = p_scb->uuid_int;
- APPL_TRACE_DEBUG1(" initiator UUID = 0x%x ", uuid_int);
+ APPL_TRACE_DEBUG(" initiator UUID = 0x%x ", uuid_int);
if (uuid_int == UUID_SERVCLASS_AUDIO_SOURCE)
bta_av_adjust_seps_idx(p_scb, bta_av_get_scb_handle(p_scb, AVDT_TSEP_SRC));
else if (uuid_int == UUID_SERVCLASS_AUDIO_SINK)
@@ -1874,7 +1874,7 @@
if ((uuid_int == UUID_SERVCLASS_AUDIO_SINK) &&
(p_scb->seps[p_scb->sep_idx].p_app_data_cback != NULL))
{
- APPL_TRACE_DEBUG0(" Configure Deoder for Sink Connection ");
+ APPL_TRACE_DEBUG(" Configure Deoder for Sink Connection ");
p_scb->seps[p_scb->sep_idx].p_app_data_cback(BTA_AV_MEDIA_SINK_CFG_EVT,
(tBTA_AV_MEDIA*)p_scb->cfg.codec_info);
}
@@ -1913,7 +1913,7 @@
UINT8 avdt_handle = p_data->ci_setconfig.avdt_handle;
bta_av_adjust_seps_idx(p_scb, avdt_handle);
- APPL_TRACE_DEBUG1("bta_av_setconfig_rej: sep_idx: %d",p_scb->sep_idx);
+ APPL_TRACE_DEBUG("bta_av_setconfig_rej: sep_idx: %d",p_scb->sep_idx);
AVDT_ConfigRsp(p_scb->avdt_handle, p_scb->avdt_label, AVDT_ERR_UNSUP_CFG, 0);
bdcpy(reject.bd_addr, p_data->str_msg.bd_addr);
@@ -1968,7 +1968,7 @@
UINT8 policy = HCI_ENABLE_SNIFF_MODE;
UINT8 cur_role;
- APPL_TRACE_DEBUG3("bta_av_do_start sco_occupied:%d, role:x%x, started:%d", bta_av_cb.sco_occupied, p_scb->role, p_scb->started);
+ APPL_TRACE_DEBUG("bta_av_do_start sco_occupied:%d, role:x%x, started:%d", bta_av_cb.sco_occupied, p_scb->role, p_scb->started);
if (bta_av_cb.sco_occupied)
{
bta_av_start_failed(p_scb, p_data);
@@ -2004,7 +2004,7 @@
}
}
}
- APPL_TRACE_DEBUG2("started %d role:x%x", p_scb->started, p_scb->role);
+ APPL_TRACE_DEBUG("started %d role:x%x", p_scb->started, p_scb->role);
}
/*******************************************************************************
@@ -2024,7 +2024,7 @@
BT_HDR *p_buf;
UINT8 policy = HCI_ENABLE_SNIFF_MODE;
- APPL_TRACE_ERROR2("bta_av_str_stopped:audio_open_cnt=%d, p_data %x",
+ APPL_TRACE_ERROR("bta_av_str_stopped:audio_open_cnt=%d, p_data %x",
bta_av_cb.audio_open_cnt, p_data);
bta_sys_idle(BTA_ID_AV, bta_av_cb.audio_open_cnt, p_scb->peer_addr);
@@ -2057,7 +2057,7 @@
if (p_data && p_data->api_stop.suspend)
{
- APPL_TRACE_DEBUG2("suspending: %d, sup:%d", start, p_scb->suspend_sup);
+ APPL_TRACE_DEBUG("suspending: %d, sup:%d", start, p_scb->suspend_sup);
if ((start) && (p_scb->suspend_sup))
{
sus_evt = FALSE;
@@ -2077,7 +2077,7 @@
{
suspend_rsp.status = BTA_AV_SUCCESS;
suspend_rsp.initiator = TRUE;
- APPL_TRACE_EVENT1("bta_av_str_stopped status %d", suspend_rsp.status);
+ APPL_TRACE_EVENT("bta_av_str_stopped status %d", suspend_rsp.status);
/* send STOP_EVT event only if not in reconfiguring state */
if (p_scb->state != BTA_AV_RCFG_SST)
@@ -2105,7 +2105,7 @@
tBTA_AV_RECONFIG evt;
tBTA_AV_API_RCFG *p_rcfg = &p_data->api_reconfig;
- APPL_TRACE_DEBUG4("bta_av_reconfig r:%d, s:%d idx: %d (o:%d)",
+ APPL_TRACE_DEBUG("bta_av_reconfig r:%d, s:%d idx: %d (o:%d)",
p_scb->recfg_sup, p_scb->suspend_sup,
p_scb->rcfg_idx, p_scb->sep_info_idx);
@@ -2151,7 +2151,7 @@
}
else
{
- APPL_TRACE_DEBUG0("Reconfig");
+ APPL_TRACE_DEBUG("Reconfig");
AVDT_ReconfigReq(p_scb->avdt_handle, p_scb->p_cap);
p_scb->p_cap->psc_mask = p_scb->cur_psc_mask;
}
@@ -2159,7 +2159,7 @@
else
{
/* close the stream */
- APPL_TRACE_DEBUG1("close/open num_protect: %d", p_cfg->num_protect);
+ APPL_TRACE_DEBUG("close/open num_protect: %d", p_cfg->num_protect);
if(p_scb->started)
bta_av_str_stopped(p_scb, NULL);
p_scb->started = FALSE;
@@ -2194,7 +2194,7 @@
if (!p_scb->cong)
{
/*
- APPL_TRACE_ERROR1("q: %d", p_scb->l2c_bufs);
+ APPL_TRACE_ERROR("q: %d", p_scb->l2c_bufs);
*/
//Always get the current number of bufs que'd up
p_scb->l2c_bufs = (UINT8)L2CA_FlushChannel (p_scb->l2c_cid, L2CAP_FLUSH_CHANS_GET);
@@ -2230,7 +2230,7 @@
/* There's no need to increment it here, it is always read from L2CAP see above */
/* p_scb->l2c_bufs++; */
/*
- APPL_TRACE_ERROR1("qw: %d", p_scb->l2c_bufs);
+ APPL_TRACE_ERROR("qw: %d", p_scb->l2c_bufs);
*/
/* opt is a bit mask, it could have several options set */
@@ -2293,7 +2293,7 @@
UINT8 policy = HCI_ENABLE_SNIFF_MODE;
UINT8 cur_role;
- APPL_TRACE_DEBUG2("bta_av_start_ok wait:x%x, role:x%x", p_scb->wait, p_scb->role);
+ APPL_TRACE_DEBUG("bta_av_start_ok wait:x%x, role:x%x", p_scb->wait, p_scb->role);
p_scb->started = TRUE;
if (p_scb->sco_suspend)
@@ -2309,7 +2309,7 @@
&&(p_scb->seps[p_scb->sep_idx].tsep == AVDT_TSEP_SNK))
{
p_scb->wait &= ~(BTA_AV_WAIT_ACP_CAPS_ON);
- APPL_TRACE_DEBUG1(" Local SEP type is SNK new wait is 0x%x",p_scb->wait);
+ APPL_TRACE_DEBUG(" Local SEP type is SNK new wait is 0x%x",p_scb->wait);
}
if (p_scb->wait & BTA_AV_WAIT_ROLE_SW_FAILED)
{
@@ -2318,7 +2318,7 @@
p_data = (tBTA_AV_DATA *)&hdr;
hdr.offset = BTA_AV_RS_FAIL;
}
- APPL_TRACE_DEBUG1("wait:x%x", p_scb->wait);
+ APPL_TRACE_DEBUG("wait:x%x", p_scb->wait);
if (p_data && (p_data->hdr.offset != BTA_AV_RS_NONE))
{
@@ -2359,7 +2359,7 @@
if (p_scb->wait)
{
- APPL_TRACE_DEBUG2("wait:x%x q_tag:%d- not started", p_scb->wait, p_scb->q_tag);
+ APPL_TRACE_DEBUG("wait:x%x q_tag:%d- not started", p_scb->wait, p_scb->q_tag);
return;
}
@@ -2425,7 +2425,7 @@
p_scb->p_cos->start(p_scb->hndl, p_scb->codec_type, p_scb->cfg.codec_info, &p_scb->no_rtp_hdr);
p_scb->co_started = TRUE;
- APPL_TRACE_DEBUG3("bta_av_start_ok suspending: %d, role:x%x, init %d",
+ APPL_TRACE_DEBUG("bta_av_start_ok suspending: %d, role:x%x, init %d",
suspend, p_scb->role, initiator);
start.suspending = suspend;
@@ -2573,7 +2573,7 @@
UINT8 err_code = p_data->str_msg.msg.hdr.err_code;
UINT8 policy = HCI_ENABLE_SNIFF_MODE;
- APPL_TRACE_DEBUG2 ("bta_av_suspend_cfm:audio_open_cnt = %d, err_code = %d",
+ APPL_TRACE_DEBUG ("bta_av_suspend_cfm:audio_open_cnt = %d, err_code = %d",
bta_av_cb.audio_open_cnt, err_code);
if (p_scb->started == FALSE)
@@ -2581,7 +2581,7 @@
/* handle the condition where there is a collision of SUSPEND req from either side
** Second SUSPEND req could be rejected. Do not treat this as a failure
*/
- APPL_TRACE_WARNING1("bta_av_suspend_cfm: already suspended, ignore, err_code %d",
+ APPL_TRACE_WARNING("bta_av_suspend_cfm: already suspended, ignore, err_code %d",
err_code);
return;
}
@@ -2596,7 +2596,7 @@
}
suspend_rsp.status = BTA_AV_FAIL;
- APPL_TRACE_ERROR0 ("bta_av_suspend_cfm: suspend failed, closing connection");
+ APPL_TRACE_ERROR ("bta_av_suspend_cfm: suspend failed, closing connection");
/* SUSPEND failed. Close connection. */
bta_av_ssm_execute(p_scb, BTA_AV_API_CLOSE_EVT, NULL);
@@ -2653,7 +2653,7 @@
UNUSED(p_data);
p_scb->l2c_cid = AVDT_GetL2CapChannel(p_scb->avdt_handle);
- APPL_TRACE_DEBUG1("bta_av_rcfg_str_ok: l2c_cid: %d", p_scb->l2c_cid);
+ APPL_TRACE_DEBUG("bta_av_rcfg_str_ok: l2c_cid: %d", p_scb->l2c_cid);
/* rc listen */
bta_av_st_rc_timer(p_scb, NULL);
@@ -2686,7 +2686,7 @@
{
tBTA_AV_RECONFIG evt;
- APPL_TRACE_DEBUG2("bta_av_rcfg_failed num_recfg: %d, conn_lcb:0x%x",
+ APPL_TRACE_DEBUG("bta_av_rcfg_failed num_recfg: %d, conn_lcb:0x%x",
p_scb->num_recfg, bta_av_cb.conn_lcb);
if(p_scb->num_recfg > BTA_AV_RECONFIG_RETRY)
{
@@ -2729,7 +2729,7 @@
p_scb->cong = FALSE;
p_scb->num_recfg++;
- APPL_TRACE_DEBUG1("bta_av_rcfg_connect num_recfg: %d", p_scb->num_recfg);
+ APPL_TRACE_DEBUG("bta_av_rcfg_connect num_recfg: %d", p_scb->num_recfg);
if(p_scb->num_recfg > BTA_AV_RECONFIG_RETRY)
{
/* let bta_av_rcfg_failed report fail */
@@ -2753,7 +2753,7 @@
tBTA_AV_RECONFIG evt;
UNUSED(p_data);
- APPL_TRACE_DEBUG1("bta_av_rcfg_discntd num_recfg: %d", p_scb->num_recfg);
+ APPL_TRACE_DEBUG("bta_av_rcfg_discntd num_recfg: %d", p_scb->num_recfg);
p_scb->num_recfg++;
if(p_scb->num_recfg > BTA_AV_RECONFIG_RETRY)
{
@@ -2797,7 +2797,7 @@
}
else
{
- APPL_TRACE_ERROR0("suspend rejected, try close");
+ APPL_TRACE_ERROR("suspend rejected, try close");
/* Disable suspend feature only with explicit rejection(not with timeout) */
if (err_code != AVDT_ERR_TIMEOUT)
{
@@ -2811,7 +2811,7 @@
}
else
{
- APPL_TRACE_DEBUG0("bta_av_suspend_cont calling AVDT_ReconfigReq");
+ APPL_TRACE_DEBUG("bta_av_suspend_cont calling AVDT_ReconfigReq");
/* reconfig the stream */
AVDT_ReconfigReq(p_scb->avdt_handle, p_scb->p_cap);
@@ -2834,11 +2834,11 @@
UINT8 err_code = p_data->str_msg.msg.hdr.err_code;
/*
- APPL_TRACE_DEBUG0("bta_av_rcfg_cfm");
+ APPL_TRACE_DEBUG("bta_av_rcfg_cfm");
*/
if (err_code)
{
- APPL_TRACE_ERROR0("reconfig rejected, try close");
+ APPL_TRACE_ERROR("reconfig rejected, try close");
/* Disable reconfiguration feature only with explicit rejection(not with timeout) */
if (err_code != AVDT_ERR_TIMEOUT)
{
@@ -2871,7 +2871,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG1("bta_av_rcfg_open, num_disc_snks = %d", p_scb->num_disc_snks);
+ APPL_TRACE_DEBUG("bta_av_rcfg_open, num_disc_snks = %d", p_scb->num_disc_snks);
if (p_scb->num_disc_snks == 0)
{
@@ -2974,13 +2974,13 @@
{
tBTA_AV_START start;
- APPL_TRACE_DEBUG3("bta_av_open_rc use_rc: %d, wait: x%x role:x%x", p_scb->use_rc, p_scb->wait, p_scb->role);
+ APPL_TRACE_DEBUG("bta_av_open_rc use_rc: %d, wait: x%x role:x%x", p_scb->use_rc, p_scb->wait, p_scb->role);
if ((p_scb->wait & BTA_AV_WAIT_ROLE_SW_BITS) && (p_scb->q_tag == BTA_AV_Q_TAG_START))
{
/* waiting for role switch for some reason & the timer expires */
if (!bta_av_link_role_ok(p_scb, A2D_SET_ONE_BIT))
{
- APPL_TRACE_ERROR0 ("failed to start streaming for role management reasons!!");
+ APPL_TRACE_ERROR ("failed to start streaming for role management reasons!!");
bta_sys_stop_timer(&p_scb->timer);
start.chnl = p_scb->chnl;
start.status = BTA_AV_FAIL_ROLE;
diff --git a/bta/av/bta_av_act.c b/bta/av/bta_av_act.c
index 6320ea0..618aec4 100644
--- a/bta/av/bta_av_act.c
+++ b/bta/av/bta_av_act.c
@@ -100,7 +100,7 @@
p_scb = bta_av_cb.p_scb[p_rcb->shdl - 1];
if(p_scb)
{
- APPL_TRACE_DEBUG3("bta_av_del_rc shdl:%d, srch:%d rc_handle:%d", p_rcb->shdl,
+ APPL_TRACE_DEBUG("bta_av_del_rc shdl:%d, srch:%d rc_handle:%d", p_rcb->shdl,
p_scb->rc_handle, p_rcb->handle);
if(p_scb->rc_handle == p_rcb->handle)
p_scb->rc_handle = BTA_AV_RC_HANDLE_NONE;
@@ -110,7 +110,7 @@
}
}
- APPL_TRACE_EVENT4("bta_av_del_rc handle: %d status=0x%x, rc_acp_handle:%d, idx:%d",
+ APPL_TRACE_EVENT("bta_av_del_rc handle: %d status=0x%x, rc_acp_handle:%d, idx:%d",
p_rcb->handle, p_rcb->status, bta_av_cb.rc_acp_handle, bta_av_cb.rc_acp_idx);
rc_handle = p_rcb->handle;
if(!(p_rcb->status & BTA_AV_RC_CONN_MASK) ||
@@ -125,7 +125,7 @@
AVRC_Close(rc_handle);
if (rc_handle == bta_av_cb.rc_acp_handle)
bta_av_cb.rc_acp_handle = BTA_AV_RC_HANDLE_NONE;
- APPL_TRACE_EVENT4("end del_rc handle: %d status=0x%x, rc_acp_handle:%d, lidx:%d",
+ APPL_TRACE_EVENT("end del_rc handle: %d status=0x%x, rc_acp_handle:%d, lidx:%d",
p_rcb->handle, p_rcb->status, bta_av_cb.rc_acp_handle, p_rcb->lidx);
}
}
@@ -206,9 +206,9 @@
UNUSED(result);
#if (defined(BTA_AV_MIN_DEBUG_TRACES) && BTA_AV_MIN_DEBUG_TRACES == TRUE)
- APPL_TRACE_EVENT2("rc_ctrl handle: %d event=0x%x", handle, event);
+ APPL_TRACE_EVENT("rc_ctrl handle: %d event=0x%x", handle, event);
#else
- APPL_TRACE_EVENT2("bta_av_rc_ctrl_cback handle: %d event=0x%x", handle, event);
+ APPL_TRACE_EVENT("bta_av_rc_ctrl_cback handle: %d event=0x%x", handle, event);
#endif
if (event == AVRC_OPEN_IND_EVT)
{
@@ -252,9 +252,9 @@
UINT16 data_len = 0;
#if (defined(BTA_AV_MIN_DEBUG_TRACES) && BTA_AV_MIN_DEBUG_TRACES == TRUE)
- APPL_TRACE_ERROR2("rc_msg handle: %d opcode=0x%x", handle, opcode);
+ APPL_TRACE_ERROR("rc_msg handle: %d opcode=0x%x", handle, opcode);
#else
- APPL_TRACE_EVENT2("bta_av_rc_msg_cback handle: %d opcode=0x%x", handle, opcode);
+ APPL_TRACE_EVENT("bta_av_rc_msg_cback handle: %d opcode=0x%x", handle, opcode);
#endif
/* determine size of buffer we need */
if (opcode == AVRC_OP_VENDOR && p_msg->vendor.p_vendor_data != NULL)
@@ -314,7 +314,7 @@
{
if ((p_rcb = bta_av_get_rcb_by_shdl(shdl)) != NULL )
{
- APPL_TRACE_ERROR1("bta_av_rc_create ACP handle exist for shdl:%d", shdl);
+ APPL_TRACE_ERROR("bta_av_rc_create ACP handle exist for shdl:%d", shdl);
return p_rcb->handle;
}
}
@@ -335,7 +335,7 @@
if (p_rcb->handle != BTA_AV_RC_HANDLE_NONE)
{
- APPL_TRACE_ERROR1("bta_av_rc_create found duplicated handle:%d", rc_handle);
+ APPL_TRACE_ERROR("bta_av_rc_create found duplicated handle:%d", rc_handle);
}
p_rcb->handle = rc_handle;
@@ -348,9 +348,9 @@
/* this LIDX is reserved for the AVRCP ACP connection */
p_cb->rc_acp_handle = p_rcb->handle;
p_cb->rc_acp_idx = (i + 1);
- APPL_TRACE_DEBUG2("rc_acp_handle:%d idx:%d", p_cb->rc_acp_handle, p_cb->rc_acp_idx);
+ APPL_TRACE_DEBUG("rc_acp_handle:%d idx:%d", p_cb->rc_acp_handle, p_cb->rc_acp_idx);
}
- APPL_TRACE_DEBUG6("create %d, role: %d, shdl:%d, rc_handle:%d, lidx:%d, status:0x%x",
+ APPL_TRACE_DEBUG("create %d, role: %d, shdl:%d, rc_handle:%d, lidx:%d, status:0x%x",
i, role, shdl, p_rcb->handle, lidx, p_rcb->status);
return rc_handle;
@@ -463,7 +463,7 @@
if(op == BTA_AV_LCB_FREE)
{
p_cb->conn_lcb &= ~mask; /* clear the connect mask */
- APPL_TRACE_DEBUG1("conn_lcb: 0x%x", p_cb->conn_lcb);
+ APPL_TRACE_DEBUG("conn_lcb: 0x%x", p_cb->conn_lcb);
}
break;
}
@@ -498,9 +498,9 @@
if(p_scb && bdcmp(p_scb->peer_addr, p_data->rc_conn_chg.peer_addr) == 0)
{
p_scb->rc_handle = p_data->rc_conn_chg.handle;
- APPL_TRACE_DEBUG2("bta_av_rc_opened shdl:%d, srch %d", i + 1, p_scb->rc_handle);
+ APPL_TRACE_DEBUG("bta_av_rc_opened shdl:%d, srch %d", i + 1, p_scb->rc_handle);
shdl = i+1;
- APPL_TRACE_ERROR1("use_rc:%d", p_scb->use_rc);
+ APPL_TRACE_ERROR("use_rc:%d", p_scb->use_rc);
bta_sys_stop_timer(&p_scb->timer);
disc = p_scb->hndl;
break;
@@ -510,7 +510,7 @@
i = p_data->rc_conn_chg.handle;
if (p_cb->rcb[i].handle == BTA_AV_RC_HANDLE_NONE)
{
- APPL_TRACE_ERROR1("not a valid handle:%d any more", i);
+ APPL_TRACE_ERROR("not a valid handle:%d any more", i);
return;
}
@@ -528,14 +528,14 @@
p_cb->rcb[i].lidx = tmp;
p_cb->rc_acp_handle = p_rcb->handle;
p_cb->rc_acp_idx = (p_rcb - p_cb->rcb) + 1;
- APPL_TRACE_DEBUG2("switching RCB rc_acp_handle:%d idx:%d",
+ APPL_TRACE_DEBUG("switching RCB rc_acp_handle:%d idx:%d",
p_cb->rc_acp_handle, p_cb->rc_acp_idx);
}
}
p_cb->rcb[i].shdl = shdl;
rc_open.rc_handle = i;
- APPL_TRACE_ERROR4("bta_av_rc_opened rcb[%d] shdl:%d lidx:%d/%d",
+ APPL_TRACE_ERROR("bta_av_rc_opened rcb[%d] shdl:%d lidx:%d/%d",
i, shdl, p_cb->rcb[i].lidx, p_cb->lcb[BTA_AV_NUM_LINKS].lidx);
p_cb->rcb[i].status |= BTA_AV_RC_CONN_MASK;
@@ -545,14 +545,14 @@
* update the index to the extra LCB */
p_lcb = &p_cb->lcb[BTA_AV_NUM_LINKS];
bdcpy(p_lcb->addr, p_data->rc_conn_chg.peer_addr);
- APPL_TRACE_DEBUG6("rc_only bd_addr:%02x-%02x-%02x-%02x-%02x-%02x",
+ APPL_TRACE_DEBUG("rc_only bd_addr:%02x-%02x-%02x-%02x-%02x-%02x",
p_lcb->addr[0], p_lcb->addr[1],
p_lcb->addr[2], p_lcb->addr[3],
p_lcb->addr[4], p_lcb->addr[5]);
p_lcb->lidx = BTA_AV_NUM_LINKS + 1;
p_cb->rcb[i].lidx = p_lcb->lidx;
p_lcb->conn_msk = 1;
- APPL_TRACE_ERROR3("rcb[%d].lidx=%d, lcb.conn_msk=x%x",
+ APPL_TRACE_ERROR("rcb[%d].lidx=%d, lcb.conn_msk=x%x",
i, p_cb->rcb[i].lidx, p_lcb->conn_msk);
disc = p_data->rc_conn_chg.handle|BTA_AV_CHNL_MSK;
}
@@ -560,7 +560,7 @@
bdcpy(rc_open.peer_addr, p_data->rc_conn_chg.peer_addr);
rc_open.peer_features = p_cb->rcb[i].peer_features;
rc_open.status = BTA_AV_SUCCESS;
- APPL_TRACE_DEBUG2("local features:x%x peer_features:x%x", p_cb->features,
+ APPL_TRACE_DEBUG("local features:x%x peer_features:x%x", p_cb->features,
rc_open.peer_features);
if(rc_open.peer_features == 0)
{
@@ -777,7 +777,7 @@
/* Metadata messages only use PANEL sub-unit type */
if (p_vendor->hdr.subunit_type != AVRC_SUB_PANEL)
{
- APPL_TRACE_DEBUG0("SUBUNIT must be PANEL");
+ APPL_TRACE_DEBUG("SUBUNIT must be PANEL");
/* reject it */
evt=0;
p_vendor->hdr.ctype = BTA_AV_RSP_NOT_IMPL;
@@ -785,7 +785,7 @@
}
else if (!AVRC_IsValidAvcType(pdu, p_vendor->hdr.ctype) )
{
- APPL_TRACE_DEBUG2("Invalid pdu/ctype: 0x%x, %d", pdu, p_vendor->hdr.ctype);
+ APPL_TRACE_DEBUG("Invalid pdu/ctype: 0x%x, %d", pdu, p_vendor->hdr.ctype);
/* reject invalid message without reporting to app */
evt = 0;
p_rc_rsp->rsp.status = AVRC_STS_BAD_CMD;
@@ -824,7 +824,7 @@
}
else
{
- APPL_TRACE_DEBUG1("Invalid capability ID: 0x%x", u8);
+ APPL_TRACE_DEBUG("Invalid capability ID: 0x%x", u8);
/* reject - unknown capability ID */
p_rc_rsp->get_caps.status = AVRC_STS_BAD_PARAM;
}
@@ -842,7 +842,7 @@
}
}
#else
- APPL_TRACE_DEBUG0("AVRCP 1.3 Metadata not supporteed. Reject command.");
+ APPL_TRACE_DEBUG("AVRCP 1.3 Metadata not supporteed. Reject command.");
/* reject invalid message without reporting to app */
evt = 0;
p_rc_rsp->rsp.status = AVRC_STS_BAD_CMD;
@@ -900,7 +900,7 @@
p_data->rc_msg.msg.hdr.ctype = bta_av_op_supported(p_data->rc_msg.msg.pass.op_id, is_inquiry);
}
- APPL_TRACE_DEBUG1("ctype %d",p_data->rc_msg.msg.hdr.ctype)
+ APPL_TRACE_DEBUG("ctype %d",p_data->rc_msg.msg.hdr.ctype)
/* send response */
if (p_data->rc_msg.msg.hdr.ctype != BTA_AV_RSP_INTERIM)
@@ -1031,7 +1031,7 @@
{
p_rcb = &p_cb->rcb[handle];
- APPL_TRACE_DEBUG2("bta_av_rc_close handle: %d, status=0x%x", p_rcb->handle, p_rcb->status);
+ APPL_TRACE_DEBUG("bta_av_rc_close handle: %d, status=0x%x", p_rcb->handle, p_rcb->status);
if(p_rcb->handle != BTA_AV_RC_HANDLE_NONE)
{
if(p_rcb->shdl)
@@ -1092,7 +1092,7 @@
tBTA_AV_SCB *p_scbi;
started_msk = BTA_AV_HNDL_TO_MSK(p_scb->hdi);
- APPL_TRACE_DEBUG3 ("bta_av_stream_chg started:%d started_msk:x%x chnl:x%x", started,
+ APPL_TRACE_DEBUG ("bta_av_stream_chg started:%d started_msk:x%x chnl:x%x", started,
started_msk, p_scb->chnl);
if (BTA_AV_CHNL_AUDIO == p_scb->chnl)
p_streams = &bta_av_cb.audio_streams;
@@ -1138,7 +1138,7 @@
}
}
- APPL_TRACE_DEBUG4 ("no_streams:%d i:%d, audio_streams:x%x, video_streams:x%x", no_streams, i,
+ APPL_TRACE_DEBUG ("no_streams:%d i:%d, audio_streams:x%x, video_streams:x%x", no_streams, i,
bta_av_cb.audio_streams, bta_av_cb.video_streams);
if (no_streams)
{
@@ -1192,7 +1192,7 @@
if (bta_av_cb.rcb[i].lidx == p_lcb->lidx)
{
bta_av_cb.rcb[i].shdl = index + 1;
- APPL_TRACE_DEBUG5("conn_chg up[%d]: %d, status=0x%x, shdl:%d, lidx:%d", i,
+ APPL_TRACE_DEBUG("conn_chg up[%d]: %d, status=0x%x, shdl:%d, lidx:%d", i,
bta_av_cb.rcb[i].handle, bta_av_cb.rcb[i].status,
bta_av_cb.rcb[i].shdl, bta_av_cb.rcb[i].lidx);
break;
@@ -1217,18 +1217,18 @@
}
- APPL_TRACE_DEBUG2("rc_acp_handle:%d rc_acp_idx:%d", p_cb->rc_acp_handle, p_cb->rc_acp_idx);
+ APPL_TRACE_DEBUG("rc_acp_handle:%d rc_acp_idx:%d", p_cb->rc_acp_handle, p_cb->rc_acp_idx);
/* check if the AVRCP ACP channel is already connected */
if(p_lcb && p_cb->rc_acp_handle != BTA_AV_RC_HANDLE_NONE && p_cb->rc_acp_idx)
{
p_lcb_rc = &p_cb->lcb[BTA_AV_NUM_LINKS];
- APPL_TRACE_DEBUG1("rc_acp is connected && conn_chg on same addr p_lcb_rc->conn_msk:x%x",
+ APPL_TRACE_DEBUG("rc_acp is connected && conn_chg on same addr p_lcb_rc->conn_msk:x%x",
p_lcb_rc->conn_msk);
/* check if the RC is connected to the scb addr */
- APPL_TRACE_DEBUG6 ("p_lcb_rc->addr: %02x:%02x:%02x:%02x:%02x:%02x",
+ APPL_TRACE_DEBUG ("p_lcb_rc->addr: %02x:%02x:%02x:%02x:%02x:%02x",
p_lcb_rc->addr[0], p_lcb_rc->addr[1], p_lcb_rc->addr[2], p_lcb_rc->addr[3],
p_lcb_rc->addr[4], p_lcb_rc->addr[5]);
- APPL_TRACE_DEBUG6 ("conn_chg.peer_addr: %02x:%02x:%02x:%02x:%02x:%02x",
+ APPL_TRACE_DEBUG ("conn_chg.peer_addr: %02x:%02x:%02x:%02x:%02x:%02x",
p_data->conn_chg.peer_addr[0], p_data->conn_chg.peer_addr[1],
p_data->conn_chg.peer_addr[2],
p_data->conn_chg.peer_addr[3], p_data->conn_chg.peer_addr[4],
@@ -1242,7 +1242,7 @@
p_scb->rc_handle = p_cb->rc_acp_handle;
p_rcb = &p_cb->rcb[p_cb->rc_acp_idx - 1];
p_rcb->shdl = bta_av_get_shdl(p_scb);
- APPL_TRACE_DEBUG3("update rc_acp shdl:%d/%d srch:%d", index + 1, p_rcb->shdl,
+ APPL_TRACE_DEBUG("update rc_acp shdl:%d/%d srch:%d", index + 1, p_rcb->shdl,
p_scb->rc_handle );
p_rcb2 = bta_av_get_rcb_by_shdl(p_rcb->shdl);
@@ -1251,14 +1251,14 @@
/* found the RCB that was created to associated with this SCB */
p_cb->rc_acp_handle = p_rcb2->handle;
p_cb->rc_acp_idx = (p_rcb2 - p_cb->rcb) + 1;
- APPL_TRACE_DEBUG2("new rc_acp_handle:%d, idx:%d", p_cb->rc_acp_handle,
+ APPL_TRACE_DEBUG("new rc_acp_handle:%d, idx:%d", p_cb->rc_acp_handle,
p_cb->rc_acp_idx);
p_rcb2->lidx = (BTA_AV_NUM_LINKS + 1);
- APPL_TRACE_DEBUG3("rc2 handle:%d lidx:%d/%d",p_rcb2->handle, p_rcb2->lidx,
+ APPL_TRACE_DEBUG("rc2 handle:%d lidx:%d/%d",p_rcb2->handle, p_rcb2->lidx,
p_cb->lcb[p_rcb2->lidx-1].lidx);
}
p_rcb->lidx = p_lcb->lidx;
- APPL_TRACE_DEBUG3("rc handle:%d lidx:%d/%d",p_rcb->handle, p_rcb->lidx,
+ APPL_TRACE_DEBUG("rc handle:%d lidx:%d/%d",p_rcb->handle, p_rcb->lidx,
p_cb->lcb[p_rcb->lidx-1].lidx);
}
}
@@ -1297,10 +1297,10 @@
}
}
- APPL_TRACE_DEBUG1("bta_av_conn_chg shdl:%d", index + 1);
+ APPL_TRACE_DEBUG("bta_av_conn_chg shdl:%d", index + 1);
for (i=0; i<BTA_AV_NUM_RCB; i++)
{
- APPL_TRACE_DEBUG5("conn_chg dn[%d]: %d, status=0x%x, shdl:%d, lidx:%d", i,
+ APPL_TRACE_DEBUG("conn_chg dn[%d]: %d, status=0x%x, shdl:%d, lidx:%d", i,
bta_av_cb.rcb[i].handle, bta_av_cb.rcb[i].status,
bta_av_cb.rcb[i].shdl, bta_av_cb.rcb[i].lidx);
if(bta_av_cb.rcb[i].shdl == index + 1)
@@ -1322,7 +1322,7 @@
bta_av_rc_create(&bta_av_cb, AVCT_ACP, 0, BTA_AV_NUM_LINKS + 1);
}
- APPL_TRACE_DEBUG6("bta_av_conn_chg audio:%x video:%x up:%d conn_msk:0x%x chk_restore:%d audio_open_cnt:%d",
+ APPL_TRACE_DEBUG("bta_av_conn_chg audio:%x video:%x up:%d conn_msk:0x%x chk_restore:%d audio_open_cnt:%d",
p_cb->conn_audio, p_cb->conn_video, p_data->conn_chg.is_up, conn_msk, chk_restore, p_cb->audio_open_cnt);
if (chk_restore)
@@ -1417,7 +1417,7 @@
UINT8 mask;
tBTA_AV_LCB *p_lcb = NULL;
- APPL_TRACE_DEBUG1("bta_av_sig_chg event: %d", event);
+ APPL_TRACE_DEBUG("bta_av_sig_chg event: %d", event);
if(event == AVDT_CONNECT_IND_EVT)
{
p_lcb = bta_av_find_lcb(p_data->str_msg.bd_addr, BTA_AV_LCB_FIND);
@@ -1427,7 +1427,7 @@
for(xx=0; xx<BTA_AV_NUM_LINKS; xx++)
{
mask = 1 << xx;
- APPL_TRACE_DEBUG1("conn_lcb: 0x%x", p_cb->conn_lcb);
+ APPL_TRACE_DEBUG("conn_lcb: 0x%x", p_cb->conn_lcb);
/* look for a p_lcb with its p_scb registered */
if((!(mask & p_cb->conn_lcb)) && (p_cb->p_scb[xx] != NULL))
@@ -1443,10 +1443,10 @@
}
/* this entry is not used yet. */
p_cb->conn_lcb |= mask; /* mark it as used */
- APPL_TRACE_DEBUG1("start sig timer %d", p_data->hdr.offset);
+ APPL_TRACE_DEBUG("start sig timer %d", p_data->hdr.offset);
if (p_data->hdr.offset == AVDT_ACP)
{
- APPL_TRACE_DEBUG1("Incoming L2CAP acquired, set state as incoming", NULL);
+ APPL_TRACE_DEBUG("Incoming L2CAP acquired, set state as incoming", NULL);
bdcpy(p_cb->p_scb[xx]->peer_addr, p_data->str_msg.bd_addr);
p_cb->p_scb[xx]->use_rc = TRUE; /* allowing RC for incoming connection */
bta_av_ssm_execute(p_cb->p_scb[xx], BTA_AV_ACP_CONNECT_EVT, p_data);
@@ -1474,7 +1474,7 @@
{
/* We do not have scb for this avdt connection. */
/* Silently close the connection. */
- APPL_TRACE_ERROR0("av scb not available for avdt connection");
+ APPL_TRACE_ERROR("av scb not available for avdt connection");
AVDT_DisconnectReq (p_data->str_msg.bd_addr, NULL);
return;
}
@@ -1492,7 +1492,7 @@
p_lcb = bta_av_find_lcb(p_data->str_msg.bd_addr, BTA_AV_LCB_FREE);
if(p_lcb && p_lcb->conn_msk)
{
- APPL_TRACE_DEBUG1("conn_msk: 0x%x", p_lcb->conn_msk);
+ APPL_TRACE_DEBUG("conn_msk: 0x%x", p_lcb->conn_msk);
/* clean up ssm */
for(xx=0; xx < BTA_AV_NUM_STRS; xx++)
{
@@ -1505,7 +1505,7 @@
}
}
}
- APPL_TRACE_DEBUG1("conn_lcb: 0x%x", p_cb->conn_lcb);
+ APPL_TRACE_DEBUG("conn_lcb: 0x%x", p_cb->conn_lcb);
}
/*******************************************************************************
@@ -1528,7 +1528,7 @@
tBTA_AV_PEND pend;
UNUSED(p_data);
- APPL_TRACE_DEBUG0("bta_av_sig_timer");
+ APPL_TRACE_DEBUG("bta_av_sig_timer");
for(xx=0; xx<BTA_AV_NUM_LINKS; xx++)
{
mask = 1 << xx;
@@ -1565,7 +1565,7 @@
if (p_scb)
{
- APPL_TRACE_DEBUG1("bta_av_acp_sig_timer_cback, coll_mask = 0x%02X", p_scb->coll_mask);
+ APPL_TRACE_DEBUG("bta_av_acp_sig_timer_cback, coll_mask = 0x%02X", p_scb->coll_mask);
if (p_scb->coll_mask & BTA_AV_COLL_INC_TMR)
{
@@ -1628,7 +1628,7 @@
UINT16 peer_rc_version=0;
UINT16 categories = 0;
- APPL_TRACE_DEBUG1("bta_av_check_peer_features service_uuid:x%x", service_uuid);
+ APPL_TRACE_DEBUG("bta_av_check_peer_features service_uuid:x%x", service_uuid);
/* loop through all records we found */
while (TRUE)
{
@@ -1655,7 +1655,7 @@
{
/* get profile version (if failure, version parameter is not updated) */
SDP_FindProfileVersionInRec(p_rec, UUID_SERVCLASS_AV_REMOTE_CONTROL, &peer_rc_version);
- APPL_TRACE_DEBUG1("peer_rc_version 0x%x", peer_rc_version);
+ APPL_TRACE_DEBUG("peer_rc_version 0x%x", peer_rc_version);
if (peer_rc_version >= AVRC_REV_1_3)
peer_features |= (BTA_AV_FEAT_VENDOR | BTA_AV_FEAT_METADATA);
@@ -1674,7 +1674,7 @@
}
}
}
- APPL_TRACE_DEBUG1("peer_features:x%x", peer_features);
+ APPL_TRACE_DEBUG("peer_features:x%x", peer_features);
return peer_features;
}
@@ -1699,7 +1699,7 @@
tBTA_AV_FEAT peer_features; /* peer features mask */
UNUSED(p_data);
- APPL_TRACE_DEBUG1("bta_av_rc_disc_done disc:x%x", p_cb->disc);
+ APPL_TRACE_DEBUG("bta_av_rc_disc_done disc:x%x", p_cb->disc);
if (!p_cb->disc)
{
return;
@@ -1722,7 +1722,7 @@
}
}
- APPL_TRACE_DEBUG1("rc_handle %d", rc_handle);
+ APPL_TRACE_DEBUG("rc_handle %d", rc_handle);
/* check peer version and whether support CT and TG role */
peer_features = bta_av_check_peer_features (UUID_SERVCLASS_AV_REMOTE_CONTROL);
if ((p_cb->features & BTA_AV_FEAT_ADV_CTRL) && ((peer_features&BTA_AV_FEAT_ADV_CTRL) == 0))
@@ -1735,7 +1735,7 @@
p_cb->disc = 0;
utl_freebuf((void **) &p_cb->p_disc_db);
- APPL_TRACE_DEBUG2("peer_features 0x%x, features 0x%x", peer_features, p_cb->features);
+ APPL_TRACE_DEBUG("peer_features 0x%x, features 0x%x", peer_features, p_cb->features);
/* if we have no rc connection */
if (rc_handle == BTA_AV_RC_HANDLE_NONE)
@@ -1755,7 +1755,7 @@
#if (BT_USE_TRACES == TRUE || BT_TRACE_APPL == TRUE)
else
{
- APPL_TRACE_ERROR0("can not find LCB!!");
+ APPL_TRACE_ERROR("can not find LCB!!");
}
#endif
}
@@ -1800,17 +1800,17 @@
tBTA_AV_LCB *p_lcb;
rc_close.rc_handle = BTA_AV_RC_HANDLE_NONE;
- APPL_TRACE_DEBUG1("bta_av_rc_closed rc_handle:%d", p_msg->handle);
+ APPL_TRACE_DEBUG("bta_av_rc_closed rc_handle:%d", p_msg->handle);
for(i=0; i<BTA_AV_NUM_RCB; i++)
{
p_rcb = &p_cb->rcb[i];
- APPL_TRACE_DEBUG3("bta_av_rc_closed rcb[%d] rc_handle:%d, status=0x%x", i, p_rcb->handle, p_rcb->status);
+ APPL_TRACE_DEBUG("bta_av_rc_closed rcb[%d] rc_handle:%d, status=0x%x", i, p_rcb->handle, p_rcb->status);
if(p_rcb->handle == p_msg->handle)
{
rc_close.rc_handle = i;
p_rcb->status &= ~BTA_AV_RC_CONN_MASK;
p_rcb->peer_features = 0;
- APPL_TRACE_DEBUG2(" shdl:%d, lidx:%d", p_rcb->shdl, p_rcb->lidx);
+ APPL_TRACE_DEBUG(" shdl:%d, lidx:%d", p_rcb->shdl, p_rcb->lidx);
if(p_rcb->shdl)
{
p_scb = bta_av_cb.p_scb[p_rcb->shdl - 1];
@@ -1819,7 +1819,7 @@
bdcpy(rc_close.peer_addr, p_scb->peer_addr);
if(p_scb->rc_handle == p_rcb->handle)
p_scb->rc_handle = BTA_AV_RC_HANDLE_NONE;
- APPL_TRACE_DEBUG2("shdl:%d, srch:%d", p_rcb->shdl, p_scb->rc_handle);
+ APPL_TRACE_DEBUG("shdl:%d, srch:%d", p_rcb->shdl, p_scb->rc_handle);
}
p_rcb->shdl = 0;
}
@@ -1828,7 +1828,7 @@
/* if the RCB uses the extra LCB, use the addr for event and clean it */
p_lcb = &p_cb->lcb[BTA_AV_NUM_LINKS];
bdcpy(rc_close.peer_addr, p_msg->peer_addr);
- APPL_TRACE_DEBUG6("rc_only closed bd_addr:%02x-%02x-%02x-%02x-%02x-%02x",
+ APPL_TRACE_DEBUG("rc_only closed bd_addr:%02x-%02x-%02x-%02x-%02x-%02x",
p_msg->peer_addr[0], p_msg->peer_addr[1],
p_msg->peer_addr[2], p_msg->peer_addr[3],
p_msg->peer_addr[4], p_msg->peer_addr[5]);
@@ -1895,7 +1895,7 @@
UINT8 *p_addr = NULL;
UINT8 rc_handle;
- APPL_TRACE_DEBUG2("bta_av_rc_disc 0x%x, %d", disc, bta_av_cb.disc);
+ APPL_TRACE_DEBUG("bta_av_rc_disc 0x%x, %d", disc, bta_av_cb.disc);
if ((bta_av_cb.disc != 0) || (disc == 0))
return;
@@ -1915,7 +1915,7 @@
if (p_scb)
{
- APPL_TRACE_DEBUG1("rc_handle %d", p_scb->rc_handle);
+ APPL_TRACE_DEBUG("rc_handle %d", p_scb->rc_handle);
p_addr = p_scb->peer_addr;
}
}
@@ -1941,7 +1941,7 @@
bta_av_avrc_sdp_cback) == AVRC_SUCCESS)
{
p_cb->disc = disc;
- APPL_TRACE_DEBUG1("disc %d", p_cb->disc);
+ APPL_TRACE_DEBUG("disc %d", p_cb->disc);
}
}
}
@@ -1969,7 +1969,7 @@
if(p_scb)
{
- APPL_TRACE_DEBUG2("deregistered %d(h%d)", p_scb->chnl, p_scb->hndl);
+ APPL_TRACE_DEBUG("deregistered %d(h%d)", p_scb->chnl, p_scb->hndl);
mask = BTA_AV_HNDL_TO_MSK(p_scb->hdi);
if(p_scb->chnl == BTA_AV_CHNL_AUDIO)
{
@@ -2018,7 +2018,7 @@
utl_freebuf((void **)&p_cb->p_scb[p_scb->hdi]);
}
- APPL_TRACE_DEBUG3("audio 0x%x, video: 0x%x, disable:%d",
+ APPL_TRACE_DEBUG("audio 0x%x, video: 0x%x, disable:%d",
p_cb->reg_audio, p_cb->reg_video, p_cb->disabling);
/* if no stream control block is active */
if((p_cb->reg_audio + p_cb->reg_video) == 0)
diff --git a/bta/av/bta_av_main.c b/bta/av/bta_av_main.c
index 20ed161..e332cac 100644
--- a/bta/av/bta_av_main.c
+++ b/bta/av/bta_av_main.c
@@ -350,7 +350,7 @@
{
if(p_bta_av_cfg->p_act_tbl == NULL || p_bta_av_cfg->p_reg == NULL)
{
- APPL_TRACE_ERROR0("Video streaming not supported");
+ APPL_TRACE_ERROR("Video streaming not supported");
sts = BTA_AV_FAIL;
}
else
@@ -358,14 +358,14 @@
/* allow only one Video channel */
if(bta_av_cb.reg_video)
{
- APPL_TRACE_ERROR0("Already registered");
+ APPL_TRACE_ERROR("Already registered");
sts = BTA_AV_FAIL;
}
}
}
else if(chnl != BTA_AV_CHNL_AUDIO)
{
- APPL_TRACE_ERROR1("bad channel: %d", chnl);
+ APPL_TRACE_ERROR("bad channel: %d", chnl);
sts = BTA_AV_FAIL;
}
@@ -415,7 +415,7 @@
#if (defined(BTA_AV_DEBUG) && BTA_AV_DEBUG == TRUE)
else if (AVDT_CONNECT_IND_EVT == event)
{
- APPL_TRACE_DEBUG1("CONN_IND is ACP:%d", p_data->hdr.err_param);
+ APPL_TRACE_DEBUG("CONN_IND is ACP:%d", p_data->hdr.err_param);
}
#endif
@@ -433,10 +433,10 @@
#if (defined(BTA_AV_DEBUG) && BTA_AV_DEBUG == TRUE)
if(p_scb)
{
- APPL_TRACE_DEBUG2("scb hndl x%x, role x%x", p_scb->hndl, p_scb->role);
+ APPL_TRACE_DEBUG("scb hndl x%x, role x%x", p_scb->hndl, p_scb->role);
}
#endif
- APPL_TRACE_DEBUG6("conn_cback bd_addr:%02x-%02x-%02x-%02x-%02x-%02x",
+ APPL_TRACE_DEBUG("conn_cback bd_addr:%02x-%02x-%02x-%02x-%02x-%02x",
bd_addr[0], bd_addr[1],
bd_addr[2], bd_addr[3],
bd_addr[4], bd_addr[5]);
@@ -482,7 +482,7 @@
{
UINT16 activate_sink = 0;
activate_sink = p_data->hdr.layer_specific;
- APPL_TRACE_DEBUG1("bta_av_api_sink_enable %d ", activate_sink)
+ APPL_TRACE_DEBUG("bta_av_api_sink_enable %d ", activate_sink)
char p_service_name[BTA_SERVICE_NAME_LEN+1];
BCM_STRNCPY_S(p_service_name, sizeof(p_service_name),
BTIF_AVK_SERVICE_NAME, BTA_SERVICE_NAME_LEN);
@@ -544,7 +544,7 @@
p_scb = bta_av_alloc_scb(registr.chnl);
if(p_scb == NULL)
{
- APPL_TRACE_ERROR0("failed to alloc SCB");
+ APPL_TRACE_ERROR("failed to alloc SCB");
break;
}
@@ -607,7 +607,7 @@
*/
cs.nsc_mask = AVDT_NSC_RECONFIG |
((bta_av_cb.features & BTA_AV_FEAT_PROTECT) ? 0 : AVDT_NSC_SECURITY);
- APPL_TRACE_DEBUG1("nsc_mask: 0x%x", cs.nsc_mask);
+ APPL_TRACE_DEBUG("nsc_mask: 0x%x", cs.nsc_mask);
if (p_data->api_reg.p_service_name[0] == 0)
{
@@ -658,7 +658,7 @@
cs.tsep = AVDT_TSEP_SNK;
cs.p_data_cback = bta_av_stream_data_cback;
}
- APPL_TRACE_DEBUG1(" SEP Type = %d",cs.tsep);
+ APPL_TRACE_DEBUG(" SEP Type = %d",cs.tsep);
#endif
if(AVDT_CreateStream(&p_scb->seps[index].av_handle, &cs) == AVDT_SUCCESS)
{
@@ -672,7 +672,7 @@
p_scb->seps[index].p_app_data_cback = NULL; /* In case of A2DP SOURCE we don't need a callback to handle media packets */
#endif
- APPL_TRACE_DEBUG3("audio[%d] av_handle: %d codec_type: %d",
+ APPL_TRACE_DEBUG("audio[%d] av_handle: %d codec_type: %d",
index, p_scb->seps[index].av_handle, p_scb->seps[index].codec_type);
index++;
}
@@ -722,7 +722,7 @@
}
}
bta_av_cb.reg_audio |= BTA_AV_HNDL_TO_MSK(p_scb->hdi);
- APPL_TRACE_DEBUG1("reg_audio: 0x%x",bta_av_cb.reg_audio);
+ APPL_TRACE_DEBUG("reg_audio: 0x%x",bta_av_cb.reg_audio);
}
else
{
@@ -886,7 +886,7 @@
int i;
UINT8 mask;
- APPL_TRACE_DEBUG1("reg_audio: 0x%x",bta_av_cb.reg_audio);
+ APPL_TRACE_DEBUG("reg_audio: 0x%x",bta_av_cb.reg_audio);
for(i=0; i<BTA_AV_NUM_STRS; i++)
{
mask = BTA_AV_HNDL_TO_MSK(i);
@@ -919,7 +919,7 @@
UINT8 peer_idx = 0;
UNUSED(status);
- APPL_TRACE_DEBUG1("bta_av_sys_rs_cback: %d", bta_av_cb.rs_idx);
+ APPL_TRACE_DEBUG("bta_av_sys_rs_cback: %d", bta_av_cb.rs_idx);
for(i=0; i<BTA_AV_NUM_STRS; i++)
{
/* loop through all the SCBs to find matching peer addresses and report the role change event */
@@ -928,7 +928,7 @@
if (p_scb && (bdcmp (peer_addr, p_scb->peer_addr) == 0) &&
(p_buf = (tBTA_AV_ROLE_RES *) GKI_getbuf(sizeof(tBTA_AV_ROLE_RES))) != NULL)
{
- APPL_TRACE_DEBUG3("new_role:%d, hci_status:x%x hndl: x%x", id, app_id, p_scb->hndl);
+ APPL_TRACE_DEBUG("new_role:%d, hci_status:x%x hndl: x%x", id, app_id, p_scb->hndl);
/*
if ((id != BTM_ROLE_MASTER) && (app_id != HCI_SUCCESS))
{
@@ -960,7 +960,7 @@
p_scb = bta_av_cb.p_scb[bta_av_cb.rs_idx - 1];
if (p_scb && p_scb->q_tag == BTA_AV_Q_TAG_OPEN)
{
- APPL_TRACE_DEBUG3 ("bta_av_sys_rs_cback: rs_idx(%d), hndl:x%x q_tag: %d",
+ APPL_TRACE_DEBUG ("bta_av_sys_rs_cback: rs_idx(%d), hndl:x%x q_tag: %d",
bta_av_cb.rs_idx, p_scb->hndl, p_scb->q_tag);
if(HCI_SUCCESS == app_id || HCI_ERR_NO_CONNECTION == app_id)
@@ -996,7 +996,7 @@
UNUSED(app_id);
UNUSED(peer_addr);
- APPL_TRACE_DEBUG2("bta_av_sco_chg_cback:%d status:%d", id, status);
+ APPL_TRACE_DEBUG("bta_av_sco_chg_cback:%d status:%d", id, status);
if(id)
{
bta_av_cb.sco_occupied = TRUE;
@@ -1008,7 +1008,7 @@
if( p_scb && p_scb->co_started && (p_scb->sco_suspend == FALSE))
{
- APPL_TRACE_DEBUG1("suspending scb:%d", i);
+ APPL_TRACE_DEBUG("suspending scb:%d", i);
/* scb is used and started, not suspended automatically */
p_scb->sco_suspend = TRUE;
stop.flush = FALSE;
@@ -1027,7 +1027,7 @@
if( p_scb && p_scb->sco_suspend ) /* scb is used and suspended for SCO */
{
- APPL_TRACE_DEBUG1("starting scb:%d", i);
+ APPL_TRACE_DEBUG("starting scb:%d", i);
bta_av_ssm_execute(p_scb, BTA_AV_AP_START_EVT, NULL);
}
}
@@ -1101,7 +1101,7 @@
if (BTM_GetRole(p_scb->peer_addr, &role) == BTM_SUCCESS)
{
- APPL_TRACE_ERROR5("bta_av_link_role_ok hndl:x%x role:%d, conn_audio:x%x, bits:%d, features:x%x", p_scb->hndl, role, bta_av_cb.conn_audio, bits, bta_av_cb.features);
+ APPL_TRACE_ERROR("bta_av_link_role_ok hndl:x%x role:%d, conn_audio:x%x, bits:%d, features:x%x", p_scb->hndl, role, bta_av_cb.conn_audio, bits, bta_av_cb.features);
if (BTM_ROLE_MASTER != role && (A2D_BitsSet(bta_av_cb.conn_audio) > bits || (bta_av_cb.features & BTA_AV_FEAT_MASTER)))
{
if (bta_av_cb.features & BTA_AV_FEAT_MASTER)
@@ -1151,7 +1151,7 @@
if((p_scb != p_scbi) && p_scbi && (p_scbi->chnl == BTA_AV_CHNL_AUDIO) )
{
mask = BTA_AV_HNDL_TO_MSK(i);
- APPL_TRACE_DEBUG3("[%d] mtu: %d, mask:0x%x",
+ APPL_TRACE_DEBUG("[%d] mtu: %d, mask:0x%x",
i, p_scbi->stream_mtu, mask);
if(bta_av_cb.conn_audio & mask)
{
@@ -1161,7 +1161,7 @@
}
}
}
- APPL_TRACE_DEBUG3("bta_av_chk_mtu audio count:%d, conn_audio:0x%x, ret:%d",
+ APPL_TRACE_DEBUG("bta_av_chk_mtu audio count:%d, conn_audio:0x%x, ret:%d",
bta_av_cb.audio_open_cnt, bta_av_cb.conn_audio, ret_mtu);
}
return ret_mtu;
@@ -1234,10 +1234,10 @@
UINT8 action;
#if (defined(BTA_AV_DEBUG) && BTA_AV_DEBUG == TRUE)
- APPL_TRACE_EVENT4("AV event=0x%x(%s) state=%d(%s)",
+ APPL_TRACE_EVENT("AV event=0x%x(%s) state=%d(%s)",
event, bta_av_evt_code(event), p_cb->state, bta_av_st_code(p_cb->state));
#else
- APPL_TRACE_EVENT2("AV event=0x%x state=%d", event, p_cb->state);
+ APPL_TRACE_EVENT("AV event=0x%x state=%d", event, p_cb->state);
#endif
/* look up the state table for the current state */
@@ -1247,7 +1247,7 @@
/* set next state */
p_cb->state = state_table[event][BTA_AV_NEXT_STATE];
- APPL_TRACE_EVENT1("next state=%d", p_cb->state);
+ APPL_TRACE_EVENT("next state=%d", p_cb->state);
/* execute action functions */
if ((action = state_table[event][BTA_AV_ACTION_COL]) != BTA_AV_IGNORE)
@@ -1280,9 +1280,9 @@
if(event >= first_event)
{
#if (defined(BTA_AV_DEBUG) && BTA_AV_DEBUG == TRUE)
- APPL_TRACE_VERBOSE2("AV nsm event=0x%x(%s)", event, bta_av_evt_code(event));
+ APPL_TRACE_VERBOSE("AV nsm event=0x%x(%s)", event, bta_av_evt_code(event));
#else
- APPL_TRACE_VERBOSE1("AV nsm event=0x%x", event);
+ APPL_TRACE_VERBOSE("AV nsm event=0x%x", event);
#endif
/* non state machine events */
(*bta_av_nsm_act[event - BTA_AV_FIRST_NSM_EVT]) ((tBTA_AV_DATA *) p_msg);
@@ -1290,16 +1290,16 @@
else if (event >= BTA_AV_FIRST_SM_EVT && event <= BTA_AV_LAST_SM_EVT)
{
#if (defined(BTA_AV_DEBUG) && BTA_AV_DEBUG == TRUE)
- APPL_TRACE_VERBOSE2("AV sm event=0x%x(%s)", event, bta_av_evt_code(event));
+ APPL_TRACE_VERBOSE("AV sm event=0x%x(%s)", event, bta_av_evt_code(event));
#else
- APPL_TRACE_VERBOSE1("AV sm event=0x%x", event);
+ APPL_TRACE_VERBOSE("AV sm event=0x%x", event);
#endif
/* state machine events */
bta_av_sm_execute(&bta_av_cb, p_msg->event, (tBTA_AV_DATA *) p_msg);
}
else
{
- APPL_TRACE_VERBOSE1("handle=0x%x", p_msg->layer_specific);
+ APPL_TRACE_VERBOSE("handle=0x%x", p_msg->layer_specific);
/* stream state machine events */
bta_av_ssm_execute( bta_av_hndl_to_scb(p_msg->layer_specific),
p_msg->event, (tBTA_AV_DATA *) p_msg);
diff --git a/bta/av/bta_av_sbc.c b/bta/av/bta_av_sbc.c
index af1b3ec..dec24df 100644
--- a/bta/av/bta_av_sbc.c
+++ b/bta/av/bta_av_sbc.c
@@ -441,7 +441,7 @@
}
else
{
- APPL_TRACE_ERROR1("bta_av_sbc_cfg_for_cap: ch_mode(0x%02X) not supported", p_pref->ch_mode);
+ APPL_TRACE_ERROR("bta_av_sbc_cfg_for_cap: ch_mode(0x%02X) not supported", p_pref->ch_mode);
return A2D_FAIL;
}
@@ -452,7 +452,7 @@
}
else
{
- APPL_TRACE_ERROR1("bta_av_sbc_cfg_for_cap: samp_freq(0x%02X) not supported", p_pref->samp_freq);
+ APPL_TRACE_ERROR("bta_av_sbc_cfg_for_cap: samp_freq(0x%02X) not supported", p_pref->samp_freq);
return A2D_FAIL;
}
@@ -463,7 +463,7 @@
}
else
{
- APPL_TRACE_ERROR1("bta_av_sbc_cfg_for_cap: block_len(0x%02X) not supported", p_pref->block_len);
+ APPL_TRACE_ERROR("bta_av_sbc_cfg_for_cap: block_len(0x%02X) not supported", p_pref->block_len);
return A2D_FAIL;
}
@@ -474,7 +474,7 @@
}
else
{
- APPL_TRACE_ERROR1("bta_av_sbc_cfg_for_cap: num_subbands(0x%02X) not supported", p_pref->num_subbands);
+ APPL_TRACE_ERROR("bta_av_sbc_cfg_for_cap: num_subbands(0x%02X) not supported", p_pref->num_subbands);
return A2D_FAIL;
}
@@ -485,7 +485,7 @@
}
else
{
- APPL_TRACE_ERROR1("bta_av_sbc_cfg_for_cap: alloc_mthd(0x%02X) not supported", p_pref->alloc_mthd);
+ APPL_TRACE_ERROR("bta_av_sbc_cfg_for_cap: alloc_mthd(0x%02X) not supported", p_pref->alloc_mthd);
return A2D_FAIL;
}
@@ -527,19 +527,19 @@
/* parse configuration */
if ((status = A2D_ParsSbcInfo(&cfg_cie, p_cfg, TRUE)) != 0)
{
- APPL_TRACE_ERROR1(" bta_av_sbc_cfg_matches_cap Parsing Failed %d", status);
+ APPL_TRACE_ERROR(" bta_av_sbc_cfg_matches_cap Parsing Failed %d", status);
return status;
}
/* verify that each parameter is in range */
- APPL_TRACE_DEBUG2(" FREQ peer: 0%x, capability 0%x", cfg_cie.samp_freq, p_cap->samp_freq);
- APPL_TRACE_DEBUG2(" CH_MODE peer: 0%x, capability 0%x", cfg_cie.ch_mode, p_cap->ch_mode);
- APPL_TRACE_DEBUG2(" BLOCK_LEN peer: 0%x, capability 0%x", cfg_cie.block_len, p_cap->block_len);
- APPL_TRACE_DEBUG2(" SUB_BAND peer: 0%x, capability 0%x", cfg_cie.num_subbands, p_cap->num_subbands);
- APPL_TRACE_DEBUG2(" ALLOC_MTHD peer: 0%x, capability 0%x", cfg_cie.alloc_mthd, p_cap->alloc_mthd);
- APPL_TRACE_DEBUG2(" MAX_BitPool peer: 0%x, capability 0%x", cfg_cie.max_bitpool, p_cap->max_bitpool);
- APPL_TRACE_DEBUG2(" Min_bitpool peer: 0%x, capability 0%x", cfg_cie.min_bitpool, p_cap->min_bitpool);
+ APPL_TRACE_DEBUG(" FREQ peer: 0%x, capability 0%x", cfg_cie.samp_freq, p_cap->samp_freq);
+ APPL_TRACE_DEBUG(" CH_MODE peer: 0%x, capability 0%x", cfg_cie.ch_mode, p_cap->ch_mode);
+ APPL_TRACE_DEBUG(" BLOCK_LEN peer: 0%x, capability 0%x", cfg_cie.block_len, p_cap->block_len);
+ APPL_TRACE_DEBUG(" SUB_BAND peer: 0%x, capability 0%x", cfg_cie.num_subbands, p_cap->num_subbands);
+ APPL_TRACE_DEBUG(" ALLOC_MTHD peer: 0%x, capability 0%x", cfg_cie.alloc_mthd, p_cap->alloc_mthd);
+ APPL_TRACE_DEBUG(" MAX_BitPool peer: 0%x, capability 0%x", cfg_cie.max_bitpool, p_cap->max_bitpool);
+ APPL_TRACE_DEBUG(" Min_bitpool peer: 0%x, capability 0%x", cfg_cie.min_bitpool, p_cap->min_bitpool);
/* sampling frequency */
if ((cfg_cie.samp_freq & p_cap->samp_freq) == 0)
diff --git a/bta/av/bta_av_ssm.c b/bta/av/bta_av_ssm.c
index 5756c88..64ee42a 100644
--- a/bta/av/bta_av_ssm.c
+++ b/bta/av/bta_av_ssm.c
@@ -410,7 +410,7 @@
if(p_scb == NULL)
{
/* this stream is not registered */
- APPL_TRACE_EVENT0("AV channel not registered");
+ APPL_TRACE_EVENT("AV channel not registered");
return;
}
@@ -436,10 +436,10 @@
}
#if (defined(BTA_AV_DEBUG) && BTA_AV_DEBUG == TRUE)
- APPL_TRACE_VERBOSE5("AV Sevent(0x%x)=0x%x(%s) state=%d(%s)",
+ APPL_TRACE_VERBOSE("AV Sevent(0x%x)=0x%x(%s) state=%d(%s)",
p_scb->hndl, event, bta_av_evt_code(event), p_scb->state, bta_av_sst_code(p_scb->state));
#else
- APPL_TRACE_VERBOSE2("AV Sevent=0x%x state=%d", event, p_scb->state);
+ APPL_TRACE_VERBOSE("AV Sevent=0x%x state=%d", event, p_scb->state);
#endif
/* look up the state table for the current state */
diff --git a/bta/dm/bta_dm_act.c b/bta/dm/bta_dm_act.c
index 7da190a..e65ec20 100644
--- a/bta/dm/bta_dm_act.c
+++ b/bta/dm/bta_dm_act.c
@@ -257,7 +257,7 @@
/* if already in use, return an error */
if( bta_dm_cb.is_bta_dm_active == TRUE )
{
- APPL_TRACE_WARNING0("bta_dm_enable - device already started by another application");
+ APPL_TRACE_WARNING("bta_dm_enable - device already started by another application");
memset(&sec_event.enable, 0, sizeof ( tBTA_DM_ENABLE ));
sec_event.enable.status = BTA_FAILURE;
if( p_data->enable.p_sec_cback != NULL )
@@ -311,7 +311,7 @@
tBTA_BLE_LOCAL_ID_KEYS id_key;
tBT_UUID app_uuid = {LEN_UUID_128,{0}};
#endif
- APPL_TRACE_DEBUG1(" bta_dm_sys_hw_cback with event: %i" , status );
+ APPL_TRACE_DEBUG(" bta_dm_sys_hw_cback with event: %i" , status );
/* On H/W error evt, report to the registered DM application callback */
if (status == BTA_SYS_HW_ERROR_EVT) {
@@ -403,7 +403,7 @@
}
else
- APPL_TRACE_DEBUG0(" --- ignored event");
+ APPL_TRACE_DEBUG(" --- ignored event");
}
@@ -442,7 +442,7 @@
/* If BTA_DISABLE_DELAY is defined and greater than zero, then delay the shutdown by
* BTA_DISABLE_DELAY milliseconds
*/
- APPL_TRACE_WARNING2("%s BTA_DISABLE_DELAY set to %d ms",
+ APPL_TRACE_WARNING("%s BTA_DISABLE_DELAY set to %d ms",
__FUNCTION__, BTA_DISABLE_DELAY);
bta_sys_stop_timer(&bta_dm_cb.disable_timer);
bta_dm_cb.disable_timer.p_cback = (TIMER_CBACK*)&bta_dm_disable_conn_down_timer_cback;
@@ -478,7 +478,7 @@
tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
- APPL_TRACE_EVENT0(" bta_dm_disable_timer_cback ");
+ APPL_TRACE_EVENT(" bta_dm_disable_timer_cback ");
if(BTM_GetNumAclLinks())
{
@@ -628,7 +628,7 @@
{
if (BTM_WriteInquiryTxPower (p_data->tx_inq_pwr.tx_power) == BTM_ILLEGAL_VALUE)
{
- APPL_TRACE_ERROR1("Invalid Inquiry Tx Power: %d", p_data->tx_inq_pwr.tx_power);
+ APPL_TRACE_ERROR("Invalid Inquiry Tx Power: %d", p_data->tx_inq_pwr.tx_power);
}
return;
}
@@ -654,7 +654,7 @@
if ( BTM_IsAclConnectionUp(p_dev->bd_addr, BT_TRANSPORT_LE) ||
BTM_IsAclConnectionUp(p_dev->bd_addr, BT_TRANSPORT_BR_EDR))
{
- APPL_TRACE_DEBUG2("%s: ACL Up count %d", __FUNCTION__,bta_dm_cb.device_list.count);
+ APPL_TRACE_DEBUG("%s: ACL Up count %d", __FUNCTION__,bta_dm_cb.device_list.count);
/* Take the link down first, and mark the device for removal when disconnected */
for(i=0; i<bta_dm_cb.device_list.count; i++)
@@ -663,7 +663,7 @@
{
bta_dm_cb.device_list.peer_device[i].conn_state = BTA_DM_UNPAIRING;
btm_remove_acl( p_dev->bd_addr,bta_dm_cb.device_list.peer_device[i].transport);
- APPL_TRACE_DEBUG2("%s:transport = %d", __FUNCTION__,
+ APPL_TRACE_DEBUG("%s:transport = %d", __FUNCTION__,
bta_dm_cb.device_list.peer_device[i].transport);
break;
}
@@ -736,7 +736,7 @@
if (!BTM_SecAddDevice (p_dev->bd_addr, p_dc, p_dev->bd_name, p_dev->features,
trusted_services_mask, p_lc, p_dev->key_type, p_dev->io_cap))
{
- APPL_TRACE_ERROR2 ("BTA_DM: Error adding device %08x%04x",
+ APPL_TRACE_ERROR ("BTA_DM: Error adding device %08x%04x",
(p_dev->bd_addr[0]<<24)+(p_dev->bd_addr[1]<<16)+(p_dev->bd_addr[2]<<8)+p_dev->bd_addr[3],
(p_dev->bd_addr[4]<<8)+p_dev->bd_addr[5]);
}
@@ -757,7 +757,7 @@
UINT8 index;
tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
- APPL_TRACE_DEBUG0("bta_dm_close_acl");
+ APPL_TRACE_DEBUG("bta_dm_close_acl");
if ( BTM_IsAclConnectionUp(p_remove_acl->bd_addr, BT_TRANSPORT_LE) ||
BTM_IsAclConnectionUp(p_remove_acl->bd_addr, BT_TRANSPORT_BR_EDR))
@@ -780,7 +780,7 @@
}
else
{
- APPL_TRACE_ERROR0("unknown device, remove ACL failed");
+ APPL_TRACE_ERROR("unknown device, remove ACL failed");
}
/* Disconnect the ACL link */
btm_remove_acl(p_remove_acl->bd_addr, transport);
@@ -790,7 +790,7 @@
{
if (!BTM_SecDeleteDevice(p_remove_acl->bd_addr))
{
- APPL_TRACE_ERROR0("delete device from security database failed.");
+ APPL_TRACE_ERROR("delete device from security database failed.");
}
#if (BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE)
/* need to remove all pending background connection if any */
@@ -870,7 +870,7 @@
tBTM_STATUS status;
tBTA_DM_SEC sec_event;
- APPL_TRACE_EVENT0(" bta_dm_bond_cancel ");
+ APPL_TRACE_EVENT(" bta_dm_bond_cancel ");
status = BTM_SecBondCancel ( p_data->bond_cancel.bd_addr );
if (bta_dm_cb.p_sec_cback && (status != BTM_CMD_STARTED && status != BTM_SUCCESS))
@@ -938,7 +938,7 @@
if(!p_dev)
return;
- APPL_TRACE_DEBUG2(" bta_dm_link_policy set:%d, policy:0x%x",
+ APPL_TRACE_DEBUG(" bta_dm_link_policy set:%d, policy:0x%x",
p_data->link_policy.set, p_data->link_policy.policy_mask);
if(p_data->link_policy.set)
{
@@ -978,7 +978,7 @@
if(peer_addr)
p_dev = bta_dm_find_peer_device(peer_addr);
- APPL_TRACE_DEBUG2(" bta_dm_policy_cback cmd:%d, policy:0x%x",
+ APPL_TRACE_DEBUG(" bta_dm_policy_cback cmd:%d, policy:0x%x",
status, policy);
switch(status)
{
@@ -1182,7 +1182,7 @@
UINT16 len = (UINT16)(sizeof(tBT_UUID) * p_data->search.num_uuid);
#endif
- APPL_TRACE_DEBUG1("bta_dm_search_start avoid_scatter=%d", bta_dm_cfg.avoid_scatter);
+ APPL_TRACE_DEBUG("bta_dm_search_start avoid_scatter=%d", bta_dm_cfg.avoid_scatter);
if (bta_dm_cfg.avoid_scatter &&
(p_data->search.rs_res == BTA_DM_RS_NONE) && bta_dm_check_av(BTA_DM_API_SEARCH_EVT))
{
@@ -1203,7 +1203,7 @@
{
if ((bta_dm_search_cb.p_srvc_uuid = (tBT_UUID *)GKI_getbuf(len)) == NULL)
{
- APPL_TRACE_ERROR0("bta_dm_search_start no resources");
+ APPL_TRACE_ERROR("bta_dm_search_start no resources");
result.status = BTA_FAILURE;
result.num_resp = 0;
@@ -1218,7 +1218,7 @@
bta_dm_inq_results_cb,
(tBTM_CMPL_CB*) bta_dm_inq_cmpl_cb);
- APPL_TRACE_EVENT1("bta_dm_search_start status=%d", result.status);
+ APPL_TRACE_EVENT("bta_dm_search_start status=%d", result.status);
if (result.status != BTM_CMD_STARTED)
{
result.num_resp = 0;
@@ -1283,7 +1283,7 @@
#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
UINT16 len = (UINT16)(sizeof(tBT_UUID) * p_data->discover.num_uuid);
#endif
- APPL_TRACE_EVENT2("bta_dm_discover services_to_search=0x%04X, sdp_search=%d",
+ APPL_TRACE_EVENT("bta_dm_discover services_to_search=0x%04X, sdp_search=%d",
p_data->discover.services, p_data->discover.sdp_search);
/* save the search condition */
@@ -1458,7 +1458,7 @@
}
else
{
- APPL_TRACE_ERROR0("No buffer to start DI discovery");
+ APPL_TRACE_ERROR("No buffer to start DI discovery");
}
if ( result == BTA_FAILURE &&
@@ -1484,7 +1484,7 @@
{
tBTM_STATUS btm_status;
- APPL_TRACE_DEBUG0("bta_dm_read_remote_device_name");
+ APPL_TRACE_DEBUG("bta_dm_read_remote_device_name");
bdcpy(bta_dm_search_cb.peer_bdaddr, bd_addr);
bta_dm_search_cb.peer_name[0] = 0;
@@ -1495,13 +1495,13 @@
if ( btm_status == BTM_CMD_STARTED )
{
- APPL_TRACE_DEBUG0("bta_dm_read_remote_device_name: BTM_ReadRemoteDeviceName is started");
+ APPL_TRACE_DEBUG("bta_dm_read_remote_device_name: BTM_ReadRemoteDeviceName is started");
return (TRUE);
}
else if ( btm_status == BTM_BUSY )
{
- APPL_TRACE_DEBUG0("bta_dm_read_remote_device_name: BTM_ReadRemoteDeviceName is busy");
+ APPL_TRACE_DEBUG("bta_dm_read_remote_device_name: BTM_ReadRemoteDeviceName is busy");
/* Remote name discovery is on going now so BTM cannot notify through "bta_dm_remname_cback" */
/* adding callback to get notified that current reading remore name done */
@@ -1511,7 +1511,7 @@
}
else
{
- APPL_TRACE_WARNING1("bta_dm_read_remote_device_name: BTM_ReadRemoteDeviceName returns 0x%02X", btm_status);
+ APPL_TRACE_WARNING("bta_dm_read_remote_device_name: BTM_ReadRemoteDeviceName returns 0x%02X", btm_status);
return (FALSE);
}
@@ -1531,7 +1531,7 @@
tBTA_DM_MSG * p_msg;
tBTA_DM_SEARCH data;
- APPL_TRACE_DEBUG0("bta_dm_inq_cmpl");
+ APPL_TRACE_DEBUG("bta_dm_inq_cmpl");
data.inq_cmpl.num_resps = p_data->inq_cmpl.num;
bta_dm_search_cb.p_search_cback(BTA_DM_INQ_CMPL_EVT, &data);
@@ -1568,7 +1568,7 @@
*******************************************************************************/
void bta_dm_rmt_name (tBTA_DM_MSG *p_data)
{
- APPL_TRACE_DEBUG0("bta_dm_rmt_name");
+ APPL_TRACE_DEBUG("bta_dm_rmt_name");
if( p_data->rem_name.result.disc_res.bd_name[0] && bta_dm_search_cb.p_btm_inq_info)
{
@@ -1592,7 +1592,7 @@
{
tBTM_INQ_INFO *p_btm_inq_info;
- APPL_TRACE_DEBUG0("bta_dm_disc_rmt_name");
+ APPL_TRACE_DEBUG("bta_dm_disc_rmt_name");
p_btm_inq_info = BTM_InqDbRead (p_data->rem_name.result.disc_res.bd_addr);
if( p_btm_inq_info )
@@ -1638,7 +1638,7 @@
|| (p_data->sdp_event.sdp_result == SDP_NO_RECS_MATCH)
|| (p_data->sdp_event.sdp_result == SDP_DB_FULL))
{
- APPL_TRACE_DEBUG1("sdp_result::0x%x", p_data->sdp_event.sdp_result);
+ APPL_TRACE_DEBUG("sdp_result::0x%x", p_data->sdp_event.sdp_result);
do
{
@@ -1755,7 +1755,7 @@
// GKI_freebuf(bta_dm_search_cb.p_sdp_db);
// bta_dm_search_cb.p_sdp_db = NULL;
- APPL_TRACE_DEBUG1("bta_dm_sdp_result services_found = %04x", bta_dm_search_cb.services_found);
+ APPL_TRACE_DEBUG("bta_dm_sdp_result services_found = %04x", bta_dm_search_cb.services_found);
/* Collect the 128-bit services here and put them into the list */
if(bta_dm_search_cb.services == BTA_ALL_SERVICE_MASK)
@@ -1806,12 +1806,12 @@
num_uuids*MAX_UUID_SIZE);
} else {
p_msg->disc_result.result.disc_res.num_uuids = 0;
- APPL_TRACE_ERROR1("%s: Unable to allocate memory for uuid_list", __FUNCTION__);
+ APPL_TRACE_ERROR("%s: Unable to allocate memory for uuid_list", __FUNCTION__);
}
}
//copy the raw_data to the discovery result structure
//
- APPL_TRACE_DEBUG2("bta_dm_sdp_result (raw_data used = 0x%x raw_data_ptr = 0x%x)\r\n",bta_dm_search_cb.p_sdp_db->raw_used, bta_dm_search_cb.p_sdp_db->raw_data);
+ APPL_TRACE_DEBUG("bta_dm_sdp_result (raw_data used = 0x%x raw_data_ptr = 0x%x)\r\n",bta_dm_search_cb.p_sdp_db->raw_used, bta_dm_search_cb.p_sdp_db->raw_data);
if ( bta_dm_search_cb.p_sdp_db != NULL && bta_dm_search_cb.p_sdp_db->raw_used != 0 &&
bta_dm_search_cb.p_sdp_db->raw_data != NULL) {
@@ -1826,7 +1826,7 @@
bta_dm_search_cb.p_sdp_db->raw_used;
} else {
- APPL_TRACE_DEBUG1("bta_dm_sdp_result GKI Alloc failed to allocate %d bytes !!\r\n",bta_dm_search_cb.p_sdp_db->raw_used);
+ APPL_TRACE_DEBUG("bta_dm_sdp_result GKI Alloc failed to allocate %d bytes !!\r\n",bta_dm_search_cb.p_sdp_db->raw_used);
}
bta_dm_search_cb.p_sdp_db->raw_data = NULL; //no need to free this - it is a global assigned.
@@ -1834,7 +1834,7 @@
bta_dm_search_cb.p_sdp_db->raw_size = 0;
}
else {
- APPL_TRACE_DEBUG0("bta_dm_sdp_result raw data size is 0 or raw_data is null!!\r\n");
+ APPL_TRACE_DEBUG("bta_dm_sdp_result raw data size is 0 or raw_data is null!!\r\n");
}
/* Done with p_sdp_db. Free it */
bta_dm_free_sdp_db(NULL);
@@ -1846,7 +1846,7 @@
p_msg->disc_result.result.disc_res.result = (3 + bta_dm_search_cb.peer_scn);
p_msg->disc_result.result.disc_res.services |= BTA_USER_SERVICE_MASK;
- APPL_TRACE_EVENT1(" Piggy back the SCN over result field SCN=%d", bta_dm_search_cb.peer_scn);
+ APPL_TRACE_EVENT(" Piggy back the SCN over result field SCN=%d", bta_dm_search_cb.peer_scn);
}
bdcpy (p_msg->disc_result.result.disc_res.bd_addr, bta_dm_search_cb.peer_bdaddr);
@@ -1903,7 +1903,7 @@
*******************************************************************************/
void bta_dm_search_cmpl (tBTA_DM_MSG *p_data)
{
- APPL_TRACE_DEBUG0("bta_dm_search_cmpl");
+ APPL_TRACE_DEBUG("bta_dm_search_cmpl");
#if (BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE)
utl_freebuf((void **)&bta_dm_search_cb.p_srvc_uuid);
@@ -1928,7 +1928,7 @@
{
tBTA_DM_MSG * p_msg;
- APPL_TRACE_DEBUG0("bta_dm_disc_result");
+ APPL_TRACE_DEBUG("bta_dm_disc_result");
#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
/* if any BR/EDR service discovery has been done, report the event */
@@ -1956,7 +1956,7 @@
*******************************************************************************/
void bta_dm_search_result (tBTA_DM_MSG *p_data)
{
- APPL_TRACE_DEBUG2("bta_dm_search_result searching:0x%04x, result:0x%04x",
+ APPL_TRACE_DEBUG("bta_dm_search_result searching:0x%04x, result:0x%04x",
bta_dm_search_cb.services,
p_data->disc_result.result.disc_res.services);
@@ -2000,7 +2000,7 @@
{
UNUSED(p_tle);
- APPL_TRACE_EVENT0(" bta_dm_search_timer_cback ");
+ APPL_TRACE_EVENT(" bta_dm_search_timer_cback ");
bta_dm_search_cb.wait_disc = FALSE;
/* proceed with next device */
@@ -2190,11 +2190,11 @@
{
if((bta_dm_search_cb.p_sdp_db = (tSDP_DISCOVERY_DB *)GKI_getbuf(BTA_DM_SDP_DB_SIZE)) != NULL)
{
- APPL_TRACE_DEBUG1("bta_dm_search_cb.services = %04x***********", bta_dm_search_cb.services);
+ APPL_TRACE_DEBUG("bta_dm_search_cb.services = %04x***********", bta_dm_search_cb.services);
/* try to search all services by search based on L2CAP UUID */
if(bta_dm_search_cb.services == BTA_ALL_SERVICE_MASK )
{
- APPL_TRACE_ERROR1("services_to_search = %08x",bta_dm_search_cb.services_to_search);
+ APPL_TRACE_ERROR("services_to_search = %08x",bta_dm_search_cb.services_to_search);
if (bta_dm_search_cb.services_to_search & BTA_RES_SERVICE_MASK)
{
uuid.uu.uuid16 = bta_service_id_to_uuid_lkup_tbl[0];
@@ -2256,7 +2256,7 @@
}
- APPL_TRACE_ERROR1("****************search UUID = %04x***********", uuid.uu.uuid16);
+ APPL_TRACE_ERROR("****************search UUID = %04x***********", uuid.uu.uuid16);
//SDP_InitDiscoveryDb (bta_dm_search_cb.p_sdp_db, BTA_DM_SDP_DB_SIZE, 1, &uuid, num_attrs, attr_list);
SDP_InitDiscoveryDb (bta_dm_search_cb.p_sdp_db, BTA_DM_SDP_DB_SIZE, 1, &uuid, 0, NULL);
@@ -2288,7 +2288,7 @@
}
else
{
- APPL_TRACE_ERROR0("#### Failed to allocate SDP DB buffer! ####");
+ APPL_TRACE_ERROR("#### Failed to allocate SDP DB buffer! ####");
}
}
@@ -2328,7 +2328,7 @@
tBTA_DM_MSG * p_msg;
- APPL_TRACE_DEBUG0("bta_dm_discover_next_device");
+ APPL_TRACE_DEBUG("bta_dm_discover_next_device");
/* searching next device on inquiry result */
if((bta_dm_search_cb.p_btm_inq_info = BTM_InqDbNext(bta_dm_search_cb.p_btm_inq_info)) != NULL)
@@ -2379,20 +2379,20 @@
#endif
- APPL_TRACE_DEBUG6("bta_dm_discover_device, BDA:0x%02X%02X%02X%02X%02X%02X",
+ APPL_TRACE_DEBUG("bta_dm_discover_device, BDA:0x%02X%02X%02X%02X%02X%02X",
remote_bd_addr[0],remote_bd_addr[1],
remote_bd_addr[2],remote_bd_addr[3],
remote_bd_addr[4],remote_bd_addr[5]);
bdcpy(bta_dm_search_cb.peer_bdaddr, remote_bd_addr);
- APPL_TRACE_DEBUG2("bta_dm_discover_device name_discover_done = %d p_btm_inq_info 0x%x ",
+ APPL_TRACE_DEBUG("bta_dm_discover_device name_discover_done = %d p_btm_inq_info 0x%x ",
bta_dm_search_cb.name_discover_done,
bta_dm_search_cb.p_btm_inq_info
);
if ( bta_dm_search_cb.p_btm_inq_info ) {
- APPL_TRACE_DEBUG1("bta_dm_discover_device appl_knows_rem_name %d",
+ APPL_TRACE_DEBUG("bta_dm_discover_device appl_knows_rem_name %d",
bta_dm_search_cb.p_btm_inq_info->appl_knows_rem_name
);
}
@@ -2449,7 +2449,7 @@
#if (BLE_INCLUDED == TRUE && (defined BTA_GATT_INCLUDED) && (BTA_GATT_INCLUDED == TRUE))
if ( bta_dm_search_cb.p_btm_inq_info )
{
- APPL_TRACE_DEBUG3("bta_dm_discover_device p_btm_inq_info 0x%x results.device_type 0x%x services_to_search 0x%x",
+ APPL_TRACE_DEBUG("bta_dm_discover_device p_btm_inq_info 0x%x results.device_type 0x%x services_to_search 0x%x",
bta_dm_search_cb.p_btm_inq_info,
bta_dm_search_cb.p_btm_inq_info->results.device_type,
bta_dm_search_cb.services_to_search
@@ -2596,7 +2596,7 @@
tBTA_DM_MSG * p_msg;
- APPL_TRACE_DEBUG0("bta_dm_inq_cmpl_cb");
+ APPL_TRACE_DEBUG("bta_dm_inq_cmpl_cb");
if ((p_msg = (tBTA_DM_MSG *) GKI_getbuf(sizeof(tBTA_DM_MSG))) != NULL)
{
p_msg->inq_cmpl.hdr.event = BTA_DM_INQUIRY_CMPL_EVT;
@@ -2623,7 +2623,7 @@
tBTM_STATUS btm_status;
UNUSED(dc);
- APPL_TRACE_DEBUG1("bta_dm_service_search_remname_cback name=<%s>", bd_name);
+ APPL_TRACE_DEBUG("bta_dm_service_search_remname_cback name=<%s>", bd_name);
/* if this is what we are looking for */
if (!bdcmp( bta_dm_search_cb.peer_bdaddr, bd_addr))
@@ -2648,12 +2648,12 @@
if ( btm_status == BTM_BUSY )
{
/* wait for next chance(notification of remote name discovery done) */
- APPL_TRACE_DEBUG0("bta_dm_service_search_remname_cback: BTM_ReadRemoteDeviceName is busy");
+ APPL_TRACE_DEBUG("bta_dm_service_search_remname_cback: BTM_ReadRemoteDeviceName is busy");
}
else if ( btm_status != BTM_CMD_STARTED )
{
/* if failed to start getting remote name then continue */
- APPL_TRACE_WARNING1("bta_dm_service_search_remname_cback: BTM_ReadRemoteDeviceName returns 0x%02X", btm_status);
+ APPL_TRACE_WARNING("bta_dm_service_search_remname_cback: BTM_ReadRemoteDeviceName returns 0x%02X", btm_status);
rem_name.length = 0;
rem_name.remote_bd_name[0] = 0;
@@ -2677,7 +2677,7 @@
{
tBTA_DM_REM_NAME * p_msg;
- APPL_TRACE_DEBUG2("bta_dm_remname_cback len = %d name=<%s>", p_remote_name->length,
+ APPL_TRACE_DEBUG("bta_dm_remname_cback len = %d name=<%s>", p_remote_name->length,
p_remote_name->remote_bd_name);
/* remote name discovery is done but it could be failed */
@@ -2857,7 +2857,7 @@
if ((BTM_ReadRemoteDeviceName(bd_addr, bta_dm_pinname_cback, BT_TRANSPORT_BR_EDR)) == BTM_CMD_STARTED)
return BTM_CMD_STARTED;
- APPL_TRACE_WARNING0(" bta_dm_pin_cback() -> Failed to start Remote Name Request ");
+ APPL_TRACE_WARNING(" bta_dm_pin_cback() -> Failed to start Remote Name Request ");
}
bdcpy(sec_event.pin_req.bd_addr, bd_addr);
@@ -2941,7 +2941,7 @@
}
else
{
- APPL_TRACE_WARNING0(" bta_dm_new_link_key_cback() Received AMP Key?? ");
+ APPL_TRACE_WARNING(" bta_dm_new_link_key_cback() Received AMP Key?? ");
}
return BTM_CMD_STARTED;
@@ -3002,7 +3002,7 @@
tBTA_DM_SEC sec_event;
tBTA_DM_SEC_EVT pin_evt = BTA_DM_SP_KEY_NOTIF_EVT;
- APPL_TRACE_EVENT1("bta_dm_sp_cback: %d", event);
+ APPL_TRACE_EVENT("bta_dm_sp_cback: %d", event);
if (!bta_dm_cb.p_sec_cback)
return BTM_NOT_AUTHORIZED;
@@ -3019,7 +3019,7 @@
status = BTM_SUCCESS;
#endif
- APPL_TRACE_EVENT2("io mitm: %d oob_data:%d", p_data->io_req.auth_req, p_data->io_req.oob_data);
+ APPL_TRACE_EVENT("io mitm: %d oob_data:%d", p_data->io_req.auth_req, p_data->io_req.oob_data);
break;
case BTM_SP_IO_RSP_EVT:
#if (BTM_LOCAL_IO_CAPS != BTM_IO_CAP_NONE)
@@ -3054,7 +3054,7 @@
if ((BTM_ReadRemoteDeviceName(p_data->cfm_req.bd_addr, bta_dm_pinname_cback,
BT_TRANSPORT_BR_EDR)) == BTM_CMD_STARTED)
return BTM_CMD_STARTED;
- APPL_TRACE_WARNING0(" bta_dm_sp_cback() -> Failed to start Remote Name Request ");
+ APPL_TRACE_WARNING(" bta_dm_sp_cback() -> Failed to start Remote Name Request ");
}
else
{
@@ -3081,7 +3081,7 @@
if ((BTM_ReadRemoteDeviceName(p_data->key_notif.bd_addr, bta_dm_pinname_cback,
BT_TRANSPORT_BR_EDR)) == BTM_CMD_STARTED)
return BTM_CMD_STARTED;
- APPL_TRACE_WARNING0(" bta_dm_sp_cback() -> Failed to start Remote Name Request ");
+ APPL_TRACE_WARNING(" bta_dm_sp_cback() -> Failed to start Remote Name Request ");
}
else
{
@@ -3113,7 +3113,7 @@
if ((BTM_ReadRemoteDeviceName(p_data->rmt_oob.bd_addr, bta_dm_pinname_cback,
BT_TRANSPORT_BR_EDR)) == BTM_CMD_STARTED)
return BTM_CMD_STARTED;
- APPL_TRACE_WARNING0(" bta_dm_sp_cback() -> Failed to start Remote Name Request ");
+ APPL_TRACE_WARNING(" bta_dm_sp_cback() -> Failed to start Remote Name Request ");
}
bdcpy(sec_event.rmt_oob.bd_addr, p_data->rmt_oob.bd_addr);
@@ -3143,7 +3143,7 @@
status = BTM_NOT_AUTHORIZED;
break;
}
- APPL_TRACE_EVENT1("dm status: %d", status);
+ APPL_TRACE_EVENT("dm status: %d", status);
return status;
}
@@ -3349,7 +3349,7 @@
static void bta_dm_rs_cback (tBTM_ROLE_SWITCH_CMPL *p1)
{
UNUSED(p1);
- APPL_TRACE_WARNING1("bta_dm_rs_cback:%d", bta_dm_cb.rs_event);
+ APPL_TRACE_WARNING("bta_dm_rs_cback:%d", bta_dm_cb.rs_event);
if(bta_dm_cb.rs_event == BTA_DM_API_SEARCH_EVT)
{
bta_dm_cb.search_msg.rs_res = BTA_DM_RS_OK; /* do not care about the result for now */
@@ -3385,13 +3385,13 @@
}
#endif
- APPL_TRACE_WARNING1("bta_dm_check_av:%d", bta_dm_cb.cur_av_count);
+ APPL_TRACE_WARNING("bta_dm_check_av:%d", bta_dm_cb.cur_av_count);
if(bta_dm_cb.cur_av_count)
{
for(i=0; i<bta_dm_cb.device_list.count; i++)
{
p_dev = &bta_dm_cb.device_list.peer_device[i];
- APPL_TRACE_WARNING4("[%d]: state:%d, info:x%x, avoid_rs %d",
+ APPL_TRACE_WARNING("[%d]: state:%d, info:x%x, avoid_rs %d",
i, p_dev->conn_state, p_dev->info, avoid_roleswitch);
if((p_dev->conn_state == BTA_DM_CONNECTED) && (p_dev->info & BTA_DM_DI_AV_ACTIVE) &&
(avoid_roleswitch == FALSE))
@@ -3452,7 +3452,7 @@
p_dev = bta_dm_find_peer_device(p_bda);
if(p_dev)
{
- APPL_TRACE_DEBUG3("bta_dm_acl_change role chg info:x%x new_role:%d dev count:%d",
+ APPL_TRACE_DEBUG("bta_dm_acl_change role chg info:x%x new_role:%d dev count:%d",
p_dev->info, p_data->acl_change.new_role, bta_dm_cb.device_list.count);
if(p_dev->info & BTA_DM_DI_AV_ACTIVE)
{
@@ -3540,7 +3540,7 @@
/* both local and remote devices support SSR */
bta_dm_cb.device_list.peer_device[i].info = BTA_DM_DI_USE_SSR;
}
- APPL_TRACE_WARNING1("info:x%x", bta_dm_cb.device_list.peer_device[i].info);
+ APPL_TRACE_WARNING("info:x%x", bta_dm_cb.device_list.peer_device[i].info);
if( bta_dm_cb.p_sec_cback )
bta_dm_cb.p_sec_cback(BTA_DM_LINK_UP_EVT, &conn);
@@ -3591,7 +3591,7 @@
if(bta_dm_search_cb.sdp_results)
{
- APPL_TRACE_EVENT0(" timer stopped ");
+ APPL_TRACE_EVENT(" timer stopped ");
bta_sys_stop_timer(&bta_dm_search_cb.search_timer);
bta_dm_discover_next_device();
}
@@ -3782,7 +3782,7 @@
if(BTA_ID_AV == id)
bta_dm_cb.cur_av_count = app_id;
}
- APPL_TRACE_WARNING2("bta_dm_rm_cback:%d, status:%d", bta_dm_cb.cur_av_count, status);
+ APPL_TRACE_WARNING("bta_dm_rm_cback:%d, status:%d", bta_dm_cb.cur_av_count, status);
}
else if ((status == BTA_SYS_CONN_BUSY) || (status == BTA_SYS_CONN_IDLE))
{
@@ -3822,7 +3822,7 @@
((bta_role_switch_blacklist[i].lmp_sub_version & lmp_sub_version) ==
bta_role_switch_blacklist[i].lmp_sub_version))
{
- APPL_TRACE_EVENT0("Black list F/W version matches.. Delay Role Switch...");
+ APPL_TRACE_EVENT("Black list F/W version matches.. Delay Role Switch...");
return TRUE;
}
@@ -3843,7 +3843,7 @@
static void bta_dm_delay_role_switch_cback(TIMER_LIST_ENT *p_tle)
{
UNUSED(p_tle);
- APPL_TRACE_EVENT0("bta_dm_delay_role_switch_cback: initiating Delayed RS");
+ APPL_TRACE_EVENT("bta_dm_delay_role_switch_cback: initiating Delayed RS");
bta_dm_adjust_roles (FALSE);
}
@@ -3864,7 +3864,7 @@
if ( BTM_IsAclConnectionUp(remote_bd_addr, BT_TRANSPORT_LE) ||
BTM_IsAclConnectionUp(remote_bd_addr, BT_TRANSPORT_BR_EDR))
{
- APPL_TRACE_DEBUG1("%s ACL is not down. Schedule for Dev Removal when ACL closes",
+ APPL_TRACE_DEBUG("%s ACL is not down. Schedule for Dev Removal when ACL closes",
__FUNCTION__);
for (index = 0; index < bta_dm_cb.device_list.count; index ++)
{
@@ -3877,7 +3877,7 @@
}
else
{
- APPL_TRACE_ERROR1(" %s Device does not exist in DB", __FUNCTION__);
+ APPL_TRACE_ERROR(" %s Device does not exist in DB", __FUNCTION__);
}
}
else
@@ -4073,7 +4073,7 @@
{
if (empty_slot == BTA_EIR_SERVER_NUM_CUSTOM_UUID)
{
- APPL_TRACE_ERROR0("No space to add UUID for EIR");
+ APPL_TRACE_ERROR("No space to add UUID for EIR");
return;
}
else
@@ -4083,7 +4083,7 @@
}
else
{
- APPL_TRACE_ERROR0("UUID is already added for EIR");
+ APPL_TRACE_ERROR("UUID is already added for EIR");
return;
}
}
@@ -4091,7 +4091,7 @@
{
if (match_slot == BTA_EIR_SERVER_NUM_CUSTOM_UUID)
{
- APPL_TRACE_ERROR0("UUID is not found for EIR");
+ APPL_TRACE_ERROR("UUID is not found for EIR");
return;
}
else
@@ -4172,7 +4172,7 @@
{
if( BTM_ReadLocalDeviceName( &local_name ) != BTM_SUCCESS )
{
- APPL_TRACE_ERROR0("Fail to read local device name for EIR");
+ APPL_TRACE_ERROR("Fail to read local device name for EIR");
}
}
#endif
@@ -4180,14 +4180,14 @@
/* Allocate a buffer to hold HCI command */
if ((p_buf = (BT_HDR *)GKI_getpoolbuf(BTM_CMD_POOL_ID)) == NULL)
{
- APPL_TRACE_ERROR0("bta_dm_set_eir couldn't allocate buffer");
+ APPL_TRACE_ERROR("bta_dm_set_eir couldn't allocate buffer");
return;
}
p = (UINT8 *)p_buf + BTM_HCI_EIR_OFFSET;
memset(p, 0x00, HCI_EXT_INQ_RESPONSE_LEN );
- APPL_TRACE_DEBUG0("BTA is generating EIR");
+ APPL_TRACE_DEBUG("BTA is generating EIR");
if( local_name )
local_name_len = strlen( local_name );
@@ -4212,7 +4212,7 @@
/* if UUID doesn't fit remaing space, shorten local name */
if ( local_name_len > (free_eir_length - 4 - num_uuid*LEN_UUID_16))
{
- APPL_TRACE_WARNING0("BTA EIR: local name is shortened");
+ APPL_TRACE_WARNING("BTA EIR: local name is shortened");
local_name_len = p_bta_dm_eir_cfg->bta_dm_eir_min_name_len;
data_type = BTM_EIR_SHORTENED_LOCAL_NAME_TYPE;
}
@@ -4246,7 +4246,7 @@
}
else /* not enough room for all UUIDs */
{
- APPL_TRACE_WARNING0("BTA EIR: UUID 16-bit list is truncated");
+ APPL_TRACE_WARNING("BTA EIR: UUID 16-bit list is truncated");
num_uuid = free_eir_length / LEN_UUID_16;
data_type = BTM_EIR_MORE_16BITS_UUID_TYPE;
}
@@ -4270,7 +4270,7 @@
if( data_type == BTM_EIR_MORE_16BITS_UUID_TYPE )
{
- APPL_TRACE_WARNING0("BTA EIR: UUID 16-bit list is truncated");
+ APPL_TRACE_WARNING("BTA EIR: UUID 16-bit list is truncated");
}
#if (BTA_EIR_SERVER_NUM_CUSTOM_UUID > 0)
else
@@ -4287,7 +4287,7 @@
else
{
data_type = BTM_EIR_MORE_16BITS_UUID_TYPE;
- APPL_TRACE_WARNING0("BTA EIR: UUID 16-bit list is truncated");
+ APPL_TRACE_WARNING("BTA EIR: UUID 16-bit list is truncated");
break;
}
}
@@ -4324,7 +4324,7 @@
else
{
data_type = BTM_EIR_MORE_32BITS_UUID_TYPE;
- APPL_TRACE_WARNING0("BTA EIR: UUID 32-bit list is truncated");
+ APPL_TRACE_WARNING("BTA EIR: UUID 32-bit list is truncated");
break;
}
}
@@ -4357,7 +4357,7 @@
else
{
data_type = BTM_EIR_MORE_128BITS_UUID_TYPE;
- APPL_TRACE_WARNING0("BTA EIR: UUID 128-bit list is truncated");
+ APPL_TRACE_WARNING("BTA EIR: UUID 128-bit list is truncated");
break;
}
}
@@ -4437,12 +4437,12 @@
tBTA_SERVICE_MASK service_index = 0;
tBTM_EIR_SEARCH_RESULT result;
- APPL_TRACE_DEBUG6("BTA searching services in EIR of BDA:0x%02X%02X%02X%02X%02X%02X",
+ APPL_TRACE_DEBUG("BTA searching services in EIR of BDA:0x%02X%02X%02X%02X%02X%02X",
p_result->remote_bd_addr[0],p_result->remote_bd_addr[1],
p_result->remote_bd_addr[2],p_result->remote_bd_addr[3],
p_result->remote_bd_addr[4],p_result->remote_bd_addr[5]);
- APPL_TRACE_DEBUG1(" with services_to_search=0x%08X", *p_services_to_search);
+ APPL_TRACE_DEBUG(" with services_to_search=0x%08X", *p_services_to_search);
#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
/* always do GATT based service discovery by SDP instead of from EIR */
@@ -4491,7 +4491,7 @@
service_index++;
}
- APPL_TRACE_ERROR2("BTA EIR search result, services_to_search=0x%08X, services_found=0x%08X",
+ APPL_TRACE_ERROR("BTA EIR search result, services_to_search=0x%08X, services_found=0x%08X",
*p_services_to_search, *p_services_found);
}
#endif
@@ -4514,20 +4514,20 @@
if( adding )
{
- APPL_TRACE_EVENT1("Adding UUID=0x%04X into EIR", uuid16);
+ APPL_TRACE_EVENT("Adding UUID=0x%04X into EIR", uuid16);
BTM_AddEirService( bta_dm_cb.eir_uuid, uuid16 );
}
else
{
- APPL_TRACE_EVENT1("Removing UUID=0x%04X from EIR", uuid16);
+ APPL_TRACE_EVENT("Removing UUID=0x%04X from EIR", uuid16);
BTM_RemoveEirService( bta_dm_cb.eir_uuid, uuid16 );
}
bta_dm_set_eir (NULL);
- APPL_TRACE_EVENT2("bta_dm_eir_update_uuid UUID bit mask=0x%08X %08X",
+ APPL_TRACE_EVENT("bta_dm_eir_update_uuid UUID bit mask=0x%08X %08X",
bta_dm_cb.eir_uuid[1], bta_dm_cb.eir_uuid[0] );
}
#endif
@@ -4631,7 +4631,7 @@
break;
}
- APPL_TRACE_DEBUG2("bta_dm_encrypt_cback status =%d p_callback=0x%x", bta_status, p_callback);
+ APPL_TRACE_DEBUG("bta_dm_encrypt_cback status =%d p_callback=0x%x", bta_status, p_callback);
if (p_callback)
{
@@ -4651,10 +4651,10 @@
{
UINT8 i ;
- APPL_TRACE_DEBUG0("bta_dm_set_encryption"); //todo
+ APPL_TRACE_DEBUG("bta_dm_set_encryption"); //todo
if (!p_data->set_encryption.p_callback)
{
- APPL_TRACE_ERROR0("bta_dm_set_encryption callback is not provided");
+ APPL_TRACE_ERROR("bta_dm_set_encryption callback is not provided");
return;
}
@@ -4668,7 +4668,7 @@
{
if (bta_dm_cb.device_list.peer_device[i].p_encrypt_cback)
{
- APPL_TRACE_ERROR0("earlier enc was not done for same device");
+ APPL_TRACE_ERROR("earlier enc was not done for same device");
(*p_data->set_encryption.p_callback)(p_data->set_encryption.bd_addr,
p_data->set_encryption.transport, BTA_BUSY);
return;
@@ -4685,7 +4685,7 @@
}
else
{
- APPL_TRACE_ERROR1(" %s Device not found/not connected", __FUNCTION__);
+ APPL_TRACE_ERROR(" %s Device not found/not connected", __FUNCTION__);
}
}
@@ -4738,7 +4738,7 @@
tBTA_DM_SEARCH result;
tBTM_INQ_INFO *p_inq_info;
UINT16 service_class;
- APPL_TRACE_DEBUG0("bta_dm_observe_results_cb")
+ APPL_TRACE_DEBUG("bta_dm_observe_results_cb")
bdcpy(result.inq_res.bd_addr, p_inq->remote_bd_addr);
result.inq_res.rssi = p_inq->rssi;
@@ -4781,7 +4781,7 @@
{
tBTA_DM_SEARCH data;
- APPL_TRACE_DEBUG0("bta_dm_observe_cmpl_cb");
+ APPL_TRACE_DEBUG("bta_dm_observe_cmpl_cb");
data.inq_cmpl.num_resps = ((tBTM_INQUIRY_CMPL *)p_result)->num_resp;
if (bta_dm_search_cb.p_scan_cback)
@@ -4808,7 +4808,7 @@
char* p_name = NULL;
UINT8 i;
- APPL_TRACE_DEBUG0("bta_dm_ble_smp_cback");
+ APPL_TRACE_DEBUG("bta_dm_ble_smp_cback");
if (!bta_dm_cb.p_sec_cback)
return BTM_NOT_AUTHORIZED;
@@ -4830,7 +4830,7 @@
#if BTM_OOB_INCLUDED == FALSE
status = BTM_SUCCESS;
#endif
- APPL_TRACE_EVENT2("io mitm: %d oob_data:%d", p_data->io_req.auth_req, p_data->io_req.oob_data);
+ APPL_TRACE_EVENT("io mitm: %d oob_data:%d", p_data->io_req.auth_req, p_data->io_req.oob_data);
break;
@@ -4967,7 +4967,7 @@
break;
default:
- APPL_TRACE_DEBUG1("Unknown key type %d", key_type);
+ APPL_TRACE_DEBUG("Unknown key type %d", key_type);
break;
}
return;
@@ -4992,7 +4992,7 @@
(tBTM_LE_KEY_VALUE *)&p_data->add_ble_key.blekey,
p_data->add_ble_key.key_type))
{
- APPL_TRACE_ERROR2 ("BTA_DM: Error adding BLE Key for device %08x%04x",
+ APPL_TRACE_ERROR ("BTA_DM: Error adding BLE Key for device %08x%04x",
(p_data->add_ble_key.bd_addr[0]<<24)+(p_data->add_ble_key.bd_addr[1]<<16)+\
(p_data->add_ble_key.bd_addr[2]<<8)+p_data->add_ble_key.bd_addr[3],
(p_data->add_ble_key.bd_addr[4]<<8)+p_data->add_ble_key.bd_addr[5]);
@@ -5016,7 +5016,7 @@
p_data->add_ble_device.dev_type ,
p_data->add_ble_device.addr_type))
{
- APPL_TRACE_ERROR2 ("BTA_DM: Error adding BLE Device for device %08x%04x",
+ APPL_TRACE_ERROR ("BTA_DM: Error adding BLE Device for device %08x%04x",
(p_data->add_ble_device.bd_addr[0]<<24)+(p_data->add_ble_device.bd_addr[1]<<16)+ \
(p_data->add_ble_device.bd_addr[2]<<8)+p_data->add_ble_device.bd_addr[3],
(p_data->add_ble_device.bd_addr[4]<<8)+p_data->add_ble_device.bd_addr[5]);
@@ -5126,7 +5126,7 @@
p_data->ble_update_conn_params.latency,
p_data->ble_update_conn_params.timeout))
{
- APPL_TRACE_ERROR0("Update connection parameters failed!");
+ APPL_TRACE_ERROR("Update connection parameters failed!");
}
}
@@ -5167,7 +5167,7 @@
bta_dm_observe_results_cb, bta_dm_observe_cmpl_cb))!= BTM_CMD_STARTED)
{
tBTA_DM_SEARCH data;
- APPL_TRACE_WARNING2(" %s BTM_BleObserve failed. status %d",__FUNCTION__,status);
+ APPL_TRACE_WARNING(" %s BTM_BleObserve failed. status %d",__FUNCTION__,status);
data.inq_cmpl.num_resps = 0;
if (bta_dm_search_cb.p_scan_cback)
{
@@ -5391,7 +5391,7 @@
if ( bta_dm_search_cb.ble_raw_used + sizeof(tBTA_GATT_ID) < bta_dm_search_cb.ble_raw_size )
{
- APPL_TRACE_DEBUG3("ADDING BLE SERVICE uuid=0x%x, ble_ptr = 0x%x, ble_raw_used = 0x%x", service_id.uuid.uu.uuid16,bta_dm_search_cb.p_ble_rawdata,bta_dm_search_cb.ble_raw_used);
+ APPL_TRACE_DEBUG("ADDING BLE SERVICE uuid=0x%x, ble_ptr = 0x%x, ble_raw_used = 0x%x", service_id.uuid.uu.uuid16,bta_dm_search_cb.p_ble_rawdata,bta_dm_search_cb.ble_raw_used);
if(bta_dm_search_cb.p_ble_rawdata)
{
@@ -5402,16 +5402,16 @@
}
else
{
- APPL_TRACE_ERROR0("p_ble_rawdata is NULL");
+ APPL_TRACE_ERROR("p_ble_rawdata is NULL");
}
}
else
{
- APPL_TRACE_ERROR3("%s out of room to accomodate more service ids ble_raw_size = %d ble_raw_used = %d", __FUNCTION__,bta_dm_search_cb.ble_raw_size, bta_dm_search_cb.ble_raw_used );
+ APPL_TRACE_ERROR("%s out of room to accomodate more service ids ble_raw_size = %d ble_raw_used = %d", __FUNCTION__,bta_dm_search_cb.ble_raw_size, bta_dm_search_cb.ble_raw_used );
}
- APPL_TRACE_ERROR1("bta_dm_gatt_disc_result serivce_id len=%d ", service_id.uuid.len);
+ APPL_TRACE_ERROR("bta_dm_gatt_disc_result serivce_id len=%d ", service_id.uuid.len);
if ( bta_dm_search_cb.state != BTA_DM_SEARCH_IDLE)
{
@@ -5438,7 +5438,7 @@
{
tBTA_DM_MSG *p_msg;
- APPL_TRACE_DEBUG1("bta_dm_gatt_disc_complete conn_id = %d",conn_id);
+ APPL_TRACE_DEBUG("bta_dm_gatt_disc_complete conn_id = %d",conn_id);
if (bta_dm_search_cb.uuid_to_search > 0) bta_dm_search_cb.uuid_to_search --;
@@ -5583,14 +5583,14 @@
p1 = bta_dm_search_cb.peer_bdaddr;
p2 = p_data->remote_bda;
- APPL_TRACE_DEBUG5("DM Search state= %d search_cb.peer_dbaddr: [%08x%04x] connected_bda= [%08x%04x] ",
+ APPL_TRACE_DEBUG("DM Search state= %d search_cb.peer_dbaddr: [%08x%04x] connected_bda= [%08x%04x] ",
bta_dm_search_cb.state,
((p1[0])<<24)+((p1[1])<<16)+((p1[2])<<8)+(p1[3]),
((p1[4])<<8)+ p1[5],
((p2[0])<<24)+((p2[1])<<16)+((p2[2])<<8)+(p2[3]),
((p2[4])<<8)+ p2[5]);
- APPL_TRACE_DEBUG3("BTA_GATTC_OPEN_EVT conn_id = %d client_if=%d status = %d" ,
+ APPL_TRACE_DEBUG("BTA_GATTC_OPEN_EVT conn_id = %d client_if=%d status = %d" ,
p_data->conn_id,
p_data->client_if,
p_data->status);
@@ -5618,12 +5618,12 @@
*******************************************************************************/
static void bta_dm_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC *p_data)
{
- APPL_TRACE_DEBUG1("bta_dm_gattc_callback event = %d", event);
+ APPL_TRACE_DEBUG("bta_dm_gattc_callback event = %d", event);
switch (event)
{
case BTA_GATTC_REG_EVT:
- APPL_TRACE_DEBUG1("BTA_GATTC_REG_EVT client_if = %d", p_data->reg_oper.client_if);
+ APPL_TRACE_DEBUG("BTA_GATTC_REG_EVT client_if = %d", p_data->reg_oper.client_if);
if (p_data->reg_oper.status == BTA_GATT_OK)
bta_dm_search_cb.client_if = p_data->reg_oper.client_if;
else
@@ -5644,7 +5644,7 @@
break;
case BTA_GATTC_CLOSE_EVT:
- APPL_TRACE_DEBUG1("BTA_GATTC_CLOSE_EVT reason = %d", p_data->close.reason);
+ APPL_TRACE_DEBUG("BTA_GATTC_CLOSE_EVT reason = %d", p_data->close.reason);
/* in case of disconnect before search is completed */
if ( (bta_dm_search_cb.state != BTA_DM_SEARCH_IDLE) &&
!memcmp(p_data->close.remote_bda, bta_dm_search_cb.peer_bdaddr, BD_ADDR_LEN))
@@ -5713,7 +5713,7 @@
*******************************************************************************/
static void bta_dm_ctrl_features_rd_cmpl_cback(tBTM_STATUS result)
{
- APPL_TRACE_DEBUG2("%s status = %d ", __FUNCTION__, result);
+ APPL_TRACE_DEBUG("%s status = %d ", __FUNCTION__, result);
if (result == BTM_SUCCESS)
{
if(bta_dm_cb.p_sec_cback)
@@ -5721,7 +5721,7 @@
}
else
{
- APPL_TRACE_ERROR2("%s Ctrl BLE feature read failed: status :%d",__FUNCTION__, result);
+ APPL_TRACE_ERROR("%s Ctrl BLE feature read failed: status :%d",__FUNCTION__, result);
}
}
diff --git a/bta/dm/bta_dm_api.c b/bta/dm/bta_dm_api.c
index 92af9c7..0fb0b10 100644
--- a/bta/dm/bta_dm_api.c
+++ b/bta/dm/bta_dm_api.c
@@ -130,7 +130,7 @@
{
BT_HDR *p_msg;
- APPL_TRACE_API0("BTA_EnableTestMode");
+ APPL_TRACE_API("BTA_EnableTestMode");
if ((p_msg = (BT_HDR *) GKI_getbuf(sizeof(BT_HDR))) != NULL)
{
@@ -155,7 +155,7 @@
{
BT_HDR *p_msg;
- APPL_TRACE_API0("BTA_DisableTestMode");
+ APPL_TRACE_API("BTA_DisableTestMode");
if ((p_msg = (BT_HDR *) GKI_getbuf(sizeof(BT_HDR))) != NULL)
{
@@ -252,7 +252,7 @@
void BTA_DmSetScanParam (UINT16 page_scan_interval, UINT16 page_scan_window,
UINT16 inquiry_scan_interval, UINT16 inquiry_scan_window)
{
- APPL_TRACE_API4 ("BTA_DmSetScanParam: %d, %d, %d, %d",
+ APPL_TRACE_API ("BTA_DmSetScanParam: %d, %d, %d, %d",
page_scan_interval, page_scan_window,
inquiry_scan_interval, inquiry_scan_window);
@@ -495,7 +495,7 @@
UINT8 link_role;
BTM_GetRole(bd_addr, &link_role);
- APPL_TRACE_API1("BTA_DmIsMaster role:x%x", link_role);
+ APPL_TRACE_API("BTA_DmIsMaster role:x%x", link_role);
if(link_role == BTM_ROLE_MASTER)
{
is_master = TRUE;
@@ -1217,7 +1217,7 @@
{
bta_sys_cb.sys_features = sys_features;
- APPL_TRACE_API1("BTA_SysFeatures: sys_features = %d", sys_features);
+ APPL_TRACE_API("BTA_SysFeatures: sys_features = %d", sys_features);
}
/*******************************************************************************
@@ -1473,7 +1473,7 @@
#if BLE_INCLUDED == TRUE
tBTA_DM_API_BLE_ADV_PARAMS *p_msg;
- APPL_TRACE_API2 ("BTA_DmSetBleAdvParam: %d, %d", adv_int_min, adv_int_max);
+ APPL_TRACE_API ("BTA_DmSetBleAdvParam: %d, %d", adv_int_min, adv_int_max);
if ((p_msg = (tBTA_DM_API_BLE_ADV_PARAMS *) GKI_getbuf(sizeof(tBTA_DM_API_BLE_ADV_PARAMS))) != NULL)
{
@@ -1574,7 +1574,7 @@
{
tBTA_DM_API_BLE_OBSERVE *p_msg;
- APPL_TRACE_API1("BTA_DmBleBroadcast: start = %d ", start);
+ APPL_TRACE_API("BTA_DmBleBroadcast: start = %d ", start);
if ((p_msg = (tBTA_DM_API_BLE_OBSERVE *) GKI_getbuf(sizeof(tBTA_DM_API_BLE_OBSERVE))) != NULL)
{
@@ -1852,7 +1852,7 @@
tBTA_DM_API_BLE_MULTI_ADV_ENB *p_msg;
UINT16 len = sizeof(tBTA_BLE_ADV_PARAMS) + sizeof(tBTA_DM_API_BLE_MULTI_ADV_ENB);
- APPL_TRACE_API0 ("BTA_BleEnableAdvInstance");
+ APPL_TRACE_API ("BTA_BleEnableAdvInstance");
if ((p_msg = (tBTA_DM_API_BLE_MULTI_ADV_ENB *) GKI_getbuf(len)) != NULL)
{
@@ -1892,7 +1892,7 @@
tBTA_DM_API_BLE_MULTI_ADV_PARAM *p_msg;
UINT16 len = sizeof(tBTA_BLE_ADV_PARAMS) + sizeof(tBTA_DM_API_BLE_MULTI_ADV_PARAM);
- APPL_TRACE_API0 ("BTA_BleUpdateAdvInstParam");
+ APPL_TRACE_API ("BTA_BleUpdateAdvInstParam");
if (inst_id <= BTM_BLE_MULTI_ADV_MAX && inst_id != BTA_BLE_MULTI_ADV_ILLEGAL)
{
if ((p_msg = (tBTA_DM_API_BLE_MULTI_ADV_PARAM *) GKI_getbuf(len)) != NULL)
@@ -1936,7 +1936,7 @@
tBTA_DM_API_BLE_MULTI_ADV_DATA *p_msg;
UINT16 len = sizeof(tBTA_DM_API_BLE_MULTI_ADV_DATA) ;
- APPL_TRACE_API0 ("BTA_BleCfgAdvInstData");
+ APPL_TRACE_API ("BTA_BleCfgAdvInstData");
if (inst_id <= BTM_BLE_MULTI_ADV_MAX && inst_id != BTA_BLE_MULTI_ADV_ILLEGAL)
{
@@ -1973,7 +1973,7 @@
{
tBTA_DM_API_BLE_MULTI_ADV_DISABLE *p_msg;
- APPL_TRACE_API1 ("BTA_BleDisableAdvInstance: %d", inst_id);
+ APPL_TRACE_API ("BTA_BleDisableAdvInstance: %d", inst_id);
if (inst_id <= BTM_BLE_MULTI_ADV_MAX && inst_id != BTA_BLE_MULTI_ADV_ILLEGAL)
{
@@ -2053,7 +2053,7 @@
{
tBTA_DM_API_SET_ENCRYPTION *p_msg;
- APPL_TRACE_API0("BTA_DmSetEncryption"); //todo
+ APPL_TRACE_API("BTA_DmSetEncryption"); //todo
if ((p_msg = (tBTA_DM_API_SET_ENCRYPTION *) GKI_getbuf(sizeof(tBTA_DM_API_SET_ENCRYPTION))) != NULL)
{
memset(p_msg, 0, sizeof(tBTA_DM_API_SET_ENCRYPTION));
@@ -2086,7 +2086,7 @@
{
tBTA_DM_API_REMOVE_ACL *p_msg;
- APPL_TRACE_API0("BTA_DmCloseACL");
+ APPL_TRACE_API("BTA_DmCloseACL");
if ((p_msg = (tBTA_DM_API_REMOVE_ACL *) GKI_getbuf(sizeof(tBTA_DM_API_REMOVE_ACL))) != NULL)
{
@@ -2123,7 +2123,7 @@
{
tBTA_DM_API_BLE_OBSERVE *p_msg;
- APPL_TRACE_API1("BTA_DmBleObserve:start = %d ", start);
+ APPL_TRACE_API("BTA_DmBleObserve:start = %d ", start);
if ((p_msg = (tBTA_DM_API_BLE_OBSERVE *) GKI_getbuf(sizeof(tBTA_DM_API_BLE_OBSERVE))) != NULL)
{
diff --git a/bta/dm/bta_dm_main.c b/bta/dm/bta_dm_main.c
index c68dac55..250dd28 100644
--- a/bta/dm/bta_dm_main.c
+++ b/bta/dm/bta_dm_main.c
@@ -312,7 +312,7 @@
{
UINT16 event = p_msg->event & 0x00ff;
- APPL_TRACE_EVENT1("bta_dm_sm_execute event:0x%x", event);
+ APPL_TRACE_EVENT("bta_dm_sm_execute event:0x%x", event);
/* execute action functions */
if(event < BTA_DM_NUM_ACTIONS)
@@ -356,7 +356,7 @@
UINT8 action;
int i;
- APPL_TRACE_EVENT2("bta_dm_search_sm_execute state:%d, event:0x%x",
+ APPL_TRACE_EVENT("bta_dm_search_sm_execute state:%d, event:0x%x",
bta_dm_search_cb.state, p_msg->event);
/* look up the state table for the current state */
diff --git a/bta/dm/bta_dm_pm.c b/bta/dm/bta_dm_pm.c
index cb5da6f..b896880 100644
--- a/bta/dm/bta_dm_pm.c
+++ b/bta/dm/bta_dm_pm.c
@@ -105,7 +105,7 @@
{
if(bta_dm_cb.pm_timer[i].in_use)
{
- APPL_TRACE_DEBUG1("stop dm_pm_timer:%d", i);
+ APPL_TRACE_DEBUG("stop dm_pm_timer:%d", i);
bta_sys_stop_timer(&bta_dm_cb.pm_timer[i].timer);
bta_dm_cb.pm_timer[i].in_use = FALSE;
}
@@ -131,7 +131,7 @@
if(bta_dm_cb.pm_timer[i].in_use && !bdcmp(bta_dm_cb.pm_timer[i].peer_bdaddr, peer_addr))
{
- APPL_TRACE_DEBUG1("stop dm_pm_timer:%d", i);
+ APPL_TRACE_DEBUG("stop dm_pm_timer:%d", i);
bta_sys_stop_timer(&bta_dm_cb.pm_timer[i].timer);
bta_dm_cb.pm_timer[i].in_use = FALSE;
break;
@@ -162,7 +162,7 @@
#endif
tBTA_DM_PEER_DEVICE *p_dev;
- APPL_TRACE_DEBUG3("bta_dm_pm_cback: st(%d), id(%d), app(%d)", status, id, app_id);
+ APPL_TRACE_DEBUG("bta_dm_pm_cback: st(%d), id(%d), app(%d)", status, id, app_id);
btm_status = BTM_ReadLocalVersion (&vers);
p_dev = bta_dm_find_peer_device(peer_addr);
@@ -241,7 +241,7 @@
}
else
{
- APPL_TRACE_WARNING0("bta_dm_act no entry for connected service cbs");
+ APPL_TRACE_WARNING("bta_dm_act no entry for connected service cbs");
return;
}
}
@@ -250,7 +250,7 @@
/* check if we have more connected service that cbs */
if(bta_dm_conn_srvcs.count == BTA_DM_NUM_CONN_SRVS)
{
- APPL_TRACE_WARNING0("bta_dm_act no more connected service cbs");
+ APPL_TRACE_WARNING("bta_dm_act no more connected service cbs");
return;
}
@@ -259,7 +259,7 @@
bta_dm_conn_srvcs.conn_srvc[j].app_id = app_id;
bdcpy(bta_dm_conn_srvcs.conn_srvc[j].peer_bdaddr, peer_addr);
- APPL_TRACE_WARNING2("new conn_srvc id:%d, app_id:%d", id, app_id);
+ APPL_TRACE_WARNING("new conn_srvc id:%d, app_id:%d", id, app_id);
bta_dm_conn_srvcs.count++;
bta_dm_conn_srvcs.conn_srvc[j].state = status;
@@ -368,7 +368,7 @@
p_act0 = &p_pm_spec->actn_tbl[p_srvcs->state][0];
p_act1 = &p_pm_spec->actn_tbl[p_srvcs->state][1];
- APPL_TRACE_DEBUG3("bta_dm_pm_set_mode: srvcsid: %d, state: %d, j: %d", p_srvcs->id, p_srvcs->state, j);
+ APPL_TRACE_DEBUG("bta_dm_pm_set_mode: srvcsid: %d, state: %d, j: %d", p_srvcs->id, p_srvcs->state, j);
allowed_modes |= p_pm_spec->allow_mask;
/* PM actions are in the order of strictness */
@@ -433,7 +433,7 @@
bdcpy(bta_dm_cb.pm_timer[i].peer_bdaddr, peer_addr);
bta_dm_cb.pm_timer[i].timer.p_cback = bta_dm_pm_timer_cback;
bta_sys_start_timer(&bta_dm_cb.pm_timer[i].timer, 0, timeout);
- APPL_TRACE_DEBUG2("start dm_pm_timer:%d, %d", i, timeout);
+ APPL_TRACE_DEBUG("start dm_pm_timer:%d, %d", i, timeout);
return;
}
@@ -443,7 +443,7 @@
/* no more timers */
if(i==BTA_DM_NUM_PM_TIMER)
{
- APPL_TRACE_WARNING0("bta_dm_act dm_pm_timer no more");
+ APPL_TRACE_WARNING("bta_dm_act dm_pm_timer no more");
return;
}
}
@@ -469,7 +469,7 @@
}
else
{
- APPL_TRACE_DEBUG0("bta_dm_pm_set_mode: Link policy disallows SNIFF, ignore request");
+ APPL_TRACE_DEBUG("bta_dm_pm_set_mode: Link policy disallows SNIFF, ignore request");
}
}
else if(pm_action == BTA_DM_PM_ACTIVE)
@@ -529,13 +529,13 @@
BTM_ReadPowerMode(p_peer_dev->peer_bdaddr, &mode);
#if (BTM_SSR_INCLUDED == TRUE)
- APPL_TRACE_DEBUG3("bta_dm_pm_sniff cur:%d, idx:%d, info:x%x", mode, index, p_peer_dev->info);
+ APPL_TRACE_DEBUG("bta_dm_pm_sniff cur:%d, idx:%d, info:x%x", mode, index, p_peer_dev->info);
if (mode != BTM_PM_MD_SNIFF ||
(HCI_SNIFF_SUB_RATE_SUPPORTED(BTM_ReadLocalFeatures ()) &&
HCI_SNIFF_SUB_RATE_SUPPORTED(BTM_ReadRemoteFeatures (p_peer_dev->peer_bdaddr)) &&
!(p_peer_dev->info & BTA_DM_DI_USE_SSR)))
#else
- APPL_TRACE_DEBUG2("bta_dm_pm_sniff cur:%d, idx:%d", mode, index);
+ APPL_TRACE_DEBUG("bta_dm_pm_sniff cur:%d, idx:%d", mode, index);
if(mode != BTM_PM_MD_SNIFF)
#endif
{
@@ -554,12 +554,12 @@
}
else if (status == BTM_SUCCESS)
{
- APPL_TRACE_DEBUG0("bta_dm_pm_sniff BTM_SetPowerMode() returns BTM_SUCCESS");
+ APPL_TRACE_DEBUG("bta_dm_pm_sniff BTM_SetPowerMode() returns BTM_SUCCESS");
p_peer_dev->info &= ~(BTA_DM_DI_INT_SNIFF|BTA_DM_DI_ACP_SNIFF|BTA_DM_DI_SET_SNIFF);
}
else /* error */
{
- APPL_TRACE_ERROR1("bta_dm_pm_sniff BTM_SetPowerMode() returns ERROR status=%d", status);
+ APPL_TRACE_ERROR("bta_dm_pm_sniff BTM_SetPowerMode() returns ERROR status=%d", status);
p_peer_dev->info &= ~(BTA_DM_DI_INT_SNIFF|BTA_DM_DI_ACP_SNIFF|BTA_DM_DI_SET_SNIFF);
}
}
@@ -597,7 +597,7 @@
&& ((p_bta_dm_pm_cfg[j].app_id == BTA_ALL_APP_ID )
|| (p_bta_dm_pm_cfg[j].app_id == bta_dm_conn_srvcs.conn_srvc[i].app_id)))
{
- APPL_TRACE_WARNING2("bta_dm_pm_ssr conn_srvc id:%d, app_id:%d",
+ APPL_TRACE_WARNING("bta_dm_pm_ssr conn_srvc id:%d, app_id:%d",
bta_dm_conn_srvcs.conn_srvc[i].id, bta_dm_conn_srvcs.conn_srvc[i].app_id);
break;
}
@@ -625,7 +625,7 @@
}
p_spec = &p_bta_dm_ssr_spec[ssr];
- APPL_TRACE_WARNING2("bta_dm_pm_ssr:%d, lat:%d", ssr, p_spec->max_lat);
+ APPL_TRACE_WARNING("bta_dm_pm_ssr:%d, lat:%d", ssr, p_spec->max_lat);
if(p_spec->max_lat)
{
/* set the SSR parameters. */
@@ -698,7 +698,7 @@
tBTA_DM_PM_TIMER *p_buf;
UINT8 i;
- APPL_TRACE_WARNING0("dm_pm_timer expires");
+ APPL_TRACE_WARNING("dm_pm_timer expires");
for(i=0; i<BTA_DM_NUM_PM_TIMER; i++)
{
@@ -708,7 +708,7 @@
if(&bta_dm_cb.pm_timer[i].timer == (TIMER_LIST_ENT*) p_tle)
{
- APPL_TRACE_WARNING1("dm_pm_timer expires %d", i);
+ APPL_TRACE_WARNING("dm_pm_timer expires %d", i);
bta_dm_cb.pm_timer[i].in_use = FALSE;
break;
}
@@ -748,7 +748,7 @@
tBTA_DM_PEER_DEVICE *p_dev;
tBTA_DM_DEV_INFO info;
- APPL_TRACE_DEBUG1("bta_dm_pm_btm_status:%d", p_data->pm_status.status);
+ APPL_TRACE_DEBUG("bta_dm_pm_btm_status:%d", p_data->pm_status.status);
p_dev = bta_dm_find_peer_device(p_data->pm_status.bd_addr);
if(NULL == p_dev)
return;
@@ -762,7 +762,7 @@
we should not try it again*/
if (p_data->pm_status.hci_status != 0)
{
- APPL_TRACE_ERROR1("bta_dm_pm_btm_status hci_status=%d", p_data->pm_status.hci_status);
+ APPL_TRACE_ERROR("bta_dm_pm_btm_status hci_status=%d", p_data->pm_status.hci_status);
p_dev->info &= ~(BTA_DM_DI_INT_SNIFF|BTA_DM_DI_ACP_SNIFF|BTA_DM_DI_SET_SNIFF);
if(p_dev->pm_mode_attempted &(BTA_DM_PM_PARK | BTA_DM_PM_SNIFF))
@@ -838,7 +838,7 @@
void bta_dm_pm_timer(tBTA_DM_MSG *p_data)
{
- APPL_TRACE_WARNING0("proc dm_pm_timer expires");
+ APPL_TRACE_WARNING("proc dm_pm_timer expires");
bta_dm_pm_set_mode(p_data->pm_status.bd_addr, TRUE);
@@ -894,7 +894,7 @@
}
}
- APPL_TRACE_DEBUG1("bta_dm_is_sco_active: SCO active: %d", bScoActive);
+ APPL_TRACE_DEBUG("bta_dm_is_sco_active: SCO active: %d", bScoActive);
return bScoActive;
}
@@ -919,7 +919,7 @@
/* check if an entry already present */
if(bta_dm_conn_srvcs.conn_srvc[j].id == BTA_ID_HH )
{
- APPL_TRACE_DEBUG2 ("SCO status change(Active: %d), modify HID link policy. state: %d",
+ APPL_TRACE_DEBUG ("SCO status change(Active: %d), modify HID link policy. state: %d",
bScoActive, bta_dm_conn_srvcs.conn_srvc[j].state);
bta_dm_pm_set_sniff_policy( bta_dm_find_peer_device(bta_dm_conn_srvcs.conn_srvc[j].peer_bdaddr), bScoActive);
diff --git a/bta/dm/bta_dm_sco.c b/bta/dm/bta_dm_sco.c
index 803242b..109140a 100644
--- a/bta/dm/bta_dm_sco.c
+++ b/bta/dm/bta_dm_sco.c
@@ -247,7 +247,7 @@
SRC_TYPE *pOv, *pOvEnd;
INT16 *psBtOut = (INT16 *)pDst;
#if BTA_DM_SCO_DEBUG
- APPL_TRACE_DEBUG1("Convert_8M_ToBT_Filtered, CurrentPos %d\n", CurrentPos);
+ APPL_TRACE_DEBUG("Convert_8M_ToBT_Filtered, CurrentPos %d\n", CurrentPos);
#endif
memcpy (pOverlapArea + (BTA_DM_PCM_OVERLAP_SIZE * 2), pSrc, BTA_DM_PCM_OVERLAP_SIZE * 2);
@@ -411,7 +411,7 @@
INT16 *psBtOut = (INT16 *)pDst;
#if BTA_DM_SCO_DEBUG
- APPL_TRACE_DEBUG5("Convert_8S_ToBT_Filtered CurrentPos %d, SRC_TYPE %d, SRC_CHANNELS %d, \
+ APPL_TRACE_DEBUG("Convert_8S_ToBT_Filtered CurrentPos %d, SRC_TYPE %d, SRC_CHANNELS %d, \
dwSrcSamples %d, dwSrcSps %d", CurrentPos, sizeof (SRC_TYPE), SRC_CHANNELS, \
dwSrcSamples, dwSrcSps);
#endif
@@ -608,7 +608,7 @@
p_cb->can_be_filtered = 0;
#if BTA_DM_SCO_DEBUG
- APPL_TRACE_DEBUG2("bta_dm_pcm_init_samples: n_channels = %d bits = %d", n_channels, bits);
+ APPL_TRACE_DEBUG("bta_dm_pcm_init_samples: n_channels = %d bits = %d", n_channels, bits);
#endif
if(n_channels == 1)
{
@@ -642,11 +642,11 @@
}
#if BTA_DM_SCO_DEBUG
- APPL_TRACE_DEBUG2("bta_pcm_init_dwn_sample: cur_pos %d, src_sps %d", \
+ APPL_TRACE_DEBUG("bta_pcm_init_dwn_sample: cur_pos %d, src_sps %d", \
p_cb->cur_pos, p_cb->src_sps);
- APPL_TRACE_DEBUG3("bta_pcm_init_dwn_sample: bits %d, n_channels %d, sample_size %d, ", \
+ APPL_TRACE_DEBUG("bta_pcm_init_dwn_sample: bits %d, n_channels %d, sample_size %d, ", \
p_cb->bits, p_cb->n_channels, p_cb->sample_size);
- APPL_TRACE_DEBUG3("bta_pcm_init_dwn_sample: can_be_filtered %d, n_channels: %d, \
+ APPL_TRACE_DEBUG("bta_pcm_init_dwn_sample: can_be_filtered %d, n_channels: %d, \
divisor %d", p_cb->can_be_filtered, p_cb->n_channels, p_cb->divisor);
#endif
@@ -673,7 +673,7 @@
UINT32 out_sample;
#if BTA_DM_SCO_DEBUG
- APPL_TRACE_DEBUG1("bta_pcm_resample : insamples %d", (in_bytes / bta_dm_pcm_cb.divisor));
+ APPL_TRACE_DEBUG("bta_pcm_resample : insamples %d", (in_bytes / bta_dm_pcm_cb.divisor));
#endif
if(bta_dm_pcm_cb.can_be_filtered)
{
@@ -687,7 +687,7 @@
}
#if BTA_DM_SCO_DEBUG
- APPL_TRACE_DEBUG1("bta_pcm_resample : outsamples %d", out_sample);
+ APPL_TRACE_DEBUG("bta_pcm_resample : outsamples %d", out_sample);
#endif
return (out_sample * bta_dm_pcm_cb.sample_size);
diff --git a/bta/gatt/bta_gattc_act.c b/bta/gatt/bta_gattc_act.c
index 1b3261b..3068ec4 100644
--- a/bta/gatt/bta_gattc_act.c
+++ b/bta/gatt/bta_gattc_act.c
@@ -103,7 +103,7 @@
*******************************************************************************/
static void bta_gattc_enable(tBTA_GATTC_CB *p_cb)
{
- APPL_TRACE_DEBUG0("bta_gattc_enable");
+ APPL_TRACE_DEBUG("bta_gattc_enable");
if (p_cb->state == BTA_GATTC_STATE_DISABLED)
{
@@ -113,7 +113,7 @@
}
else
{
- APPL_TRACE_DEBUG0("GATTC is arelady enabled");
+ APPL_TRACE_DEBUG("GATTC is arelady enabled");
}
}
@@ -132,11 +132,11 @@
{
UINT8 i;
- APPL_TRACE_DEBUG0("bta_gattc_disable");
+ APPL_TRACE_DEBUG("bta_gattc_disable");
if (p_cb->state != BTA_GATTC_STATE_ENABLED)
{
- APPL_TRACE_ERROR0("not enabled or disable in pogress");
+ APPL_TRACE_ERROR("not enabled or disable in pogress");
return;
}
@@ -183,7 +183,7 @@
tBTA_GATT_STATUS status = BTA_GATT_NO_RESOURCES;
- APPL_TRACE_DEBUG1("bta_gattc_register state %d",p_cb->state);
+ APPL_TRACE_DEBUG("bta_gattc_register state %d",p_cb->state);
memset(&cb_data, 0, sizeof(cb_data));
cb_data.reg_oper.status = BTA_GATT_NO_RESOURCES;
@@ -199,7 +199,7 @@
{
if ((p_app_uuid == NULL) || (p_cb->cl_rcb[i].client_if = GATT_Register(p_app_uuid, &bta_gattc_cl_cback)) == 0)
{
- APPL_TRACE_ERROR0("Register with GATT stack failed.");
+ APPL_TRACE_ERROR("Register with GATT stack failed.");
status = BTA_GATT_ERROR;
}
else
@@ -260,7 +260,7 @@
}
else
{
- APPL_TRACE_ERROR1("Unable to start app.: Unknown interface =%d",p_msg->int_start_if.client_if );
+ APPL_TRACE_ERROR("Unable to start app.: Unknown interface =%d",p_msg->int_start_if.client_if );
}
}
/*******************************************************************************
@@ -316,7 +316,7 @@
}
else
{
- APPL_TRACE_ERROR0("bta_gattc_deregister Deregister Failedm unknown client cif");
+ APPL_TRACE_ERROR("bta_gattc_deregister Deregister Failedm unknown client cif");
}
}
/*******************************************************************************
@@ -347,7 +347,7 @@
}
else
{
- APPL_TRACE_ERROR0("No resources to open a new connection.");
+ APPL_TRACE_ERROR("No resources to open a new connection.");
bta_gattc_send_open_cback(p_clreg,
BTA_GATT_NO_RESOURCES,
@@ -363,7 +363,7 @@
}
else
{
- APPL_TRACE_ERROR1("bta_gattc_process_api_open Failed, unknown client_if: %d",
+ APPL_TRACE_ERROR("bta_gattc_process_api_open Failed, unknown client_if: %d",
p_msg->api_conn.client_if);
}
}
@@ -394,7 +394,7 @@
}
else
{
- APPL_TRACE_ERROR0("No such connection need to be cancelled");
+ APPL_TRACE_ERROR("No such connection need to be cancelled");
p_clreg = bta_gattc_cl_get_regcb(p_msg->api_cancel_conn.client_if);
@@ -473,7 +473,7 @@
{
UNUSED(p_data);
- APPL_TRACE_ERROR0("Connection already opened. wrong state");
+ APPL_TRACE_ERROR("Connection already opened. wrong state");
bta_gattc_send_open_cback(p_clcb->p_rcb,
BTA_GATT_OK,
@@ -522,7 +522,7 @@
if (!GATT_Connect(p_clcb->p_rcb->client_if, p_data->api_conn.remote_bda,
TRUE, p_data->api_conn.transport))
{
- APPL_TRACE_ERROR0("Connection open failure");
+ APPL_TRACE_ERROR("Connection open failure");
bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_OPEN_FAIL_EVT, p_data);
}
@@ -563,7 +563,7 @@
if (!GATT_Connect(p_data->client_if, p_data->remote_bda, FALSE, p_data->transport))
{
status = BTA_GATT_ERROR;
- APPL_TRACE_ERROR0("bta_gattc_init_bk_conn failed");
+ APPL_TRACE_ERROR("bta_gattc_init_bk_conn failed");
}
else
{
@@ -619,7 +619,7 @@
}
else
{
- APPL_TRACE_ERROR0("bta_gattc_cancel_bk_conn failed");
+ APPL_TRACE_ERROR("bta_gattc_cancel_bk_conn failed");
}
}
p_clreg = bta_gattc_cl_get_regcb(p_data->client_if);
@@ -690,11 +690,11 @@
void bta_gattc_conn(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
tBTA_GATTC_IF gatt_if;
- APPL_TRACE_DEBUG1("bta_gattc_conn server cache state=%d",p_clcb->p_srcb->state);
+ APPL_TRACE_DEBUG("bta_gattc_conn server cache state=%d",p_clcb->p_srcb->state);
if (p_data != NULL)
{
- APPL_TRACE_DEBUG1("bta_gattc_conn conn_id=%d",p_data->hdr.layer_specific);
+ APPL_TRACE_DEBUG("bta_gattc_conn conn_id=%d",p_data->hdr.layer_specific);
p_clcb->bta_conn_id = p_data->int_conn.hdr.layer_specific;
GATT_GetConnectionInfor(p_data->hdr.layer_specific,
@@ -785,7 +785,7 @@
tBTA_GATTC_RCB *p_clreg = p_clcb->p_rcb;
tBTA_GATTC cb_data;
- APPL_TRACE_DEBUG1("bta_gattc_close conn_id=%d",p_clcb->bta_conn_id);
+ APPL_TRACE_DEBUG("bta_gattc_close conn_id=%d",p_clcb->bta_conn_id);
cb_data.close.client_if = p_clcb->p_rcb->client_if;
cb_data.close.conn_id = p_clcb->bta_conn_id;
@@ -849,7 +849,7 @@
*******************************************************************************/
void bta_gattc_disc_close(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
- APPL_TRACE_DEBUG1("Discovery cancel conn_id=%d",p_clcb->bta_conn_id);
+ APPL_TRACE_DEBUG("Discovery cancel conn_id=%d",p_clcb->bta_conn_id);
bta_gattc_reset_discover_st(p_clcb->p_srcb, BTA_GATT_ERROR);
bta_gattc_sm_execute(p_clcb, BTA_GATTC_API_CLOSE_EVT, p_data);
@@ -944,7 +944,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG2("bta_gattc_start_discover conn_id=%d p_clcb->p_srcb->state = %d ",
+ APPL_TRACE_DEBUG("bta_gattc_start_discover conn_id=%d p_clcb->p_srcb->state = %d ",
p_clcb->bta_conn_id, p_clcb->p_srcb->state);
if (((p_clcb->p_q_cmd == NULL || p_clcb->auto_update == BTA_GATTC_REQ_WAITING) &&
@@ -974,13 +974,13 @@
}
if (p_clcb->status != BTA_GATT_OK)
{
- APPL_TRACE_ERROR0("discovery on server failed");
+ APPL_TRACE_ERROR("discovery on server failed");
bta_gattc_reset_discover_st(p_clcb->p_srcb, p_clcb->status);
}
}
else
{
- APPL_TRACE_ERROR0("unknown device, can not start discovery");
+ APPL_TRACE_ERROR("unknown device, can not start discovery");
}
}
/* pending operation, wait until it finishes */
@@ -1007,7 +1007,7 @@
tBTA_GATTC_DATA *p_q_cmd = p_clcb->p_q_cmd;
UNUSED(p_data);
- APPL_TRACE_DEBUG1("bta_gattc_disc_cmpl conn_id=%d",p_clcb->bta_conn_id);
+ APPL_TRACE_DEBUG("bta_gattc_disc_cmpl conn_id=%d",p_clcb->bta_conn_id);
#if BLE_INCLUDED == TRUE
if(p_clcb->transport == BTA_TRANSPORT_LE)
@@ -1136,7 +1136,7 @@
}
else
{
- APPL_TRACE_ERROR1("invalud ID type: %d", p_id->id_type);
+ APPL_TRACE_ERROR("invalud ID type: %d", p_id->id_type);
}
if (handle == 0)
@@ -1264,14 +1264,14 @@
&p_data->api_confirm.char_id,
NULL)) == 0)
{
- APPL_TRACE_ERROR0("Can not map service/char ID into valid handle");
+ APPL_TRACE_ERROR("Can not map service/char ID into valid handle");
}
else
{
if (GATTC_SendHandleValueConfirm(p_data->api_confirm.hdr.layer_specific, handle)
!= GATT_SUCCESS)
{
- APPL_TRACE_ERROR1("bta_gattc_confirm to handle [0x%04x] failed", handle);
+ APPL_TRACE_ERROR("bta_gattc_confirm to handle [0x%04x] failed", handle);
}
else
{
@@ -1313,7 +1313,7 @@
&cb_data.read.descr_type) == FALSE)
{
cb_data.read.status = BTA_GATT_INTERNAL_ERROR;
- APPL_TRACE_ERROR1("can not map to GATT ID. handle = 0x%04x",
+ APPL_TRACE_ERROR("can not map to GATT ID. handle = 0x%04x",
p_data->p_cmpl->att_value.handle);
}
else
@@ -1463,17 +1463,17 @@
UINT8 op = (UINT8)p_data->op_cmpl.op_code;
UINT8 mapped_op = 0;
- APPL_TRACE_DEBUG1("bta_gattc_op_cmpl op = %d", op);
+ APPL_TRACE_DEBUG("bta_gattc_op_cmpl op = %d", op);
if (op == GATTC_OPTYPE_INDICATION || op == GATTC_OPTYPE_NOTIFICATION)
{
- APPL_TRACE_ERROR0("unexpected operation, ignored");
+ APPL_TRACE_ERROR("unexpected operation, ignored");
}
else if (op >= GATTC_OPTYPE_READ)
{
if (p_clcb->p_q_cmd == NULL)
{
- APPL_TRACE_ERROR0("No pending command");
+ APPL_TRACE_ERROR("No pending command");
return;
}
if (p_clcb->p_q_cmd->hdr.event != bta_gattc_opcode_to_int_evt[op - GATTC_OPTYPE_READ])
@@ -1482,11 +1482,11 @@
if ( mapped_op > GATTC_OPTYPE_INDICATION) mapped_op = 0;
#if (BT_TRACE_VERBOSE == TRUE)
- APPL_TRACE_ERROR3("expect op:(%s :0x%04x), receive unexpected operation (%s).",
+ APPL_TRACE_ERROR("expect op:(%s :0x%04x), receive unexpected operation (%s).",
bta_gattc_op_code_name[mapped_op] , p_clcb->p_q_cmd->hdr.event,
bta_gattc_op_code_name[op]);
#else
- APPL_TRACE_ERROR3("expect op:(%u :0x%04x), receive unexpected operation (%u).",
+ APPL_TRACE_ERROR("expect op:(%u :0x%04x), receive unexpected operation (%u).",
mapped_op , p_clcb->p_q_cmd->hdr.event, op);
#endif
return;
@@ -1526,7 +1526,7 @@
/* receive op complete when discovery is started, ignore the response,
and wait for discovery finish and resent */
- APPL_TRACE_DEBUG1("bta_gattc_ignore_op_cmpl op = %d", p_data->hdr.layer_specific);
+ APPL_TRACE_DEBUG("bta_gattc_ignore_op_cmpl op = %d", p_data->hdr.layer_specific);
}
/*******************************************************************************
@@ -1542,7 +1542,7 @@
{
tBTA_GATT_STATUS status = GATT_INTERNAL_ERROR;
tBTA_GATTC cb_data;
- APPL_TRACE_DEBUG1("bta_gattc_search conn_id=%d",p_clcb->bta_conn_id);
+ APPL_TRACE_DEBUG("bta_gattc_search conn_id=%d",p_clcb->bta_conn_id);
if (p_clcb->p_srcb && p_clcb->p_srcb->p_srvc_cache)
{
status = BTA_GATT_OK;
@@ -1584,7 +1584,7 @@
bta_gattc_set_discover_st(p_clcb->p_srcb);
- APPL_TRACE_DEBUG1("bta_gattc_cache_open conn_id=%d",p_clcb->bta_conn_id);
+ APPL_TRACE_DEBUG("bta_gattc_cache_open conn_id=%d",p_clcb->bta_conn_id);
bta_gattc_co_cache_open(p_clcb->p_srcb->server_bda, BTA_GATTC_CI_CACHE_OPEN_EVT,
p_clcb->bta_conn_id, FALSE);
}
@@ -1599,7 +1599,7 @@
*******************************************************************************/
void bta_gattc_ci_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
- APPL_TRACE_DEBUG2("bta_gattc_ci_open conn_id=%d server state=%d" ,
+ APPL_TRACE_DEBUG("bta_gattc_ci_open conn_id=%d server state=%d" ,
p_clcb->bta_conn_id, p_clcb->p_srcb->state);
if (p_clcb->p_srcb->state == BTA_GATTC_SERV_LOAD)
{
@@ -1648,7 +1648,7 @@
void bta_gattc_ci_load(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
- APPL_TRACE_DEBUG2("bta_gattc_ci_load conn_id=%d load status=%d" ,
+ APPL_TRACE_DEBUG("bta_gattc_ci_load conn_id=%d load status=%d" ,
p_clcb->bta_conn_id, p_data->ci_load.status );
bta_gattc_co_cache_close(p_clcb->p_srcb->server_bda, 0);
@@ -1696,7 +1696,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG1("bta_gattc_ci_save conn_id=%d " ,
+ APPL_TRACE_DEBUG("bta_gattc_ci_save conn_id=%d " ,
p_clcb->bta_conn_id );
if (!bta_gattc_cache_save(p_clcb->p_srcb, p_clcb->bta_conn_id))
@@ -1721,7 +1721,7 @@
if (p_clcb->status == BTA_GATT_OK)
{
- APPL_TRACE_ERROR1("operation not supported at current state [%d]", p_clcb->state);
+ APPL_TRACE_ERROR("operation not supported at current state [%d]", p_clcb->state);
}
}
@@ -1774,7 +1774,7 @@
{
tBTA_GATTC_DATA *p_buf;
- APPL_TRACE_DEBUG4("bta_gattc_conn_cback: cif = %d connected = %d conn_id = %d reaosn = 0x%04x",
+ APPL_TRACE_DEBUG("bta_gattc_conn_cback: cif = %d connected = %d conn_id = %d reaosn = 0x%04x",
gattc_if, connected, conn_id, reason);
if ((p_buf = (tBTA_GATTC_DATA *) GKI_getbuf(sizeof(tBTA_GATTC_DATA))) != NULL)
@@ -1823,7 +1823,7 @@
}
#endif
- APPL_TRACE_DEBUG1("bta_gattc_enc_cmpl_cback: cif = %d", gattc_if);
+ APPL_TRACE_DEBUG("bta_gattc_enc_cmpl_cback: cif = %d", gattc_if);
if ((p_buf = (tBTA_GATTC_DATA *) GKI_getbuf(sizeof(tBTA_GATTC_DATA))) != NULL)
{
@@ -1971,10 +1971,10 @@
tGATT_CL_COMPLETE *p_data,
tBTA_GATTC_NOTIFY *p_notify)
{
- APPL_TRACE_DEBUG2("bta_gattc_proc_other_indication check \
+ APPL_TRACE_DEBUG("bta_gattc_proc_other_indication check \
p_data->att_value.handle=%d p_data->handle=%d",
p_data->att_value.handle, p_data->handle);
- APPL_TRACE_DEBUG1("is_notify", p_notify->is_notify);
+ APPL_TRACE_DEBUG("is_notify", p_notify->is_notify);
p_notify->is_notify = (op == GATTC_OPTYPE_INDICATION) ? FALSE : TRUE;
p_notify->len = p_data->att_value.len;
@@ -2008,19 +2008,19 @@
if (!GATT_GetConnectionInfor(conn_id, &gatt_if, remote_bda, &transport))
{
- APPL_TRACE_ERROR0("indication/notif for unknown app");
+ APPL_TRACE_ERROR("indication/notif for unknown app");
return;
}
if ((p_clrcb = bta_gattc_cl_get_regcb(gatt_if)) == NULL)
{
- APPL_TRACE_ERROR0("indication/notif for unregistered app");
+ APPL_TRACE_ERROR("indication/notif for unregistered app");
return;
}
if ((p_srcb = bta_gattc_find_srcb(remote_bda)) == NULL)
{
- APPL_TRACE_ERROR0("indication/notif for unknown device, ignore");
+ APPL_TRACE_ERROR("indication/notif for unknown device, ignore");
return;
}
@@ -2049,7 +2049,7 @@
}
else
{
- APPL_TRACE_ERROR0("No resources");
+ APPL_TRACE_ERROR("No resources");
}
}
@@ -2059,14 +2059,14 @@
/* no one intersted and need ack? */
else if (op == GATTC_OPTYPE_INDICATION)
{
- APPL_TRACE_DEBUG0("no one interested, ack now");
+ APPL_TRACE_DEBUG("no one interested, ack now");
GATTC_SendHandleValueConfirm(conn_id, handle);
}
}
}
else
{
- APPL_TRACE_ERROR1("Indi/Notif for Unknown handle[0x%04x], can not find in local cache.",
+ APPL_TRACE_ERROR("Indi/Notif for Unknown handle[0x%04x], can not find in local cache.",
handle);
}
}
@@ -2086,7 +2086,7 @@
tBTA_GATTC_OP_CMPL *p_buf;
UINT16 len = sizeof(tBTA_GATTC_OP_CMPL) + sizeof(tGATT_CL_COMPLETE);
- APPL_TRACE_DEBUG3("bta_gattc_cmpl_cback: conn_id = %d op = %d status = %d",
+ APPL_TRACE_DEBUG("bta_gattc_cmpl_cback: conn_id = %d op = %d status = %d",
conn_id, op, status);
/* notification and indication processed right away */
@@ -2098,7 +2098,7 @@
/* for all other operation, not expected if w/o connection */
else if ((p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id)) == NULL)
{
- APPL_TRACE_ERROR1("bta_gattc_cmpl_cback unknown conn_id = %d, ignore data", conn_id);
+ APPL_TRACE_ERROR("bta_gattc_cmpl_cback unknown conn_id = %d, ignore data", conn_id);
return;
}
@@ -2147,7 +2147,7 @@
/* should always get the connection ID */
if (GATT_GetConnIdIfConnected(cif, remote_bda, &conn_id, BTA_GATT_TRANSPORT_LE) == FALSE)
{
- APPL_TRACE_ERROR0("bta_gattc_init_clcb_conn ERROR: not a connected device");
+ APPL_TRACE_ERROR("bta_gattc_init_clcb_conn ERROR: not a connected device");
return;
}
@@ -2164,7 +2164,7 @@
}
else
{
- APPL_TRACE_ERROR0("No resources");
+ APPL_TRACE_ERROR("No resources");
}
}
/*******************************************************************************
@@ -2214,7 +2214,7 @@
if (p_clreg == NULL)
{
- APPL_TRACE_ERROR1("bta_gattc_listen failed, unknown client_if: %d",
+ APPL_TRACE_ERROR("bta_gattc_listen failed, unknown client_if: %d",
p_msg->api_listen.client_if);
return;
}
@@ -2228,7 +2228,7 @@
p_msg->api_listen.start,
p_msg->api_listen.remote_bda))
{
- APPL_TRACE_ERROR0("Listen failure");
+ APPL_TRACE_ERROR("Listen failure");
(*p_clreg->p_cback)(BTA_GATTC_LISTEN_EVT, &cb_data);
}
else
@@ -2257,7 +2257,7 @@
/* if listen to all */
else
{
- APPL_TRACE_ERROR0("Listen For All now");
+ APPL_TRACE_ERROR("Listen For All now");
/* go through all connected device and send
callback for all connected slave connection */
bta_gattc_process_listen_all(p_msg->api_listen.client_if);
diff --git a/bta/gatt/bta_gattc_api.c b/bta/gatt/bta_gattc_api.c
index 87ad1ef..d83155f 100644
--- a/bta/gatt/bta_gattc_api.c
+++ b/bta/gatt/bta_gattc_api.c
@@ -60,7 +60,7 @@
if (bta_sys_is_register(BTA_ID_GATTC) == FALSE)
{
- APPL_TRACE_WARNING0("GATTC Module not enabled/already disabled");
+ APPL_TRACE_WARNING("GATTC Module not enabled/already disabled");
return;
}
if ((p_buf = (BT_HDR *) GKI_getbuf(sizeof(BT_HDR))) != NULL)
@@ -861,7 +861,7 @@
{
tBTA_GATTC_API_CONFIRM *p_buf;
- APPL_TRACE_API3("BTA_GATTC_SendIndConfirm conn_id=%d service uuid1=0x%x char uuid=0x%x",
+ APPL_TRACE_API("BTA_GATTC_SendIndConfirm conn_id=%d service uuid1=0x%x char uuid=0x%x",
conn_id, p_char_id->srvc_id.id.uuid.uu.uuid16, p_char_id->char_id.uuid.uu.uuid16);
if ((p_buf = (tBTA_GATTC_API_CONFIRM *) GKI_getbuf(sizeof(tBTA_GATTC_API_CONFIRM))) != NULL)
@@ -903,7 +903,7 @@
if (!p_char_id)
{
- APPL_TRACE_ERROR0("deregistration failed, unknow char id");
+ APPL_TRACE_ERROR("deregistration failed, unknow char id");
return status;
}
@@ -915,7 +915,7 @@
!memcmp(p_clreg->notif_reg[i].remote_bda, bda, BD_ADDR_LEN) &&
bta_gattc_charid_compare(&p_clreg->notif_reg[i].char_id, p_char_id))
{
- APPL_TRACE_WARNING0("notification already registered");
+ APPL_TRACE_WARNING("notification already registered");
status = BTA_GATT_OK;
break;
}
@@ -942,13 +942,13 @@
if (i == BTA_GATTC_NOTIF_REG_MAX)
{
status = BTA_GATT_NO_RESOURCES;
- APPL_TRACE_ERROR0("Max Notification Reached, registration failed.");
+ APPL_TRACE_ERROR("Max Notification Reached, registration failed.");
}
}
}
else
{
- APPL_TRACE_ERROR1("Client_if: %d Not Registered", client_if);
+ APPL_TRACE_ERROR("Client_if: %d Not Registered", client_if);
}
return status;
@@ -977,7 +977,7 @@
if (!p_char_id)
{
- APPL_TRACE_ERROR0("deregistration failed, unknow char id");
+ APPL_TRACE_ERROR("deregistration failed, unknow char id");
return status;
}
@@ -989,7 +989,7 @@
!memcmp(p_clreg->notif_reg[i].remote_bda, bda, BD_ADDR_LEN) &&
bta_gattc_charid_compare(&p_clreg->notif_reg[i].char_id, p_char_id))
{
- APPL_TRACE_DEBUG0("Deregistered.");
+ APPL_TRACE_DEBUG("Deregistered.");
memset(&p_clreg->notif_reg[i], 0, sizeof(tBTA_GATTC_NOTIF_REG));
status = BTA_GATT_OK;
break;
@@ -999,12 +999,12 @@
{
status = BTA_GATT_ERROR;
- APPL_TRACE_ERROR0("registration not found");
+ APPL_TRACE_ERROR("registration not found");
}
}
else
{
- APPL_TRACE_ERROR1("Client_if: %d Not Registered", client_if);
+ APPL_TRACE_ERROR("Client_if: %d Not Registered", client_if);
}
return status;
diff --git a/bta/gatt/bta_gattc_cache.c b/bta/gatt/bta_gattc_cache.c
index cf0cf95..65026ba 100644
--- a/bta/gatt/bta_gattc_cache.c
+++ b/bta/gatt/bta_gattc_cache.c
@@ -70,11 +70,11 @@
tBTA_GATTC_CACHE *p_cur_srvc = p_cache;
tBTA_GATTC_CACHE_ATTR *p_attr;
- APPL_TRACE_ERROR0("<================Start Server Cache =============>");
+ APPL_TRACE_ERROR("<================Start Server Cache =============>");
while (p_cur_srvc)
{
- APPL_TRACE_ERROR6("Service[%d]: handle[%d ~ %d] %s[0x%04x] inst[%d]",
+ APPL_TRACE_ERROR("Service[%d]: handle[%d ~ %d] %s[0x%04x] inst[%d]",
i, p_cur_srvc->s_handle, p_cur_srvc->e_handle,
((p_cur_srvc->service_uuid.id.uuid.len == 2) ? "uuid16" : "uuid128"),
p_cur_srvc->service_uuid.id.uuid.uu.uuid16,
@@ -85,7 +85,7 @@
for (j = 0; p_attr; j ++ )
{
- APPL_TRACE_ERROR6("\t Attr[0x%04x] handle[%d] uuid[0x%04x] inst[%d] type[%s] prop[0x%1x]",
+ APPL_TRACE_ERROR("\t Attr[0x%04x] handle[%d] uuid[0x%04x] inst[%d] type[%s] prop[0x%1x]",
j + 1, p_attr->attr_handle, p_attr->p_uuid->uuid16, p_attr->inst_id,
bta_gattc_attr_type[p_attr->attr_type], p_attr->property);
@@ -94,8 +94,8 @@
p_cur_srvc = p_cur_srvc->p_next;
}
- APPL_TRACE_ERROR0("<================End Server Cache =============>");
- APPL_TRACE_ERROR0(" ");
+ APPL_TRACE_ERROR("<================End Server Cache =============>");
+ APPL_TRACE_ERROR(" ");
}
/*******************************************************************************
@@ -112,14 +112,14 @@
UINT8 i;
tBTA_GATTC_ATTR_REC *pp = p_rec;
- APPL_TRACE_ERROR0("<================Start Explore Queue =============>");
+ APPL_TRACE_ERROR("<================Start Explore Queue =============>");
for (i = 0; i < num_rec; i ++, pp ++)
{
- APPL_TRACE_ERROR5("\t rec[%d] uuid[0x%04x] s_handle[%d] e_handle[%d] is_primary[%d]",
+ APPL_TRACE_ERROR("\t rec[%d] uuid[0x%04x] s_handle[%d] e_handle[%d] is_primary[%d]",
i + 1, pp->uuid.uu.uuid16, pp->s_handle, pp->e_handle, pp->is_primary);
}
- APPL_TRACE_ERROR0("<================ End Explore Queue =============>");
- APPL_TRACE_ERROR0(" ");
+ APPL_TRACE_ERROR("<================ End Explore Queue =============>");
+ APPL_TRACE_ERROR(" ");
}
#endif /* BTA_GATT_DEBUG == TRUE */
@@ -140,7 +140,7 @@
if ((p_buf = (BT_HDR *)GKI_getpoolbuf(GATT_DB_POOL_ID)) == NULL)
{
- APPL_TRACE_DEBUG0("No resources: GKI buffer allocation failed.");
+ APPL_TRACE_DEBUG("No resources: GKI buffer allocation failed.");
utl_freebuf((void **)&p_srvc_cb->p_srvc_list);
p_srvc_cb->free_byte = 0;
}
@@ -154,7 +154,7 @@
GKI_enqueue(&p_srvc_cb->cache_buffer, p_buf);
}
#if BTA_GATT_DEBUG== TRUE
- APPL_TRACE_DEBUG1("allocating new buffer: free byte = %d", p_srvc_cb->free_byte);
+ APPL_TRACE_DEBUG("allocating new buffer: free byte = %d", p_srvc_cb->free_byte);
#endif
return p_buf;
}
@@ -178,7 +178,7 @@
if ((p_srvc_cb->p_srvc_list = (tBTA_GATTC_ATTR_REC*)GKI_getbuf(BTA_GATTC_ATTR_LIST_SIZE)) == NULL)
{
- APPL_TRACE_DEBUG0("No resources: GKI buffer allocation failed.");
+ APPL_TRACE_DEBUG("No resources: GKI buffer allocation failed.");
status = GATT_NO_RESOURCES;
}
else
@@ -301,8 +301,8 @@
tBTA_GATT_STATUS status = BTA_GATT_OK;
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("Add a service into Service");
- APPL_TRACE_DEBUG2("free byte = %d, req %d bytes.", p_srvc_cb->free_byte, sizeof(tBTA_GATTC_CACHE))
+ APPL_TRACE_DEBUG("Add a service into Service");
+ APPL_TRACE_DEBUG("free byte = %d, req %d bytes.", p_srvc_cb->free_byte, sizeof(tBTA_GATTC_CACHE))
#endif
if (p_srvc_cb->free_byte < sizeof(tBTA_GATTC_CACHE))
@@ -357,14 +357,14 @@
UINT8 *pp;
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG1("bta_gattc_add_attr_to_cache: Add a [%s] into Service", bta_gattc_attr_type[type]);
- APPL_TRACE_DEBUG4("handle=%d uuid16=0x%x property=0x%x type=%d", handle, p_uuid->uu.uuid16, property, type);
- APPL_TRACE_DEBUG2("free byte = %d, req %d bytes.", p_srvc_cb->free_byte, len);
+ APPL_TRACE_DEBUG("bta_gattc_add_attr_to_cache: Add a [%s] into Service", bta_gattc_attr_type[type]);
+ APPL_TRACE_DEBUG("handle=%d uuid16=0x%x property=0x%x type=%d", handle, p_uuid->uu.uuid16, property, type);
+ APPL_TRACE_DEBUG("free byte = %d, req %d bytes.", p_srvc_cb->free_byte, len);
#endif
if (p_srvc_cb->p_cur_srvc == NULL)
{
- APPL_TRACE_ERROR0("Illegal action to add char/descr/incl srvc before adding a service!");
+ APPL_TRACE_ERROR("Illegal action to add char/descr/incl srvc before adding a service!");
return GATT_WRONG_STATE;
}
@@ -447,7 +447,7 @@
*p_e_hdl = p_rec->e_handle;
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG2("discover range [%d ~ %d]",p_rec->s_handle, p_rec->e_handle);
+ APPL_TRACE_DEBUG("discover range [%d ~ %d]",p_rec->s_handle, p_rec->e_handle);
#endif
return;
}
@@ -552,7 +552,7 @@
*******************************************************************************/
void bta_gattc_start_disc_char_dscp(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb)
{
- APPL_TRACE_DEBUG0("starting discover characteristics descriptor");
+ APPL_TRACE_DEBUG("starting discover characteristics descriptor");
if (bta_gattc_discover_procedure(conn_id, p_srvc_cb, GATT_DISC_CHAR_DSCPT) != 0)
bta_gattc_char_dscpt_disc_cmpl(conn_id, p_srvc_cb);
@@ -572,13 +572,13 @@
tBTA_GATTC_ATTR_REC *p_rec = p_srvc_cb->p_srvc_list + p_srvc_cb->cur_srvc_idx;
tBTA_GATTC_CLCB *p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id);
- APPL_TRACE_DEBUG1("Start service discovery: srvc_idx = %d", p_srvc_cb->cur_srvc_idx);
+ APPL_TRACE_DEBUG("Start service discovery: srvc_idx = %d", p_srvc_cb->cur_srvc_idx);
p_srvc_cb->cur_char_idx = p_srvc_cb->next_avail_idx = p_srvc_cb->total_srvc;
if (p_clcb == NULL)
{
- APPL_TRACE_ERROR0("unknown connection ID");
+ APPL_TRACE_ERROR("unknown connection ID");
return;
}
/* start expore a service if there is service not been explored */
@@ -598,7 +598,7 @@
}
}
/* no service found at all, the end of server discovery*/
- APPL_TRACE_ERROR0("No More Service found");
+ APPL_TRACE_ERROR("No More Service found");
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
bta_gattc_display_cache_server(p_srvc_cb->p_srvc_cache);
@@ -687,7 +687,7 @@
/* all characteristic has been explored, start with next service if any */
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_ERROR0("all char has been explored");
+ APPL_TRACE_ERROR("all char has been explored");
#endif
p_srvc_cb->cur_srvc_idx ++;
bta_gattc_explore_srvc (conn_id, p_srvc_cb);
@@ -704,7 +704,7 @@
if (!GATT_HANDLE_IS_VALID(s_handle) || !GATT_HANDLE_IS_VALID(e_handle))
{
- APPL_TRACE_ERROR2("invalid included service handle: [0x%04x ~ 0x%04x]", s_handle, e_handle);
+ APPL_TRACE_ERROR("invalid included service handle: [0x%04x ~ 0x%04x]", s_handle, e_handle);
exist_srvc = TRUE;
}
else
@@ -745,7 +745,7 @@
p_srvc_cb->total_srvc ++;
- APPL_TRACE_DEBUG2("bta_gattc_add_srvc_to_list handle = %d, service type = 0x%04x",
+ APPL_TRACE_DEBUG("bta_gattc_add_srvc_to_list handle = %d, service type = 0x%04x",
s_handle, uuid.uu.uuid16);
p_rec->s_handle = s_handle;
@@ -761,7 +761,7 @@
{ /* allocate bigger buffer ?? */
status = GATT_DB_FULL;
- APPL_TRACE_ERROR0("service not added, no resources or wrong state");
+ APPL_TRACE_ERROR("service not added, no resources or wrong state");
}
return status;
}
@@ -783,7 +783,7 @@
if (p_srvc_cb->p_srvc_list == NULL)
{
- APPL_TRACE_ERROR0("No service available, unexpected char discovery result");
+ APPL_TRACE_ERROR("No service available, unexpected char discovery result");
status = BTA_GATT_INTERNAL_ERROR;
}
else if (p_srvc_cb->next_avail_idx < BTA_GATTC_MAX_CACHE_CHAR)
@@ -808,7 +808,7 @@
}
else
{
- APPL_TRACE_ERROR0("char not added, no resources");
+ APPL_TRACE_ERROR("char not added, no resources");
/* allocate bigger buffer ?? */
status = BTA_GATT_DB_FULL;
}
@@ -850,7 +850,7 @@
end_handle = (UINT16) pe.params[1];
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_EVENT3("Found ATT service [0x%04x] handle[0x%04x ~ 0x%04x]",
+ APPL_TRACE_EVENT("Found ATT service [0x%04x] handle[0x%04x ~ 0x%04x]",
service_uuid.uu.uuid16, start_handle, end_handle);
#endif
@@ -866,7 +866,7 @@
}
else
{
- APPL_TRACE_ERROR2("invalid start_handle = %d end_handle = %d",
+ APPL_TRACE_ERROR("invalid start_handle = %d end_handle = %d",
start_handle, end_handle);
}
}
@@ -882,7 +882,7 @@
bta_gattc_explore_srvc(bta_gattc_cb.sdp_conn_id, p_srvc_cb);
else
{
- APPL_TRACE_ERROR0("GATT service discovery is done on unknown connection");
+ APPL_TRACE_ERROR("GATT service discovery is done on unknown connection");
}
GKI_freebuf(bta_gattc_cb.p_sdp_db);
@@ -1075,7 +1075,7 @@
while (p_service_id && p_cache && !done)
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("Service: handle[%d] uuid[0x%04x] inst[%d]",
+ APPL_TRACE_DEBUG("Service: handle[%d] uuid[0x%04x] inst[%d]",
p_cache->s_handle, p_cache->service_uuid.id.uuid.uu.uuid16,
p_cache->service_uuid.id.inst_id);
#endif
@@ -1086,7 +1086,7 @@
for (j = 0; p_attr; j ++)
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG5("\t Attr[0x%04x] handle[0x%04x] uuid[0x%04x] inst[%d] type[%d]",
+ APPL_TRACE_DEBUG("\t Attr[0x%04x] handle[0x%04x] uuid[0x%04x] inst[%d] type[%d]",
j + 1, p_attr->attr_handle, p_attr->p_uuid->uuid16,
p_attr->inst_id, p_attr->attr_type);
#endif
@@ -1104,7 +1104,7 @@
else
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("found matching characteristic for the descriptor");
+ APPL_TRACE_DEBUG("found matching characteristic for the descriptor");
#endif
char_map = TRUE;
}
@@ -1119,7 +1119,7 @@
p_descr_uuid->inst_id == p_attr->inst_id)
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("found descriptor!!");
+ APPL_TRACE_DEBUG("found descriptor!!");
#endif
handle = p_attr->attr_handle;
done = TRUE;
@@ -1128,14 +1128,14 @@
else
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("descriptor UUID not matching");
+ APPL_TRACE_DEBUG("descriptor UUID not matching");
#endif
}
}
else /* another char */
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("no matching descptr found!!start of next characteristic");
+ APPL_TRACE_DEBUG("no matching descptr found!!start of next characteristic");
#endif
char_map = FALSE;
done = TRUE;
@@ -1174,7 +1174,7 @@
while (p_cache)
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("Service: handle[%d] uuid[0x%04x] inst[%d]",
+ APPL_TRACE_DEBUG("Service: handle[%d] uuid[0x%04x] inst[%d]",
p_cache->s_handle, p_cache->service_uuid.id.uuid.uu.uuid16,
p_cache->service_uuid.id.inst_id);
#endif
@@ -1192,7 +1192,7 @@
for (j = 0; p_attr; j ++)
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG5("\t Attr[0x%04x] handle[0x%04x] uuid[0x%04x] inst[%d] type[%d]",
+ APPL_TRACE_DEBUG("\t Attr[0x%04x] handle[0x%04x] uuid[0x%04x] inst[%d] type[%d]",
j + 1, p_attr->attr_handle, p_attr->p_uuid->uuid16,
p_attr->inst_id, p_attr->attr_type);
#endif
@@ -1215,7 +1215,7 @@
}
else
{
- APPL_TRACE_ERROR0("descptr does not belong to any chracteristic");
+ APPL_TRACE_ERROR("descptr does not belong to any chracteristic");
}
}
else
@@ -1255,7 +1255,7 @@
if (bta_gattc_uuid_compare(p_uuid, &p_cache->service_uuid.id.uuid, FALSE))
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("found service [0x%04x], inst[%d] handle [%d]",
+ APPL_TRACE_DEBUG("found service [0x%04x], inst[%d] handle [%d]",
p_cache->service_uuid.id.uuid.uu.uuid16,
p_cache->service_uuid.id.inst_id,
p_cache->s_handle);
@@ -1306,7 +1306,7 @@
if (bta_gattc_srvcid_compare(p_service_id, &p_cache->service_uuid))
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG2("found matching service [0x%04x], inst[%d]",
+ APPL_TRACE_DEBUG("found matching service [0x%04x], inst[%d]",
p_cache->service_uuid.id.uuid.uu.uuid16,
p_cache->service_uuid.id.inst_id);
#endif
@@ -1315,7 +1315,7 @@
for (j = 0; p_attr; j ++)
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG5("\t Attr[%d] handle[0x%04x] uuid[0x%04x] inst[%d] type[%d]",
+ APPL_TRACE_DEBUG("\t Attr[%d] handle[0x%04x] uuid[0x%04x] inst[%d] type[%d]",
j + 1, p_attr->attr_handle,
p_attr->p_uuid->uuid16,
p_attr->inst_id,
@@ -1376,7 +1376,7 @@
{
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("found char handle mapping characteristic");
+ APPL_TRACE_DEBUG("found char handle mapping characteristic");
#endif
p_result->inst_id = p_attr->inst_id;
@@ -1399,7 +1399,7 @@
#if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE)
if (status)
{
- APPL_TRACE_ERROR0("In the given service, can not find matching record");
+ APPL_TRACE_ERROR("In the given service, can not find matching record");
}
#endif
break;
@@ -1459,19 +1459,19 @@
else
{
status = BTA_GATT_ERROR;
- APPL_TRACE_ERROR0("No server cache available");
+ APPL_TRACE_ERROR("No server cache available");
}
}
else
{
- APPL_TRACE_ERROR1("server cache not available, CLCB state = %d", p_clcb->state);
+ APPL_TRACE_ERROR("server cache not available, CLCB state = %d", p_clcb->state);
status = (p_clcb->state == BTA_GATTC_DISCOVER_ST) ? BTA_GATT_BUSY : BTA_GATT_ERROR;
}
}
else
{
- APPL_TRACE_ERROR1("Unknown conn ID: %d", conn_id);
+ APPL_TRACE_ERROR("Unknown conn ID: %d", conn_id);
}
return status;
@@ -1492,7 +1492,7 @@
tBTA_GATTC_NV_ATTR *p_attr, UINT16 attr_index)
{
/* first attribute loading, initialize buffer */
- APPL_TRACE_ERROR0("bta_gattc_rebuild_cache");
+ APPL_TRACE_ERROR("bta_gattc_rebuild_cache");
if (attr_index == 0)
{
while (p_srvc_cb->cache_buffer.p_first)
@@ -1500,7 +1500,7 @@
if (bta_gattc_alloc_cache_buf(p_srvc_cb) == NULL)
{
- APPL_TRACE_ERROR0("allocate cache buffer failed, no resources");
+ APPL_TRACE_ERROR("allocate cache buffer failed, no resources");
}
else
{
diff --git a/bta/gatt/bta_gattc_main.c b/bta/gatt/bta_gattc_main.c
index c917d4a..bdeddcd 100644
--- a/bta/gatt/bta_gattc_main.c
+++ b/bta/gatt/bta_gattc_main.c
@@ -301,7 +301,7 @@
#if BTA_GATT_DEBUG == TRUE
tBTA_GATTC_STATE in_state = p_clcb->state;
UINT16 in_event = event;
- APPL_TRACE_DEBUG4("bta_gattc_sm_execute: State 0x%02x [%s], Event 0x%x[%s]", in_state,
+ APPL_TRACE_DEBUG("bta_gattc_sm_execute: State 0x%02x [%s], Event 0x%x[%s]", in_state,
gattc_state_code(in_state),
in_event,
gattc_evt_code(in_event));
@@ -334,7 +334,7 @@
#if BTA_GATT_DEBUG == TRUE
if (in_state != p_clcb->state)
{
- APPL_TRACE_DEBUG3("GATTC State Change: [%s] -> [%s] after Event [%s]",
+ APPL_TRACE_DEBUG("GATTC State Change: [%s] -> [%s] after Event [%s]",
gattc_state_code(in_state),
gattc_state_code(p_clcb->state),
gattc_evt_code(in_event));
@@ -360,7 +360,7 @@
tBTA_GATTC_RCB *p_clreg;
BOOLEAN rt = TRUE;
#if BTA_GATT_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_gattc_hdl_event: Event [%s]", gattc_evt_code(p_msg->event));
+ APPL_TRACE_DEBUG("bta_gattc_hdl_event: Event [%s]", gattc_evt_code(p_msg->event));
#endif
switch (p_msg->event)
{
@@ -420,7 +420,7 @@
}
else
{
- APPL_TRACE_DEBUG1("Ignore unknown conn ID: %d", p_msg->layer_specific);
+ APPL_TRACE_DEBUG("Ignore unknown conn ID: %d", p_msg->layer_specific);
}
break;
diff --git a/bta/gatt/bta_gattc_utils.c b/bta/gatt/bta_gattc_utils.c
index 99b222a..effd0f6 100644
--- a/bta/gatt/bta_gattc_utils.c
+++ b/bta/gatt/bta_gattc_utils.c
@@ -222,7 +222,7 @@
if (!bta_gattc_cb.clcb[i_clcb].in_use)
{
#if BTA_GATT_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_gattc_clcb_alloc: found clcb[%d] available",i_clcb);
+ APPL_TRACE_DEBUG("bta_gattc_clcb_alloc: found clcb[%d] available",i_clcb);
#endif
p_clcb = &bta_gattc_cb.clcb[i_clcb];
p_clcb->in_use = TRUE;
@@ -308,7 +308,7 @@
}
else
{
- APPL_TRACE_ERROR0("bta_gattc_clcb_dealloc p_clcb=NULL");
+ APPL_TRACE_ERROR("bta_gattc_clcb_dealloc p_clcb=NULL");
}
}
@@ -440,7 +440,7 @@
}
else
{
- APPL_TRACE_ERROR0("already has a pending command!!");
+ APPL_TRACE_ERROR("already has a pending command!!");
/* skip the callback now. ----- need to send callback ? */
}
return p_clcb->buf_held;
@@ -573,7 +573,7 @@
bdcmp(p_clreg->notif_reg[i].remote_bda, p_srcb->server_bda) == 0 &&
bta_gattc_charid_compare (&p_clreg->notif_reg[i].char_id, &p_notify->char_id))
{
- APPL_TRACE_DEBUG0("Notification registered!");
+ APPL_TRACE_DEBUG("Notification registered!");
return TRUE;
}
}
@@ -611,7 +611,7 @@
}
else
{
- APPL_TRACE_ERROR0("can not clear indication/notif registration for unknown app");
+ APPL_TRACE_ERROR("can not clear indication/notif registration for unknown app");
}
return;
}
@@ -649,7 +649,7 @@
&p_value->aggre_value.pre_format[i].descr_id) == FALSE)
{
status = BTA_GATT_INTERNAL_ERROR;
- APPL_TRACE_ERROR1("can not map to GATT ID. handle = 0x%04x", handle);
+ APPL_TRACE_ERROR("can not map to GATT ID. handle = 0x%04x", handle);
break;
}
i ++;
@@ -710,7 +710,7 @@
}
if (!add)
{
- APPL_TRACE_ERROR0("Do not find the bg connection mask for the remote device");
+ APPL_TRACE_ERROR("Do not find the bg connection mask for the remote device");
return FALSE;
}
else /* adding a new device mask */
@@ -732,7 +732,7 @@
return TRUE;
}
}
- APPL_TRACE_ERROR0("no available space to mark the bg connection status");
+ APPL_TRACE_ERROR("no available space to mark the bg connection status");
return FALSE;
}
}
@@ -816,7 +816,7 @@
if (!p_conn->in_use)
{
#if BTA_GATT_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_gattc_conn_alloc: found conn_track[%d] available",i_conn);
+ APPL_TRACE_DEBUG("bta_gattc_conn_alloc: found conn_track[%d] available",i_conn);
#endif
p_conn->in_use = TRUE;
bdcpy(p_conn->remote_bda, remote_bda);
@@ -845,7 +845,7 @@
if (p_conn->in_use && bdcmp(remote_bda, p_conn->remote_bda) == 0)
{
#if BTA_GATT_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_gattc_conn_find: found conn_track[%d] matched",i_conn);
+ APPL_TRACE_DEBUG("bta_gattc_conn_find: found conn_track[%d] matched",i_conn);
#endif
return p_conn;
}
@@ -956,7 +956,7 @@
}
else if ((p_clcb = bta_gattc_find_clcb_by_conn_id(p_msg->int_conn.hdr.layer_specific)) == NULL)
{
- APPL_TRACE_DEBUG1(" disconnection ID: [%d] not used by BTA",
+ APPL_TRACE_DEBUG(" disconnection ID: [%d] not used by BTA",
p_msg->int_conn.hdr.layer_specific);
}
return p_clcb;
diff --git a/bta/gatt/bta_gatts_act.c b/bta/gatt/bta_gatts_act.c
index 4a24d66..6adf344 100644
--- a/bta/gatt/bta_gatts_act.c
+++ b/bta/gatt/bta_gatts_act.c
@@ -114,7 +114,7 @@
if (p_cb->enabled)
{
- APPL_TRACE_DEBUG0("GATTS already enabled.");
+ APPL_TRACE_DEBUG("GATTS already enabled.");
}
else
{
@@ -129,11 +129,11 @@
index++;
}
- APPL_TRACE_DEBUG1("bta_gatts_enable: num of handle range added=%d", index);
+ APPL_TRACE_DEBUG("bta_gatts_enable: num of handle range added=%d", index);
if (!GATTS_NVRegister(&bta_gatts_nv_cback))
{
- APPL_TRACE_ERROR0("BTA GATTS NV register failed.");
+ APPL_TRACE_ERROR("BTA GATTS NV register failed.");
status = BTA_GATT_ERROR;
}
}
@@ -166,7 +166,7 @@
}
else
{
- APPL_TRACE_ERROR0("GATTS not enabled");
+ APPL_TRACE_ERROR("GATTS not enabled");
}
}
@@ -197,7 +197,7 @@
{
if (bta_gatts_uuid_compare(p_cb->rcb[i].app_uuid, p_msg->api_reg.app_uuid))
{
- APPL_TRACE_ERROR0("application already registered.");
+ APPL_TRACE_ERROR("application already registered.");
status = BTA_GATT_DUP_REG;
break;
}
@@ -221,7 +221,7 @@
// btla-specific --
if (first_unuse != 0xff)
{
- APPL_TRACE_ERROR1("register application first_unuse rcb_idx = %d", first_unuse);
+ APPL_TRACE_ERROR("register application first_unuse rcb_idx = %d", first_unuse);
p_cb->rcb[first_unuse].in_use = TRUE;
p_cb->rcb[first_unuse].p_cback = p_msg->api_reg.p_cback;
@@ -281,7 +281,7 @@
}
else
{
- APPL_TRACE_ERROR1("Unable to start app.: Unknown interface =%d",
+ APPL_TRACE_ERROR("Unable to start app.: Unknown interface =%d",
p_msg->int_start_if.server_if );
}
}
@@ -327,7 +327,7 @@
}
else
{
- APPL_TRACE_ERROR0("application not registered.");
+ APPL_TRACE_ERROR("application not registered.");
}
}
/*******************************************************************************
@@ -350,7 +350,7 @@
rcb_idx = bta_gatts_find_app_rcb_idx_by_app_if(p_cb, p_msg->api_create_svc.server_if);
- APPL_TRACE_ERROR1("create service rcb_idx = %d", rcb_idx);
+ APPL_TRACE_ERROR("create service rcb_idx = %d", rcb_idx);
if (rcb_idx != BTA_GATTS_INVALID_APP)
{
@@ -382,7 +382,7 @@
{
cb_data.status = BTA_GATT_ERROR;
memset(&p_cb->srvc_cb[srvc_idx], 0, sizeof(tBTA_GATTS_SRVC_CB));
- APPL_TRACE_ERROR0("service creation failed.");
+ APPL_TRACE_ERROR("service creation failed.");
}
// btla-specific ++
memcpy(&cb_data.create.uuid, &p_msg->api_create_svc.service_uuid, sizeof(tBT_UUID));
@@ -394,7 +394,7 @@
}
else /* application not registered */
{
- APPL_TRACE_ERROR0("Application not registered");
+ APPL_TRACE_ERROR("Application not registered");
}
}
/*******************************************************************************
@@ -562,7 +562,7 @@
p_srvc_cb->service_id,
p_msg->api_start.transport) == GATT_SUCCESS)
{
- APPL_TRACE_DEBUG1("bta_gatts_start_service service_id= %d", p_srvc_cb->service_id);
+ APPL_TRACE_DEBUG("bta_gatts_start_service service_id= %d", p_srvc_cb->service_id);
cb_data.srvc_oper.status = BTA_GATT_OK;
}
else
@@ -593,7 +593,7 @@
cb_data.srvc_oper.server_if = p_rcb->gatt_if;
cb_data.srvc_oper.service_id = p_srvc_cb->service_id;
cb_data.srvc_oper.status = BTA_GATT_OK;
- APPL_TRACE_ERROR1("bta_gatts_stop_service service_id= %d", p_srvc_cb->service_id);
+ APPL_TRACE_ERROR("bta_gatts_stop_service service_id= %d", p_srvc_cb->service_id);
if (p_rcb->p_cback)
(*p_rcb->p_cback)(BTA_GATTS_STOP_EVT, &cb_data);
@@ -617,7 +617,7 @@
p_msg->api_rsp.status,
(tGATTS_RSP *)p_msg->api_rsp.p_rsp) != GATT_SUCCESS)
{
- APPL_TRACE_ERROR0("Sending response failed");
+ APPL_TRACE_ERROR("Sending response failed");
}
}
@@ -666,7 +666,7 @@
}
else
{
- APPL_TRACE_ERROR1("Unknown connection ID: %d fail sending notification",
+ APPL_TRACE_ERROR("Unknown connection ID: %d fail sending notification",
p_msg->api_indicate.hdr.layer_specific);
}
if ((status != GATT_SUCCESS || !p_msg->api_indicate.need_confirm) &&
@@ -677,7 +677,7 @@
}
else
{
- APPL_TRACE_ERROR1("Not an registered servce attribute ID: 0x%04x",
+ APPL_TRACE_ERROR("Not an registered servce attribute ID: 0x%04x",
p_msg->api_indicate.attr_id);
}
}
@@ -716,7 +716,7 @@
}
else
{
- APPL_TRACE_ERROR1("Inavlide server_if=%d", p_msg->api_open.server_if);
+ APPL_TRACE_ERROR("Inavlide server_if=%d", p_msg->api_open.server_if);
}
if (p_rcb && p_rcb->p_cback)
@@ -743,7 +743,7 @@
if (!GATT_CancelConnect(p_rcb->gatt_if, p_msg->api_cancel_open.remote_bda,
p_msg->api_cancel_open.is_direct))
{
- APPL_TRACE_ERROR0("bta_gatts_cancel_open failed for open request");
+ APPL_TRACE_ERROR("bta_gatts_cancel_open failed for open request");
}
else
{
@@ -752,7 +752,7 @@
}
else
{
- APPL_TRACE_ERROR1("Inavlide server_if=%d", p_msg->api_cancel_open.server_if);
+ APPL_TRACE_ERROR("Inavlide server_if=%d", p_msg->api_cancel_open.server_if);
}
if (p_rcb && p_rcb->p_cback)
@@ -781,7 +781,7 @@
{
if (GATT_Disconnect(p_msg->hdr.layer_specific) != GATT_SUCCESS)
{
- APPL_TRACE_ERROR1("bta_gatts_close fail conn_id=%d", p_msg->hdr.layer_specific);
+ APPL_TRACE_ERROR("bta_gatts_close fail conn_id=%d", p_msg->hdr.layer_specific);
}
else
{
@@ -800,7 +800,7 @@
}
else
{
- APPL_TRACE_ERROR1("Unknown connection ID: %d", p_msg->hdr.layer_specific);
+ APPL_TRACE_ERROR("Unknown connection ID: %d", p_msg->hdr.layer_specific);
}
}
@@ -824,7 +824,7 @@
if (p_rcb == NULL)
{
- APPL_TRACE_ERROR0("Unknown GATTS application");
+ APPL_TRACE_ERROR("Unknown GATTS application");
return;
}
@@ -833,7 +833,7 @@
p_msg->api_listen.remote_bda))
{
cb_data.status = BTA_GATT_ERROR;
- APPL_TRACE_ERROR0("bta_gatts_listen Listen failed");
+ APPL_TRACE_ERROR("bta_gatts_listen Listen failed");
}
if (p_rcb->p_cback)
@@ -864,7 +864,7 @@
{
p_rcb = bta_gatts_find_app_rcb_by_app_if(gatt_if);
- APPL_TRACE_DEBUG3 ("bta_gatts_send_request_cback conn_id=%d trans_id=%d req_type=%d",
+ APPL_TRACE_DEBUG ("bta_gatts_send_request_cback conn_id=%d trans_id=%d req_type=%d",
conn_id, trans_id, req_type);
if (p_rcb && p_rcb->p_cback)
@@ -884,12 +884,12 @@
}
else
{
- APPL_TRACE_ERROR1("connection request on gatt_if[%d] is not interested", gatt_if);
+ APPL_TRACE_ERROR("connection request on gatt_if[%d] is not interested", gatt_if);
}
}
else
{
- APPL_TRACE_ERROR1("request received on unknown connectino ID: %d", conn_id);
+ APPL_TRACE_ERROR("request received on unknown connectino ID: %d", conn_id);
}
}
@@ -910,9 +910,9 @@
UINT8 evt = connected ? BTA_GATTS_CONNECT_EVT: BTA_GATTS_DISCONNECT_EVT;
tBTA_GATTS_RCB *p_reg;
- APPL_TRACE_DEBUG4 ("bta_gatts_conn_cback gatt_if=%d conn_id=%d connected=%d reason = 0x%04d",
+ APPL_TRACE_DEBUG ("bta_gatts_conn_cback gatt_if=%d conn_id=%d connected=%d reason = 0x%04d",
gatt_if, conn_id, connected, reason);
- APPL_TRACE_DEBUG6("bta_gatts_conn_cback bda :%02x-%02x-%02x-%02x-%02x-%02x ",
+ APPL_TRACE_DEBUG("bta_gatts_conn_cback bda :%02x-%02x-%02x-%02x-%02x-%02x ",
bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]);
p_reg = bta_gatts_find_app_rcb_by_app_if(gatt_if);
@@ -937,7 +937,7 @@
}
else
{
- APPL_TRACE_ERROR1("bta_gatts_conn_cback server_if=%d not found",gatt_if);
+ APPL_TRACE_ERROR("bta_gatts_conn_cback server_if=%d not found",gatt_if);
}
}
#endif /* BTA_GATT_INCLUDED */
diff --git a/bta/gatt/bta_gatts_api.c b/bta/gatt/bta_gatts_api.c
index 86bb2f1..e2f1874 100644
--- a/bta/gatt/bta_gatts_api.c
+++ b/bta/gatt/bta_gatts_api.c
@@ -59,7 +59,7 @@
if (bta_sys_is_register(BTA_ID_GATTS) == FALSE)
{
- APPL_TRACE_WARNING0("GATTS Module not enabled/already disabled");
+ APPL_TRACE_WARNING("GATTS Module not enabled/already disabled");
return;
}
diff --git a/bta/gatt/bta_gatts_main.c b/bta/gatt/bta_gatts_main.c
index 02810fc..9bcb471 100644
--- a/bta/gatt/bta_gatts_main.c
+++ b/bta/gatt/bta_gatts_main.c
@@ -128,7 +128,7 @@
}
else
{
- APPL_TRACE_ERROR0("service not created");
+ APPL_TRACE_ERROR("service not created");
}
break;
diff --git a/bta/gatt/bta_gatts_utils.c b/bta/gatt/bta_gatts_utils.c
index 5145c95..e7ac1e3 100644
--- a/bta/gatt/bta_gatts_utils.c
+++ b/bta/gatt/bta_gatts_utils.c
@@ -133,13 +133,13 @@
tBTA_GATTS_SRVC_CB * bta_gatts_find_srvc_cb_by_srvc_id(tBTA_GATTS_CB *p_cb, UINT16 service_id)
{
UINT8 i;
- APPL_TRACE_DEBUG1("bta_gatts_find_srvc_cb_by_srvc_id service_id=%d", service_id);
+ APPL_TRACE_DEBUG("bta_gatts_find_srvc_cb_by_srvc_id service_id=%d", service_id);
for (i = 0; i < BTA_GATTS_MAX_SRVC_NUM; i ++)
{
if (p_cb->srvc_cb[i].in_use &&
p_cb->srvc_cb[i].service_id == service_id)
{
- APPL_TRACE_DEBUG1("bta_gatts_find_srvc_cb_by_srvc_id found service cb index =%d", i);
+ APPL_TRACE_DEBUG("bta_gatts_find_srvc_cb_by_srvc_id found service cb index =%d", i);
return &p_cb->srvc_cb[i];
}
}
diff --git a/bta/hf_client/bta_hf_client_act.c b/bta/hf_client/bta_hf_client_act.c
index 854260a..8e37909 100644
--- a/bta/hf_client/bta_hf_client_act.c
+++ b/bta/hf_client/bta_hf_client_act.c
@@ -271,13 +271,13 @@
/* set role */
bta_hf_client_cb.scb.role = BTA_HF_CLIENT_ACP;
- APPL_TRACE_DEBUG2 ("bta_hf_client_rfc_acp_open: serv_handle = %d rfc.port_handle = %d",
+ APPL_TRACE_DEBUG ("bta_hf_client_rfc_acp_open: serv_handle = %d rfc.port_handle = %d",
bta_hf_client_cb.scb.serv_handle, p_data->rfc.port_handle);
/* get bd addr of peer */
if (PORT_SUCCESS != (status=PORT_CheckConnection(p_data->rfc.port_handle, dev_addr, &lcid)))
{
- APPL_TRACE_DEBUG1 ("bta_hf_client_rfc_acp_open error PORT_CheckConnection returned status %d", status);
+ APPL_TRACE_DEBUG ("bta_hf_client_rfc_acp_open error PORT_CheckConnection returned status %d", status);
}
/* Collision Handling */
@@ -448,7 +448,7 @@
{
UINT16 event = BTA_HF_CLIENT_DISC_FAIL_EVT;
- APPL_TRACE_DEBUG1 ("bta_hf_client_disc_int_res: Status: %d", p_data->disc_result.status);
+ APPL_TRACE_DEBUG ("bta_hf_client_disc_int_res: Status: %d", p_data->disc_result.status);
/* if found service */
if (p_data->disc_result.status == SDP_SUCCESS ||
diff --git a/bta/hf_client/bta_hf_client_api.c b/bta/hf_client/bta_hf_client_api.c
index a7c6255..6fdad9a 100644
--- a/bta/hf_client/bta_hf_client_api.c
+++ b/bta/hf_client/bta_hf_client_api.c
@@ -63,7 +63,7 @@
if (bta_sys_is_register (BTA_ID_HS))
{
- APPL_TRACE_ERROR0("BTA HF Client is already enabled, ignoring ...");
+ APPL_TRACE_ERROR("BTA HF Client is already enabled, ignoring ...");
return BTA_FAILURE;
}
diff --git a/bta/hf_client/bta_hf_client_at.c b/bta/hf_client/bta_hf_client_at.c
index 4f061ba..462b287 100644
--- a/bta/hf_client/bta_hf_client_at.c
+++ b/bta/hf_client/bta_hf_client_at.c
@@ -108,7 +108,7 @@
{
tBTA_HF_CLIENT_AT_QCMD *new_cmd;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if ((new_cmd = (tBTA_HF_CLIENT_AT_QCMD *) GKI_getbuf(sizeof(tBTA_HF_CLIENT_AT_QCMD))) != NULL)
{
@@ -139,7 +139,7 @@
{
bta_hf_client_cb.scb.at_cb.resp_timer_on = FALSE;
- APPL_TRACE_ERROR0("HFPClient: AT response timeout, disconnecting");
+ APPL_TRACE_ERROR("HFPClient: AT response timeout, disconnecting");
bta_hf_client_sm_execute(BTA_HF_CLIENT_API_CLOSE_EVT, NULL);
}
@@ -175,7 +175,7 @@
UINT16 len;
#ifdef BTA_HF_CLIENT_AT_DUMP
- APPL_TRACE_DEBUG3("%s %.*s", __FUNCTION__, buf_len - 1, buf);
+ APPL_TRACE_DEBUG("%s %.*s", __FUNCTION__, buf_len - 1, buf);
#endif
bta_hf_client_cb.scb.at_cb.current_cmd = cmd;
@@ -194,7 +194,7 @@
tBTA_HF_CLIENT_AT_QCMD *cur = bta_hf_client_cb.scb.at_cb.queued_cmd;
tBTA_HF_CLIENT_AT_QCMD *next;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (cur != NULL)
{
@@ -210,7 +210,7 @@
static void bta_hf_client_at_hold_timer_cback(TIMER_LIST_ENT *p_tle)
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (p_tle)
{
@@ -221,7 +221,7 @@
static void bta_hf_client_stop_at_hold_timer(void)
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (bta_hf_client_cb.scb.at_cb.hold_timer_on)
{
@@ -234,7 +234,7 @@
{
TIMER_LIST_ENT *timer = &bta_hf_client_cb.scb.at_cb.hold_timer;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (bta_hf_client_cb.scb.at_cb.hold_timer_on)
{
@@ -256,7 +256,7 @@
static void bta_hf_client_handle_ok()
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
bta_hf_client_stop_at_resp_timer();
@@ -299,7 +299,7 @@
static void bta_hf_client_handle_error(tBTA_HF_CLIENT_AT_RESULT_TYPE type, UINT16 cme)
{
- APPL_TRACE_DEBUG3("%s %u %u", __FUNCTION__, type, cme);
+ APPL_TRACE_DEBUG("%s %u %u", __FUNCTION__, type, cme);
bta_hf_client_stop_at_resp_timer();
@@ -338,13 +338,13 @@
static void bta_hf_client_handle_ring()
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
bta_hf_client_evt_val(BTA_HF_CLIENT_RING_INDICATION,0);
}
static void bta_hf_client_handle_brsf(UINT32 value)
{
- APPL_TRACE_DEBUG2("%s 0x%x", __FUNCTION__, value);
+ APPL_TRACE_DEBUG("%s 0x%x", __FUNCTION__, value);
bta_hf_client_cb.scb.peer_features = value;
}
@@ -354,7 +354,7 @@
UINT8 i = 0;
- APPL_TRACE_DEBUG5("%s %lu.%s <%lu:%lu>", __FUNCTION__, index, name, min, max);
+ APPL_TRACE_DEBUG("%s %lu.%s <%lu:%lu>", __FUNCTION__, index, name, min, max);
/* look for a matching indicator on list of supported ones */
for(i = 0; i < BTA_HF_CLIENT_AT_SUPPORTED_INDICATOR_COUNT; i++)
@@ -379,7 +379,7 @@
static void bta_hf_client_handle_cind_value(UINT32 index, UINT32 value)
{
- APPL_TRACE_DEBUG3("%s index: %u value: %u", __FUNCTION__, index, value);
+ APPL_TRACE_DEBUG("%s index: %u value: %u", __FUNCTION__, index, value);
if (index >= BTA_HF_CLIENT_AT_INDICATOR_COUNT)
{
@@ -418,7 +418,7 @@
static void bta_hf_client_handle_chld(UINT32 mask)
{
- APPL_TRACE_DEBUG2("%s 0x%x", __FUNCTION__, mask);
+ APPL_TRACE_DEBUG("%s 0x%x", __FUNCTION__, mask);
bta_hf_client_cb.scb.chld_features |= mask;
}
@@ -427,7 +427,7 @@
{
INT8 realind = -1;
- APPL_TRACE_DEBUG3("%s index: %u value: %u", __FUNCTION__, index, value);
+ APPL_TRACE_DEBUG("%s index: %u value: %u", __FUNCTION__, index, value);
if(index == 0 || index >= BTA_HF_CLIENT_AT_INDICATOR_COUNT)
{
@@ -452,7 +452,7 @@
static void bta_hf_client_handle_bcs(UINT32 codec)
{
- APPL_TRACE_DEBUG2("%s %u", __FUNCTION__, codec);
+ APPL_TRACE_DEBUG("%s %u", __FUNCTION__, codec);
if (codec == BTM_SCO_CODEC_CVSD ||
(codec == BTM_SCO_CODEC_MSBC && bta_hf_client_cb.msbc_enabled == TRUE))
@@ -469,7 +469,7 @@
static void bta_hf_client_handle_bsir(UINT32 provided)
{
- APPL_TRACE_DEBUG2("%s %u", __FUNCTION__, provided);
+ APPL_TRACE_DEBUG("%s %u", __FUNCTION__, provided);
bta_hf_client_evt_val(BTA_HF_CLIENT_BSIR_EVT, provided);
}
@@ -481,7 +481,7 @@
static void bta_hf_client_handle_vgm(UINT32 value)
{
- APPL_TRACE_DEBUG2("%s %lu", __FUNCTION__, value);
+ APPL_TRACE_DEBUG("%s %lu", __FUNCTION__, value);
if(value <= BTA_HF_CLIENT_VGM_MAX)
{
@@ -491,7 +491,7 @@
static void bta_hf_client_handle_vgs(UINT32 value)
{
- APPL_TRACE_DEBUG2("%s %lu", __FUNCTION__, value);
+ APPL_TRACE_DEBUG("%s %lu", __FUNCTION__, value);
if(value <= BTA_HF_CLIENT_VGS_MAX)
{
@@ -501,7 +501,7 @@
static void bta_hf_client_handle_bvra(UINT32 value)
{
- APPL_TRACE_DEBUG2("%s %lu", __FUNCTION__, value);
+ APPL_TRACE_DEBUG("%s %lu", __FUNCTION__, value);
if (value > 1)
{
@@ -513,40 +513,40 @@
static void bta_hf_client_handle_clip(char *numstr, UINT32 type)
{
- APPL_TRACE_DEBUG3("%s %u %s", __FUNCTION__, type, numstr);
+ APPL_TRACE_DEBUG("%s %u %s", __FUNCTION__, type, numstr);
bta_hf_client_clip(numstr);
}
static void bta_hf_client_handle_ccwa(char *numstr, UINT32 type)
{
- APPL_TRACE_DEBUG3("%s %u %s", __FUNCTION__, type, numstr);
+ APPL_TRACE_DEBUG("%s %u %s", __FUNCTION__, type, numstr);
bta_hf_client_ccwa(numstr);
}
static void bta_hf_client_handle_cops(char *opstr, UINT32 mode)
{
- APPL_TRACE_DEBUG3("%s %u %s", __FUNCTION__, mode, opstr);
+ APPL_TRACE_DEBUG("%s %u %s", __FUNCTION__, mode, opstr);
bta_hf_client_operator_name(opstr);
}
static void bta_hf_client_handle_binp(char *numstr)
{
- APPL_TRACE_DEBUG2("%s %s", __FUNCTION__, numstr);
+ APPL_TRACE_DEBUG("%s %s", __FUNCTION__, numstr);
bta_hf_client_binp(numstr);
}
static void bta_hf_client_handle_clcc(UINT16 idx, UINT16 dir, UINT16 status, UINT16 mode, UINT16 mpty, char *numstr, UINT16 type)
{
- APPL_TRACE_DEBUG6("%s idx: %u dir: %u status: %u mode: %u mpty: %u",
+ APPL_TRACE_DEBUG("%s idx: %u dir: %u status: %u mode: %u mpty: %u",
__FUNCTION__, idx, dir, status, mode, mpty);
if (numstr)
{
- APPL_TRACE_DEBUG3("%s number: %s type: %u", __FUNCTION__, numstr, type);
+ APPL_TRACE_DEBUG("%s number: %s type: %u", __FUNCTION__, numstr, type);
}
bta_hf_client_clcc(idx, dir, status, mpty, numstr);
@@ -554,7 +554,7 @@
static void bta_hf_client_handle_cnum( char *numstr, UINT16 type, UINT16 service)
{
- APPL_TRACE_DEBUG4("%s number: %s type: %u service: %u", __FUNCTION__, numstr, type, service);
+ APPL_TRACE_DEBUG("%s number: %s type: %u service: %u", __FUNCTION__, numstr, type, service);
/* TODO: should number be modified according to type? */
bta_hf_client_cnum(numstr, service);
@@ -562,7 +562,7 @@
static void bta_hf_client_handle_btrh( UINT16 code)
{
- APPL_TRACE_DEBUG2("%s %lu", __FUNCTION__, code);
+ APPL_TRACE_DEBUG("%s %lu", __FUNCTION__, code);
bta_hf_client_evt_val(BTA_HF_CLIENT_BTRH_EVT, code);
}
@@ -582,7 +582,7 @@
/* check for <cr><lf> and forward buffer if match */
#define AT_CHECK_RN(buf) \
if (strncmp("\r\n", buf, sizeof("\r\n") - 1) != 0) { \
- APPL_TRACE_DEBUG1("%s missing end <cr><lf>", __FUNCTION__); \
+ APPL_TRACE_DEBUG("%s missing end <cr><lf>", __FUNCTION__); \
return NULL;} \
buf += sizeof("\r\n") - 1;
@@ -1199,7 +1199,7 @@
buffer = tmp + 2;
- APPL_TRACE_DEBUG3("%s %.*s", __FUNCTION__, buffer - start - 2, start);
+ APPL_TRACE_DEBUG("%s %.*s", __FUNCTION__, buffer - start - 2, start);
return buffer;
}
@@ -1283,7 +1283,7 @@
*p2 = '\0';
- APPL_TRACE_DEBUG2("%s %s", __FUNCTION__, dump);
+ APPL_TRACE_DEBUG("%s %s", __FUNCTION__, dump);
}
#endif
@@ -1291,7 +1291,7 @@
{
char *buf = bta_hf_client_cb.scb.at_cb.buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
#ifdef BTA_HF_CLIENT_AT_DUMP
bta_hf_client_dump_at();
@@ -1307,7 +1307,7 @@
tmp = bta_hf_client_parser_cb[i](buf);
if (tmp == NULL)
{
- APPL_TRACE_ERROR0("HFPCient: AT event/reply parsing failed, skipping");
+ APPL_TRACE_ERROR("HFPCient: AT event/reply parsing failed, skipping");
tmp = bta_hf_client_skip_unknown(buf);
break;
}
@@ -1324,7 +1324,7 @@
/* could not skip unknown (received garbage?)... disconnect */
if (tmp == NULL)
{
- APPL_TRACE_ERROR0("HFPCient: could not skip unknown AT event, disconnecting");
+ APPL_TRACE_ERROR("HFPCient: could not skip unknown AT event, disconnecting");
bta_hf_client_at_reset();
bta_hf_client_sm_execute(BTA_HF_CLIENT_API_CLOSE_EVT, NULL);
return;
@@ -1347,7 +1347,7 @@
}
}
- APPL_TRACE_DEBUG2("%s %d", __FUNCTION__, ret);
+ APPL_TRACE_DEBUG("%s %d", __FUNCTION__, ret);
return ret;
}
@@ -1366,7 +1366,7 @@
*******************************************************************************/
void bta_hf_client_at_parse(char *buf, unsigned int len)
{
- APPL_TRACE_DEBUG3("%s offset: %u len: %u", __FUNCTION__, bta_hf_client_cb.scb.at_cb.offset, len);
+ APPL_TRACE_DEBUG("%s offset: %u len: %u", __FUNCTION__, bta_hf_client_cb.scb.at_cb.offset, len);
if (len + bta_hf_client_cb.scb.at_cb.offset > BTA_HF_CLIENT_AT_PARSER_MAX_LEN)
{
@@ -1374,7 +1374,7 @@
unsigned int tmp = bta_hf_client_cb.scb.at_cb.offset;
unsigned int space_left = BTA_HF_CLIENT_AT_PARSER_MAX_LEN - bta_hf_client_cb.scb.at_cb.offset;
- APPL_TRACE_DEBUG1("%s overrun, trying to recover", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s overrun, trying to recover", __FUNCTION__);
/* fill up parser buffer */
memcpy(bta_hf_client_cb.scb.at_cb.buf + bta_hf_client_cb.scb.at_cb.offset, buf, space_left);
@@ -1386,7 +1386,7 @@
while(bta_hf_client_check_at_complete() == FALSE)
{
if (bta_hf_client_cb.scb.at_cb.offset == 0) {
- APPL_TRACE_ERROR0("HFPClient: AT parser buffer overrun, disconnecting");
+ APPL_TRACE_ERROR("HFPClient: AT parser buffer overrun, disconnecting");
bta_hf_client_at_reset();
bta_hf_client_sm_execute(BTA_HF_CLIENT_API_CLOSE_EVT, NULL);
@@ -1426,7 +1426,7 @@
char buf[BTA_HF_CLIENT_AT_MAX_LEN];
int at_len;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
at_len = snprintf(buf, sizeof(buf), "AT+BRSF=%u\r", bta_hf_client_cb.scb.features);
@@ -1437,7 +1437,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (bta_hf_client_cb.msbc_enabled)
{
@@ -1456,7 +1456,7 @@
char buf[BTA_HF_CLIENT_AT_MAX_LEN];
int at_len;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
at_len = snprintf(buf, sizeof(buf), "AT+BCS=%u\r", codec);
@@ -1468,7 +1468,7 @@
char *buf;
tBTA_HF_CLIENT_AT_CMD cmd;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (status)
{
@@ -1488,7 +1488,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (activate)
buf = "AT+CMER=3,0,0,1\r";
@@ -1503,7 +1503,7 @@
char buf[BTA_HF_CLIENT_AT_MAX_LEN];
int at_len;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (idx > 0)
at_len = snprintf(buf, sizeof(buf), "AT+CHLD=%c%u\r", cmd, idx);
@@ -1517,7 +1517,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (activate)
buf = "AT+CLIP=1\r";
@@ -1531,7 +1531,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (activate)
buf = "AT+CCWA=1\r";
@@ -1546,7 +1546,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (activate)
buf = "AT+CMEE=1\r";
@@ -1560,11 +1560,11 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (!service_availability)
{
- APPL_TRACE_DEBUG0("Skip AT+COPS no service");
+ APPL_TRACE_DEBUG("Skip AT+COPS no service");
return;
}
if (query)
@@ -1579,7 +1579,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
buf = "AT+CLCC\r";
@@ -1590,7 +1590,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (enable)
buf = "AT+BVRA=1\r";
@@ -1605,7 +1605,7 @@
char buf[BTA_HF_CLIENT_AT_MAX_LEN];
int at_len;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
at_len = snprintf(buf, sizeof(buf), "AT+VGS=%u\r", volume);
@@ -1617,7 +1617,7 @@
char buf[BTA_HF_CLIENT_AT_MAX_LEN];
int at_len;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
at_len = snprintf(buf, sizeof(buf), "AT+VGM=%u\r", volume);
@@ -1629,7 +1629,7 @@
char buf[BTA_HF_CLIENT_AT_MAX_LEN];
int at_len;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (number[0] != '\0')
{
@@ -1647,7 +1647,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
buf = "AT+BLDN\r";
@@ -1658,7 +1658,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
buf = "ATA\r";
@@ -1669,7 +1669,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
buf = "AT+CHUP\r";
@@ -1681,7 +1681,7 @@
char buf[BTA_HF_CLIENT_AT_MAX_LEN];
int at_len;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (query == TRUE)
{
@@ -1700,7 +1700,7 @@
char buf[BTA_HF_CLIENT_AT_MAX_LEN];
int at_len;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
at_len = snprintf(buf, sizeof(buf), "AT+VTS=%c\r", code);
@@ -1711,7 +1711,7 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
buf = "AT+BCC\r";
@@ -1722,11 +1722,11 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (!service_availability)
{
- APPL_TRACE_DEBUG0("Skip AT+CNUM no Service");
+ APPL_TRACE_DEBUG("Skip AT+CNUM no Service");
return;
}
buf = "AT+CNUM\r";
@@ -1738,11 +1738,11 @@
{
char *buf;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (!(bta_hf_client_cb.scb.peer_features & BTA_HF_CLIENT_PEER_FEAT_ECNR))
{
- APPL_TRACE_DEBUG0("Remote does not support NREC.");
+ APPL_TRACE_DEBUG("Remote does not support NREC.");
return;
}
@@ -1756,7 +1756,7 @@
char buf[BTA_HF_CLIENT_AT_MAX_LEN];
int at_len;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
at_len = snprintf(buf, sizeof(buf), "AT+BINP=%u\r", action);
@@ -1769,10 +1769,10 @@
int at_len;
int i;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (bta_hf_client_cb.scb.peer_version < HFP_VERSION_1_6)
{
- APPL_TRACE_DEBUG0("Remote does not Support AT+BIA");
+ APPL_TRACE_DEBUG("Remote does not Support AT+BIA");
return;
}
diff --git a/bta/hf_client/bta_hf_client_cmd.c b/bta/hf_client/bta_hf_client_cmd.c
index f71fce7..59d7b5f 100644
--- a/bta/hf_client/bta_hf_client_cmd.c
+++ b/bta/hf_client/bta_hf_client_cmd.c
@@ -77,12 +77,12 @@
bta_hf_client_send_at_nrec();
break;
default:
- APPL_TRACE_ERROR0("Default case");
+ APPL_TRACE_ERROR("Default case");
snprintf(buf,BTA_HF_CLIENT_AT_MAX_LEN,
"Cmd %d 1st arg %u 2nd arg %u string arg %s",
p_val->uint8_val, p_val->uint32_val1,
p_val->uint32_val2, p_val->str);
- APPL_TRACE_ERROR1("%s ", buf);
+ APPL_TRACE_ERROR("%s ", buf);
break;
}
}
diff --git a/bta/hf_client/bta_hf_client_main.c b/bta/hf_client/bta_hf_client_main.c
index 8311183..27c00cb 100644
--- a/bta/hf_client/bta_hf_client_main.c
+++ b/bta/hf_client/bta_hf_client_main.c
@@ -237,7 +237,7 @@
*******************************************************************************/
void bta_hf_client_scb_init(void)
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
memset(&bta_hf_client_cb.scb, 0, sizeof(tBTA_HF_CLIENT_SCB));
bta_hf_client_cb.scb.sco_idx = BTM_INVALID_SCO_INDEX;
@@ -256,7 +256,7 @@
*******************************************************************************/
void bta_hf_client_scb_disable(void)
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
bta_hf_client_scb_init();
@@ -275,7 +275,7 @@
*******************************************************************************/
void bta_hf_client_resume_open (void)
{
- APPL_TRACE_DEBUG1 ("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG ("%s", __FUNCTION__);
/* resume opening process. */
if (bta_hf_client_cb.scb.state == BTA_HF_CLIENT_INIT_ST)
@@ -297,7 +297,7 @@
*******************************************************************************/
static void bta_hf_client_colli_timer_cback (TIMER_LIST_ENT *p_tle)
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (p_tle)
{
@@ -329,15 +329,15 @@
{
if (id == BTA_ID_SYS) /* ACL collision */
{
- APPL_TRACE_WARNING0 ("HF Client found collision (ACL) ...");
+ APPL_TRACE_WARNING ("HF Client found collision (ACL) ...");
}
else if (id == BTA_ID_HS) /* RFCOMM collision */
{
- APPL_TRACE_WARNING0 ("HF Client found collision (RFCOMM) ...");
+ APPL_TRACE_WARNING ("HF Client found collision (RFCOMM) ...");
}
else
{
- APPL_TRACE_WARNING0 ("HF Client found collision (\?\?\?) ...");
+ APPL_TRACE_WARNING ("HF Client found collision (\?\?\?) ...");
}
bta_hf_client_cb.scb.state = BTA_HF_CLIENT_INIT_ST;
@@ -412,7 +412,7 @@
{
if (!bta_sys_is_register (BTA_ID_HS))
{
- APPL_TRACE_ERROR0("BTA HF Client is already disabled, ignoring ...");
+ APPL_TRACE_ERROR("BTA HF Client is already disabled, ignoring ...");
return;
}
@@ -437,7 +437,7 @@
BOOLEAN bta_hf_client_hdl_event(BT_HDR *p_msg)
{
#if BTA_HF_CLIENT_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hf_client_hdl_event %s (0x%x)", bta_hf_client_evt_str(p_msg->event), p_msg->event);
+ APPL_TRACE_DEBUG("bta_hf_client_hdl_event %s (0x%x)", bta_hf_client_evt_str(p_msg->event), p_msg->event);
#endif
switch (p_msg->event)
@@ -482,7 +482,7 @@
/* Ignore displaying of AT results when not connected (Ignored in state machine) */
if (bta_hf_client_cb.scb.state == BTA_HF_CLIENT_OPEN_ST)
{
- APPL_TRACE_EVENT4("HF Client evt : State %d (%s), Event 0x%04x (%s)",
+ APPL_TRACE_EVENT("HF Client evt : State %d (%s), Event 0x%04x (%s)",
bta_hf_client_cb.scb.state,
bta_hf_client_state_str(bta_hf_client_cb.scb.state),
event, bta_hf_client_evt_str(event));
@@ -492,7 +492,7 @@
event &= 0x00FF;
if (event >= (BTA_HF_CLIENT_MAX_EVT & 0x00FF))
{
- APPL_TRACE_ERROR0("HF Client evt out of range, ignoring...");
+ APPL_TRACE_ERROR("HF Client evt out of range, ignoring...");
return;
}
@@ -518,7 +518,7 @@
#if BTA_HF_CLIENT_DEBUG == TRUE
if (bta_hf_client_cb.scb.state != in_state)
{
- APPL_TRACE_EVENT3("BTA HF Client State Change: [%s] -> [%s] after Event [%s]",
+ APPL_TRACE_EVENT("BTA HF Client State Change: [%s] -> [%s] after Event [%s]",
bta_hf_client_state_str(in_state),
bta_hf_client_state_str(bta_hf_client_cb.scb.state),
bta_hf_client_evt_str(in_event));
@@ -550,11 +550,11 @@
*******************************************************************************/
void bta_hf_client_slc_seq(BOOLEAN error)
{
- APPL_TRACE_DEBUG1("bta_hf_client_slc_seq cmd: %u", bta_hf_client_cb.scb.at_cb.current_cmd);
+ APPL_TRACE_DEBUG("bta_hf_client_slc_seq cmd: %u", bta_hf_client_cb.scb.at_cb.current_cmd);
if (error) {
/* SLC establishment error, sent close rfcomm event */
- APPL_TRACE_ERROR1("HFPClient: Failed to create SLC due to AT error, disconnecting (%u)",
+ APPL_TRACE_ERROR("HFPClient: Failed to create SLC due to AT error, disconnecting (%u)",
bta_hf_client_cb.scb.at_cb.current_cmd);
bta_hf_client_sm_execute(BTA_HF_CLIENT_API_CLOSE_EVT, NULL);
@@ -611,7 +611,7 @@
default:
/* If happen there is a bug in SLC creation procedure... */
- APPL_TRACE_ERROR1("HFPClient: Failed to create SLCdue to unexpected AT command, disconnecting (%u)",
+ APPL_TRACE_ERROR("HFPClient: Failed to create SLCdue to unexpected AT command, disconnecting (%u)",
bta_hf_client_cb.scb.at_cb.current_cmd);
bta_hf_client_sm_execute(BTA_HF_CLIENT_API_CLOSE_EVT, NULL);
diff --git a/bta/hf_client/bta_hf_client_rfc.c b/bta/hf_client/bta_hf_client_rfc.c
index b71f919..4c73b5a 100644
--- a/bta/hf_client/bta_hf_client_rfc.c
+++ b/bta/hf_client/bta_hf_client_rfc.c
@@ -49,7 +49,7 @@
/* ignore port events for port handles other than connected handle */
if (port_handle != bta_hf_client_cb.scb.conn_handle)
{
- APPL_TRACE_DEBUG2("bta_hf_client_port_cback ignoring handle:%d conn_handle = %d",
+ APPL_TRACE_DEBUG("bta_hf_client_port_cback ignoring handle:%d conn_handle = %d",
port_handle, bta_hf_client_cb.scb.conn_handle);
return;
}
@@ -76,13 +76,13 @@
tBTA_HF_CLIENT_RFC *p_buf;
UINT16 event;
- APPL_TRACE_DEBUG4("bta_hf_client_mgmt_cback : code = %d, port_handle = %d, conn_handle = %d, serv_handle = %d",
+ APPL_TRACE_DEBUG("bta_hf_client_mgmt_cback : code = %d, port_handle = %d, conn_handle = %d, serv_handle = %d",
code, port_handle, bta_hf_client_cb.scb.conn_handle, bta_hf_client_cb.scb.serv_handle);
/* ignore close event for port handles other than connected handle */
if ((code != PORT_SUCCESS) && (port_handle != bta_hf_client_cb.scb.conn_handle))
{
- APPL_TRACE_DEBUG1("bta_hf_client_mgmt_cback ignoring handle:%d", port_handle);
+ APPL_TRACE_DEBUG("bta_hf_client_mgmt_cback ignoring handle:%d", port_handle);
return;
}
@@ -95,7 +95,7 @@
}
else
{
- APPL_TRACE_ERROR1 ("bta_hf_client_mgmt_cback: PORT_SUCCESS, ignoring handle = %d", port_handle);
+ APPL_TRACE_ERROR ("bta_hf_client_mgmt_cback: PORT_SUCCESS, ignoring handle = %d", port_handle);
return;
}
}
@@ -150,7 +150,7 @@
if (bta_hf_client_cb.scb.serv_handle > 0)
{
- APPL_TRACE_DEBUG2("%s already started, handle: %d", __FUNCTION__, bta_hf_client_cb.scb.serv_handle);
+ APPL_TRACE_DEBUG("%s already started, handle: %d", __FUNCTION__, bta_hf_client_cb.scb.serv_handle);
return;
}
@@ -168,10 +168,10 @@
else
{
/* TODO: can we handle this better? */
- APPL_TRACE_DEBUG1("bta_hf_client_start_server: RFCOMM_CreateConnection returned error:%d", port_status);
+ APPL_TRACE_DEBUG("bta_hf_client_start_server: RFCOMM_CreateConnection returned error:%d", port_status);
}
- APPL_TRACE_DEBUG1("bta_hf_client_start_server handle: %d", bta_hf_client_cb.scb.serv_handle);
+ APPL_TRACE_DEBUG("bta_hf_client_start_server handle: %d", bta_hf_client_cb.scb.serv_handle);
}
/*******************************************************************************
@@ -186,11 +186,11 @@
*******************************************************************************/
void bta_hf_client_close_server(void)
{
- APPL_TRACE_DEBUG2("%s %d", __FUNCTION__, bta_hf_client_cb.scb.serv_handle);
+ APPL_TRACE_DEBUG("%s %d", __FUNCTION__, bta_hf_client_cb.scb.serv_handle);
if (bta_hf_client_cb.scb.serv_handle == 0)
{
- APPL_TRACE_DEBUG1("%s already stopped", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s already stopped", __FUNCTION__);
return;
}
@@ -219,7 +219,7 @@
bta_hf_client_mgmt_cback) == PORT_SUCCESS)
{
bta_hf_client_setup_port(bta_hf_client_cb.scb.conn_handle);
- APPL_TRACE_DEBUG1("bta_hf_client_rfc_do_open : conn_handle = %d", bta_hf_client_cb.scb.conn_handle);
+ APPL_TRACE_DEBUG("bta_hf_client_rfc_do_open : conn_handle = %d", bta_hf_client_cb.scb.conn_handle);
}
/* RFCOMM create connection failed; send ourselves RFCOMM close event */
else
diff --git a/bta/hf_client/bta_hf_client_sco.c b/bta/hf_client/bta_hf_client_sco.c
index 224dcc6..eb0929c 100644
--- a/bta/hf_client/bta_hf_client_sco.c
+++ b/bta/hf_client/bta_hf_client_sco.c
@@ -94,13 +94,13 @@
BOOLEAN removed_started = FALSE;
tBTM_STATUS status;
- APPL_TRACE_DEBUG2("%s %d", __FUNCTION__, only_active);
+ APPL_TRACE_DEBUG("%s %d", __FUNCTION__, only_active);
if (bta_hf_client_cb.scb.sco_idx != BTM_INVALID_SCO_INDEX)
{
status = BTM_RemoveSco(bta_hf_client_cb.scb.sco_idx);
- APPL_TRACE_DEBUG3("%s idx 0x%04x, status:0x%x", __FUNCTION__, bta_hf_client_cb.scb.sco_idx, status);
+ APPL_TRACE_DEBUG("%s idx 0x%04x, status:0x%x", __FUNCTION__, bta_hf_client_cb.scb.sco_idx, status);
if (status == BTM_CMD_STARTED)
{
@@ -150,7 +150,7 @@
tBTM_ESCO_PARAMS resp;
UINT8 hci_status = HCI_SUCCESS;
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (bta_hf_client_cb.scb.sco_state == BTA_HF_CLIENT_SCO_LISTEN_ST)
{
@@ -186,7 +186,7 @@
*******************************************************************************/
static void bta_hf_client_esco_connreq_cback(tBTM_ESCO_EVT event, tBTM_ESCO_EVT_DATA *p_data)
{
- APPL_TRACE_DEBUG2("%s %d", __FUNCTION__, event);
+ APPL_TRACE_DEBUG("%s %d", __FUNCTION__, event);
if (event != BTM_ESCO_CONN_REQ_EVT)
{
@@ -218,7 +218,7 @@
BT_HDR *p_buf;
UINT8 *rem_bd;
- APPL_TRACE_DEBUG2("%s %d", __FUNCTION__, sco_idx);
+ APPL_TRACE_DEBUG("%s %d", __FUNCTION__, sco_idx);
rem_bd = BTM_ReadScoBdAddr(sco_idx);
@@ -254,7 +254,7 @@
{
BT_HDR *p_buf;
- APPL_TRACE_DEBUG2("%s %d", __FUNCTION__, sco_idx);
+ APPL_TRACE_DEBUG("%s %d", __FUNCTION__, sco_idx);
if (bta_hf_client_cb.scb.sco_idx == sco_idx)
{
@@ -283,12 +283,12 @@
UINT8 *p_bd_addr = NULL;
tBTM_ESCO_PARAMS params;
- APPL_TRACE_DEBUG2("%s %d", __FUNCTION__, is_orig);
+ APPL_TRACE_DEBUG("%s %d", __FUNCTION__, is_orig);
/* Make sure this sco handle is not already in use */
if (bta_hf_client_cb.scb.sco_idx != BTM_INVALID_SCO_INDEX)
{
- APPL_TRACE_WARNING2("%s: Index 0x%04x already in use", __FUNCTION__,
+ APPL_TRACE_WARNING("%s: Index 0x%04x already in use", __FUNCTION__,
bta_hf_client_cb.scb.sco_idx);
return;
}
@@ -307,13 +307,13 @@
||!((params.packet_types & ~(BTM_ESCO_LINK_ONLY_MASK | BTM_SCO_LINK_ONLY_MASK)) ^ BTA_HF_CLIENT_NO_EDR_ESCO))
{
bta_hf_client_cb.scb.retry_with_sco_only = TRUE;
- APPL_TRACE_API0("Setting retry_with_sco_only to TRUE");
+ APPL_TRACE_API("Setting retry_with_sco_only to TRUE");
}
}
else
{
if(bta_hf_client_cb.scb.retry_with_sco_only)
- APPL_TRACE_API0("retrying with SCO only");
+ APPL_TRACE_API("retrying with SCO only");
bta_hf_client_cb.scb.retry_with_sco_only = FALSE;
BTM_SetEScoMode(BTM_LINK_TYPE_SCO, ¶ms);
@@ -335,10 +335,10 @@
if (status == BTM_CMD_STARTED && !is_orig)
{
if(!BTM_RegForEScoEvts(bta_hf_client_cb.scb.sco_idx, bta_hf_client_esco_connreq_cback))
- APPL_TRACE_DEBUG1("%s SCO registration success", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s SCO registration success", __FUNCTION__);
}
- APPL_TRACE_API5("%s: orig %d, inx 0x%04x, status 0x%x, pkt types 0x%04x",
+ APPL_TRACE_API("%s: orig %d, inx 0x%04x, status 0x%x, pkt types 0x%04x",
__FUNCTION__, is_orig, bta_hf_client_cb.scb.sco_idx,
status, params.packet_types);
}
@@ -356,7 +356,7 @@
*******************************************************************************/
static void bta_hf_client_sco_event(UINT8 event)
{
- APPL_TRACE_DEBUG3("%s state: %d event: %d", __FUNCTION__,
+ APPL_TRACE_DEBUG("%s state: %d event: %d", __FUNCTION__,
bta_hf_client_cb.scb.sco_state, event);
switch (bta_hf_client_cb.scb.sco_state)
@@ -371,7 +371,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_HF_CLIENT_SCO_SHUTDOWN_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_HF_CLIENT_SCO_SHUTDOWN_ST: Ignoring event %d", event);
break;
}
break;
@@ -403,7 +403,7 @@
case BTA_HF_CLIENT_SCO_CLOSE_E:
/* remove listening connection */
/* Ignore the event. We need to keep listening SCO for the active SLC */
- APPL_TRACE_WARNING1("BTA_HF_CLIENT_SCO_LISTEN_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_HF_CLIENT_SCO_LISTEN_ST: Ignoring event %d", event);
break;
case BTA_HF_CLIENT_SCO_CONN_CLOSE_E:
@@ -413,7 +413,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_HF_CLIENT_SCO_LISTEN_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_HF_CLIENT_SCO_LISTEN_ST: Ignoring event %d", event);
break;
}
break;
@@ -440,7 +440,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_HF_CLIENT_SCO_OPENING_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_HF_CLIENT_SCO_OPENING_ST: Ignoring event %d", event);
break;
}
break;
@@ -470,7 +470,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_HF_CLIENT_SCO_OPEN_CL_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_HF_CLIENT_SCO_OPEN_CL_ST: Ignoring event %d", event);
break;
}
break;
@@ -500,7 +500,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_HF_CLIENT_SCO_OPEN_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_HF_CLIENT_SCO_OPEN_ST: Ignoring event %d", event);
break;
}
break;
@@ -524,7 +524,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_HF_CLIENT_SCO_CLOSING_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_HF_CLIENT_SCO_CLOSING_ST: Ignoring event %d", event);
break;
}
break;
@@ -547,7 +547,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_HF_CLIENT_SCO_CLOSE_OP_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_HF_CLIENT_SCO_CLOSE_OP_ST: Ignoring event %d", event);
break;
}
break;
@@ -569,7 +569,7 @@
break;
default:
- APPL_TRACE_WARNING1("BTA_HF_CLIENT_SCO_SHUTTING_ST: Ignoring event %d", event);
+ APPL_TRACE_WARNING("BTA_HF_CLIENT_SCO_SHUTTING_ST: Ignoring event %d", event);
break;
}
break;
@@ -593,7 +593,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
bta_hf_client_sco_event(BTA_HF_CLIENT_SCO_LISTEN_E);
}
@@ -612,7 +612,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
bta_hf_client_sco_event(BTA_HF_CLIENT_SCO_SHUTDOWN_E);
}
@@ -631,7 +631,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
bta_hf_client_sco_event(BTA_HF_CLIENT_SCO_CONN_OPEN_E);
@@ -661,7 +661,7 @@
*******************************************************************************/
void bta_hf_client_sco_conn_close(tBTA_HF_CLIENT_DATA *p_data)
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
/* clear current scb */
bta_hf_client_cb.scb.sco_idx = BTM_INVALID_SCO_INDEX;
@@ -706,7 +706,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
bta_hf_client_sco_event(BTA_HF_CLIENT_SCO_OPEN_E);
}
@@ -725,7 +725,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG2("%s 0x%x", __FUNCTION__, bta_hf_client_cb.scb.sco_idx);
+ APPL_TRACE_DEBUG("%s 0x%x", __FUNCTION__, bta_hf_client_cb.scb.sco_idx);
if (bta_hf_client_cb.scb.sco_idx != BTM_INVALID_SCO_INDEX)
{
diff --git a/bta/hf_client/bta_hf_client_sdp.c b/bta/hf_client/bta_hf_client_sdp.c
index f967fbf..a19912c 100644
--- a/bta/hf_client/bta_hf_client_sdp.c
+++ b/bta/hf_client/bta_hf_client_sdp.c
@@ -52,7 +52,7 @@
tBTA_HF_CLIENT_DISC_RESULT *p_buf;
UINT16 event;
- APPL_TRACE_DEBUG1("bta_hf_client_sdp_cback status:0x%x", status);
+ APPL_TRACE_DEBUG("bta_hf_client_sdp_cback status:0x%x", status);
/* set event according to int/acp */
if (bta_hf_client_cb.scb.role == BTA_HF_CLIENT_ACP)
@@ -98,7 +98,7 @@
UINT8 buf[2];
UINT16 sdp_features = 0;
- APPL_TRACE_DEBUG0("bta_hf_client_add_record");
+ APPL_TRACE_DEBUG("bta_hf_client_add_record");
memset( proto_elem_list, 0 , BTA_HF_CLIENT_NUM_PROTO_ELEMS*sizeof(tSDP_PROTOCOL_ELEM));
@@ -198,7 +198,7 @@
{
UNUSED(p_data);
- APPL_TRACE_DEBUG0("bta_hf_client_del_record");
+ APPL_TRACE_DEBUG("bta_hf_client_del_record");
if (bta_hf_client_cb.sdp_handle != 0)
{
@@ -287,7 +287,7 @@
break;
}
- APPL_TRACE_DEBUG3("%s peer_version=0x%x peer_features=0x%x",
+ APPL_TRACE_DEBUG("%s peer_version=0x%x peer_features=0x%x",
__FUNCTION__, bta_hf_client_cb.scb.peer_version,
bta_hf_client_cb.scb.peer_features);
diff --git a/bta/hh/bta_hh_act.c b/bta/hh/bta_hh_act.c
index 8ec2698..3c5cf73 100644
--- a/bta/hh/bta_hh_act.c
+++ b/bta/hh/bta_hh_act.c
@@ -200,7 +200,7 @@
attr_mask |= HID_SEC_REQUIRED;
#if BTA_HH_DEBUG
- APPL_TRACE_EVENT4("bta_hh_sdp_cback: p_cb: %d result 0x%02x, \
+ APPL_TRACE_EVENT("bta_hh_sdp_cback: p_cb: %d result 0x%02x, \
attr_mask 0x%02x, handle %x", \
p_cb, result, attr_mask,p_cb->hid_handle);
#endif
@@ -273,7 +273,7 @@
tSDP_DI_GET_RECORD di_rec;
tHID_STATUS ret;
#if BTA_HH_DEBUG
- APPL_TRACE_EVENT2("bta_hh_di_sdp_cback: p_cb: %d result 0x%02x", p_cb, result);
+ APPL_TRACE_EVENT("bta_hh_di_sdp_cback: p_cb: %d result 0x%02x", p_cb, result);
#endif
/* if DI record does not exist on remote device, vendor_id in tBTA_HH_DEV_DSCP_INFO will be
@@ -306,7 +306,7 @@
else
{
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1 ("bta_hh_di_sdp_cback: HID_HostGetSDPRecord failed: Status 0x%2x",
+ APPL_TRACE_DEBUG ("bta_hh_di_sdp_cback: HID_HostGetSDPRecord failed: Status 0x%2x",
ret);
#endif
}
@@ -358,7 +358,7 @@
{
status = BTA_HH_OK;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG0("bta_hh_start_sdp:: skip SDP for known devices");
+ APPL_TRACE_DEBUG("bta_hh_start_sdp:: skip SDP for known devices");
#endif
if (p_cb->hid_handle == BTA_HH_INVALID_HANDLE)
{
@@ -400,7 +400,7 @@
bta_hh_di_sdp_cback) != SDP_SUCCESS)
{
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1 ("bta_hh_start_sdp: SDP_DiDiscover failed: \
+ APPL_TRACE_DEBUG ("bta_hh_start_sdp: SDP_DiDiscover failed: \
Status 0x%2X",status);
#endif
status = BTA_HH_ERR_SDP;
@@ -434,7 +434,7 @@
tBTA_HH_STATUS status = p_data->status;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1 ("bta_hh_sdp_cmpl: status 0x%2X",p_data->status);
+ APPL_TRACE_DEBUG ("bta_hh_sdp_cmpl: status 0x%2X",p_data->status);
#endif
/* initialize call back data */
@@ -456,7 +456,7 @@
if ((ret = HID_HostOpenDev (p_cb->hid_handle)) != HID_SUCCESS)
{
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1 ("bta_hh_sdp_cmpl: HID_HostOpenDev failed: \
+ APPL_TRACE_DEBUG ("bta_hh_sdp_cmpl: HID_HostOpenDev failed: \
Status 0x%2X",ret);
#endif
/* open fail, remove device from management device list */
@@ -483,7 +483,7 @@
if ((status == BTA_HH_ERR_SDP) &&
(p_cb->incoming_conn) &&(p_cb->app_id == 0))
{
- APPL_TRACE_DEBUG1 ("bta_hh_sdp_cmpl:SDP failed for incoming conn :hndl %d",
+ APPL_TRACE_DEBUG ("bta_hh_sdp_cmpl:SDP failed for incoming conn :hndl %d",
p_cb->incoming_hid_handle);
HID_HostRemoveDev( p_cb->incoming_hid_handle);
}
@@ -625,7 +625,7 @@
p_cb->hid_handle;
#if BTA_HH_DEBUG
- APPL_TRACE_EVENT1 ("bta_hh_open_act: Device[%d] connected", dev_handle);
+ APPL_TRACE_EVENT ("bta_hh_open_act: Device[%d] connected", dev_handle);
#endif
/* SDP has been done */
@@ -689,7 +689,7 @@
tBTA_HH_CONN conn ;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG2("HANDSHAKE received for: event = %s data= %d",
+ APPL_TRACE_DEBUG("HANDSHAKE received for: event = %s data= %d",
bta_hh_get_w4_event(p_cb->w4_evt), p_data->hid_cback.data);
#endif
@@ -737,7 +737,7 @@
default:
/* unknow transaction handshake response */
- APPL_TRACE_DEBUG0("unknown transaction type");
+ APPL_TRACE_DEBUG("unknown transaction type");
break;
}
@@ -762,7 +762,7 @@
tBTA_HH_HSDATA hs_data;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("Ctrl DATA received w4: event[%s]",
+ APPL_TRACE_DEBUG("Ctrl DATA received w4: event[%s]",
bta_hh_get_w4_event(p_cb->w4_evt));
#endif
hs_data.status = BTA_HH_OK;
@@ -781,7 +781,7 @@
hs_data.rsp_data.proto_mode = ((*data) == HID_PAR_PROTOCOL_REPORT)? \
BTA_HH_PROTO_RPT_MODE : BTA_HH_PROTO_BOOT_MODE;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("GET_PROTOCOL Mode = [%s]",
+ APPL_TRACE_DEBUG("GET_PROTOCOL Mode = [%s]",
(hs_data.rsp_data.proto_mode == BTA_HH_PROTO_RPT_MODE)? "Report" : "Boot");
#endif
break;
@@ -794,7 +794,7 @@
/* fall through */
default:
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("invalid transaction type for DATA payload: 4_evt[%s]",
+ APPL_TRACE_DEBUG("invalid transaction type for DATA payload: 4_evt[%s]",
bta_hh_get_w4_event(p_cb->w4_evt));
#endif
break;
@@ -1060,7 +1060,7 @@
break;
default:
- APPL_TRACE_DEBUG0("invalid command");
+ APPL_TRACE_DEBUG("invalid command");
break;
}
@@ -1104,7 +1104,7 @@
p_data->api_sndcmd.rpt_id,
p_data->api_sndcmd.p_data) != HID_SUCCESS)
{
- APPL_TRACE_ERROR0("HID_HostWriteDev Error ");
+ APPL_TRACE_ERROR("HID_HostWriteDev Error ");
cbdata.status = BTA_HH_ERR;
if (p_data->api_sndcmd.t_type != HID_TRANS_CONTROL &&
@@ -1143,7 +1143,7 @@
/* currently not expected */
case HID_TRANS_DATAC:
default:
- APPL_TRACE_DEBUG1("bta_hh_write_dev_act:: cmd type = %d",
+ APPL_TRACE_DEBUG("bta_hh_write_dev_act:: cmd type = %d",
p_data->api_sndcmd.t_type);
break;
}
@@ -1190,7 +1190,7 @@
UINT8 xx = 0;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("bta_hh_cback::HID_event [%s]", bta_hh_hid_event_name(event));
+ APPL_TRACE_DEBUG("bta_hh_cback::HID_event [%s]", bta_hh_hid_event_name(event));
#endif
switch (event)
diff --git a/bta/hh/bta_hh_api.c b/bta/hh/bta_hh_api.c
index e7672d9..58090f6 100644
--- a/bta/hh/bta_hh_api.c
+++ b/bta/hh/bta_hh_api.c
@@ -65,7 +65,7 @@
/* register with BTA system manager */
bta_sys_register(BTA_ID_HH, &bta_hh_reg);
- APPL_TRACE_ERROR0("Calling BTA_HhEnable");
+ APPL_TRACE_ERROR("Calling BTA_HhEnable");
p_buf = (tBTA_HH_API_ENABLE *)GKI_getbuf((UINT16)sizeof(tBTA_HH_API_ENABLE));
if (p_buf != NULL)
@@ -155,7 +155,7 @@
}
else
{
- APPL_TRACE_ERROR0("No resource to send HID host Connect request.");
+ APPL_TRACE_ERROR("No resource to send HID host Connect request.");
}
}
@@ -308,7 +308,7 @@
#if (defined BTA_HH_LE_INCLUDED && BTA_HH_LE_INCLUDED == TRUE)
if (p_data->layer_specific != BTA_HH_RPTT_OUTPUT)
{
- APPL_TRACE_ERROR0("ERROR! Wrong report type! Write Command only valid for output report!");
+ APPL_TRACE_ERROR("ERROR! Wrong report type! Write Command only valid for output report!");
return;
}
#endif
@@ -482,7 +482,7 @@
break;
default:
- APPL_TRACE_DEBUG1("Unknown boot report: %d", p_report[0]);;
+ APPL_TRACE_DEBUG("Unknown boot report: %d", p_report[0]);;
break;
}
}
diff --git a/bta/hh/bta_hh_le.c b/bta/hh/bta_hh_le.c
index f2bba4a..9b8cdda 100644
--- a/bta/hh/bta_hh_le.c
+++ b/bta/hh/bta_hh_le.c
@@ -109,14 +109,14 @@
tBTA_HH_LE_RPT *p_rpt;
char * rpt_name;
- APPL_TRACE_DEBUG0("HID Report DB");
+ APPL_TRACE_DEBUG("HID Report DB");
for (i = 0; i < BTA_HH_LE_HID_SRVC_MAX; i ++)
{
if (p_cb->hid_srvc[i].in_use)
{
p_rpt = &p_cb->hid_srvc[i].report[0];
- APPL_TRACE_DEBUG1("\t HID serivce inst: %d", i);
+ APPL_TRACE_DEBUG("\t HID serivce inst: %d", i);
for (j = 0; j < BTA_HH_LE_RPT_MAX; j ++, p_rpt++)
{
@@ -133,7 +133,7 @@
rpt_name = "Boot MI Input";
- APPL_TRACE_DEBUG6("\t\t [%s- 0x%04x] [Type: %s], [ReportID: %d] [inst_id: %d] [Clt_cfg: %d]",
+ APPL_TRACE_DEBUG("\t\t [%s- 0x%04x] [Type: %s], [ReportID: %d] [inst_id: %d] [Clt_cfg: %d]",
rpt_name,
p_rpt->uuid ,
((p_rpt->rpt_type < 4) ? bta_hh_le_rpt_name[p_rpt->rpt_type] : "UNKNOWN"),
@@ -325,7 +325,7 @@
}
else
{
- APPL_TRACE_ERROR0("DB full,max HID service entry!");
+ APPL_TRACE_ERROR("DB full,max HID service entry!");
}
return added;
@@ -500,7 +500,7 @@
UINT8 i;
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hh_le_find_rpt_by_idtype: r_tpye: %d rpt_id: %d", r_type, rpt_id);
+ APPL_TRACE_DEBUG("bta_hh_le_find_rpt_by_idtype: r_tpye: %d rpt_id: %d", r_type, rpt_id);
#endif
for (i = 0 ; i < BTA_HH_LE_RPT_MAX; i ++, p_rpt++)
@@ -620,7 +620,7 @@
else
{
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_ERROR2("bta_hh_le_read_char_dscrpt: No such descrpt exists: %s(0x%04x)",
+ APPL_TRACE_ERROR("bta_hh_le_read_char_dscrpt: No such descrpt exists: %s(0x%04x)",
bta_hh_uuid_to_str(char_descp_uuid), char_descp_uuid);
#endif
}
@@ -649,7 +649,7 @@
if (p_rpt->uuid == GATT_UUID_BATTERY_LEVEL)
{
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG0("read battery level report reference descriptor");
+ APPL_TRACE_DEBUG("read battery level report reference descriptor");
#endif
srvc_uuid = UUID_SERVCLASS_BATTERY;
char_uuid = GATT_UUID_BATTERY_LEVEL;
@@ -657,7 +657,7 @@
else
{
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG0("read HID report reference descriptor");
+ APPL_TRACE_DEBUG("read HID report reference descriptor");
#endif
srvc_uuid = UUID_SERVCLASS_LE_HID;
char_uuid = GATT_UUID_HID_REPORT;
@@ -717,7 +717,7 @@
p_rpt->rpt_type = BTA_HH_RPTT_RESRV;
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG1("report ID: %d", p_rpt->rpt_id);
+ APPL_TRACE_DEBUG("report ID: %d", p_rpt->rpt_id);
#endif
}
@@ -752,7 +752,7 @@
STREAM_TO_UINT16(p_dev_cb->hid_srvc[p_dev_cb->cur_srvc_index].ext_rpt_ref, pp);
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG1("External Report Reference UUID 0x%04x",
+ APPL_TRACE_DEBUG("External Report Reference UUID 0x%04x",
p_dev_cb->hid_srvc[p_dev_cb->cur_srvc_index].ext_rpt_ref);
#endif
}
@@ -778,7 +778,7 @@
UINT16 srvc_uuid;
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hh_le_register_input_notif mode: %d", proto_mode);
+ APPL_TRACE_DEBUG("bta_hh_le_register_input_notif mode: %d", proto_mode);
#endif
for (i = 0; i < BTA_HH_LE_RPT_MAX; i ++, p_rpt ++)
@@ -805,7 +805,7 @@
if (p_rpt->uuid == GATT_UUID_HID_REPORT &&
p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION)
{
- APPL_TRACE_DEBUG1("---> Deregister Report ID: %d", p_rpt->rpt_id);
+ APPL_TRACE_DEBUG("---> Deregister Report ID: %d", p_rpt->rpt_id);
BTA_GATTC_DeregisterForNotifications(bta_hh_cb.gatt_if,
p_dev_cb->addr,
&char_id);
@@ -814,7 +814,7 @@
else if (p_rpt->uuid == GATT_UUID_HID_BT_KB_INPUT ||
p_rpt->uuid == GATT_UUID_HID_BT_MOUSE_INPUT)
{
- APPL_TRACE_DEBUG1("<--- Register Boot Report ID: %d", p_rpt->rpt_id);
+ APPL_TRACE_DEBUG("<--- Register Boot Report ID: %d", p_rpt->rpt_id);
BTA_GATTC_RegisterForNotifications(bta_hh_cb.gatt_if,
p_dev_cb->addr,
&char_id);
@@ -827,7 +827,7 @@
p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION)
{
- APPL_TRACE_DEBUG1("---> Deregister Boot Report ID: %d", p_rpt->rpt_id);
+ APPL_TRACE_DEBUG("---> Deregister Boot Report ID: %d", p_rpt->rpt_id);
BTA_GATTC_DeregisterForNotifications(bta_hh_cb.gatt_if,
p_dev_cb->addr,
&char_id);
@@ -835,7 +835,7 @@
else if (p_rpt->uuid == GATT_UUID_HID_REPORT &&
p_rpt->client_cfg_value == BTA_GATT_CLT_CONFIG_NOTIFICATION)
{
- APPL_TRACE_DEBUG1("<--- Register Report ID: %d", p_rpt->rpt_id);
+ APPL_TRACE_DEBUG("<--- Register Report ID: %d", p_rpt->rpt_id);
BTA_GATTC_RegisterForNotifications(bta_hh_cb.gatt_if,
p_dev_cb->addr,
&char_id);
@@ -980,7 +980,7 @@
tBTA_HH_CBDATA cback_data ;
BOOLEAN exec = TRUE;
- APPL_TRACE_DEBUG1("bta_hh_le_set_protocol_mode attempt mode: %s",
+ APPL_TRACE_DEBUG("bta_hh_le_set_protocol_mode attempt mode: %s",
(mode == BTA_HH_PROTO_RPT_MODE)? "Report": "Boot");
cback_data.handle = p_cb->hid_handle;
@@ -992,7 +992,7 @@
if (mode == BTA_HH_PROTO_BOOT_MODE)
{
- APPL_TRACE_ERROR0("Set Boot Mode failed!! No PROTO_MODE Char!");
+ APPL_TRACE_ERROR("Set Boot Mode failed!! No PROTO_MODE Char!");
cback_data.status = BTA_HH_ERR;
}
else
@@ -1088,11 +1088,11 @@
p_char_id->char_id.inst_id,
prop) == NULL)
{
- APPL_TRACE_ERROR0("Add report entry failed !!!");
+ APPL_TRACE_ERROR("Add report entry failed !!!");
break;
}
- APPL_TRACE_DEBUG0("Find more REPORT");
+ APPL_TRACE_DEBUG("Find more REPORT");
if (BTA_GATTC_GetNextChar(p_dev_cb->conn_id,
p_char_id,
@@ -1105,7 +1105,7 @@
}
while (1);
- APPL_TRACE_ERROR0("all report searched");
+ APPL_TRACE_ERROR("all report searched");
bta_hh_le_read_rpt_ref_descr(p_dev_cb,
&p_dev_cb->hid_srvc[p_dev_cb->cur_srvc_index].report[0]);
@@ -1129,7 +1129,7 @@
prop) == NULL)
{
- APPL_TRACE_ERROR0("Add report entry failed !!!");
+ APPL_TRACE_ERROR("Add report entry failed !!!");
}
return;
@@ -1150,7 +1150,7 @@
if (p_cb == NULL || p_dis_value == NULL)
{
- APPL_TRACE_ERROR0("received unexpected/error DIS callback");
+ APPL_TRACE_ERROR("received unexpected/error DIS callback");
return;
}
@@ -1159,7 +1159,7 @@
if (p_dis_value->attr_mask & DIS_ATTR_PNP_ID_BIT)
{
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG3("Plug in PnP info: product_id = %02x, vendor_id = %04x, version = %04x",
+ APPL_TRACE_DEBUG("Plug in PnP info: product_id = %02x, vendor_id = %04x, version = %04x",
p_dis_value->pnp_id.product_id,
p_dis_value->pnp_id.vendor_id,
p_dis_value->pnp_id.product_version);
@@ -1189,7 +1189,7 @@
/* read DIS info */
if (!DIS_ReadDISInfo(p_cb->addr, bta_hh_le_dis_cback))
{
- APPL_TRACE_ERROR0("read DIS failed");
+ APPL_TRACE_ERROR("read DIS failed");
p_cb->disc_active &= ~BTA_HH_LE_DISC_DIS;
}
@@ -1217,13 +1217,13 @@
UNUSED(p_ref_data);
UNUSED (transport);
- APPL_TRACE_ERROR0("bta_hh_le_encrypt_cback");
+ APPL_TRACE_ERROR("bta_hh_le_encrypt_cback");
if (idx != BTA_HH_IDX_INVALID)
p_dev_cb = &bta_hh_cb.kdev[idx];
else
{
- APPL_TRACE_ERROR0("unexpected encryption callback, ignore");
+ APPL_TRACE_ERROR("unexpected encryption callback, ignore");
return;
}
p_dev_cb->status = (result == BTM_SUCCESS) ? BTA_HH_OK : BTA_HH_ERR_SEC;
@@ -1252,7 +1252,7 @@
/* configure protocol mode */
if (bta_hh_le_set_protocol_mode(p_cb, p_cb->mode) == FALSE)
{
- APPL_TRACE_ERROR0("bta_hh_security_cmpl");
+ APPL_TRACE_ERROR("bta_hh_security_cmpl");
bta_hh_le_open_cmpl(p_cb);
}
}
@@ -1366,7 +1366,7 @@
p2 = p_data->remote_bda;
- APPL_TRACE_DEBUG3("bta_hh_gatt_open BTA_GATTC_OPEN_EVT bda= [%08x%04x] status =%d",
+ APPL_TRACE_DEBUG("bta_hh_gatt_open BTA_GATTC_OPEN_EVT bda= [%08x%04x] status =%d",
((p2[0])<<24)+((p2[1])<<16)+((p2[2])<<8)+(p2[3]),
((p2[4])<<8)+ p2[5],p_data->status);
@@ -1380,7 +1380,7 @@
bta_hh_cb.le_cb_index[BTA_HH_GET_LE_CB_IDX(p_cb->hid_handle)] = p_cb->index;
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG3("hid_handle = %2x conn_id = %04x cb_index = %d", p_cb->hid_handle, p_cb->conn_id, p_cb->index);
+ APPL_TRACE_DEBUG("hid_handle = %2x conn_id = %04x cb_index = %d", p_cb->hid_handle, p_cb->conn_id, p_cb->index);
#endif
bta_hh_sm_execute(p_cb, BTA_HH_START_ENC_EVT, NULL);
@@ -1446,7 +1446,7 @@
/* TODO: proceed to find battery and device info */
if (bta_hh_le_add_hid_srvc_entry(p_dev_cb, p_dev_cb->total_srvc))
p_dev_cb->total_srvc ++;
- APPL_TRACE_DEBUG1("num of hid service: %d", p_dev_cb->total_srvc);
+ APPL_TRACE_DEBUG("num of hid service: %d", p_dev_cb->total_srvc);
}
break;
@@ -1471,7 +1471,7 @@
*******************************************************************************/
void bta_hh_le_gatt_disc_cmpl(tBTA_HH_DEV_CB *p_cb, tBTA_HH_STATUS status)
{
- APPL_TRACE_DEBUG0("bta_hh_le_gatt_disc_cmpl ");
+ APPL_TRACE_DEBUG("bta_hh_le_gatt_disc_cmpl ");
/* if open sucessful or protocol mode not desired, keep the connection open but inform app */
if (status == BTA_HH_OK || status == BTA_HH_ERR_PROTO)
@@ -1502,7 +1502,7 @@
void bta_hh_le_srvc_expl_srvc(tBTA_HH_DEV_CB *p_dev_cb)
{
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hh_le_srvc_expl_srvc cur_srvc_index = %d in_use = %d",
+ APPL_TRACE_DEBUG("bta_hh_le_srvc_expl_srvc cur_srvc_index = %d in_use = %d",
p_dev_cb->cur_srvc_index,
p_dev_cb->hid_srvc[p_dev_cb->cur_srvc_index].in_use);
#endif
@@ -1613,7 +1613,7 @@
char_result.char_id.inst_id,
prop) == NULL)
{
- APPL_TRACE_ERROR0("Add battery report entry failed !!!")
+ APPL_TRACE_ERROR("Add battery report entry failed !!!")
}
/* read the battery characteristic */
@@ -1626,7 +1626,7 @@
}
else
{
- APPL_TRACE_ERROR0("Remote device does not have battery level");
+ APPL_TRACE_ERROR("Remote device does not have battery level");
}
}
@@ -1690,7 +1690,7 @@
bta_hh_le_fill_16bits_srvc_id(TRUE, p_dev_cb->cur_srvc_index, UUID_SERVCLASS_LE_HID, &srvc_id);
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hh_le_search_hid_chars: looking for %s(0x%04x)",
+ APPL_TRACE_DEBUG("bta_hh_le_search_hid_chars: looking for %s(0x%04x)",
bta_hh_uuid_to_str(char_uuid), char_uuid);
#endif
@@ -1806,7 +1806,7 @@
if (p_dev_cb->w4_evt != BTA_HH_GET_RPT_EVT)
{
- APPL_TRACE_ERROR1("Unexpected READ cmpl, w4_evt = %d", p_dev_cb->w4_evt);
+ APPL_TRACE_ERROR("Unexpected READ cmpl, w4_evt = %d", p_dev_cb->w4_evt);
return;
}
@@ -1874,7 +1874,7 @@
p_dev_cb->mode = hs_data.rsp_data.proto_mode;
}
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("LE GET_PROTOCOL Mode = [%s]",
+ APPL_TRACE_DEBUG("LE GET_PROTOCOL Mode = [%s]",
(hs_data.rsp_data.proto_mode == BTA_HH_PROTO_RPT_MODE)? "Report" : "Boot");
#endif
@@ -1921,7 +1921,7 @@
default:
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_ERROR2("Unexpected read %s(0x%04x)",
+ APPL_TRACE_ERROR("Unexpected read %s(0x%04x)",
bta_hh_uuid_to_str(p_data->char_id.uuid.uu.uuid16),
p_data->char_id.uuid.uu.uuid16);
#endif
@@ -1931,12 +1931,12 @@
else
{
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_ERROR3("read uuid %s[0x%04x] error: %d",
+ APPL_TRACE_ERROR("read uuid %s[0x%04x] error: %d",
bta_hh_uuid_to_str(p_data->char_id.uuid.uu.uuid16),
p_data->char_id.uuid.uu.uuid16,
p_data->status);
#else
- APPL_TRACE_ERROR2("read uuid [0x%04x] error: %d", p_data->char_id.uuid.uu.uuid16, p_data->status);
+ APPL_TRACE_ERROR("read uuid [0x%04x] error: %d", p_data->char_id.uuid.uu.uuid16, p_data->status);
#endif
}
bta_hh_le_search_hid_chars(p_dev_cb);
@@ -1972,7 +1972,7 @@
break;
default:
- APPL_TRACE_ERROR1("Unexpected Read UUID: 0x%04x", p_data->char_id.uuid.uu.uuid16);
+ APPL_TRACE_ERROR("Unexpected Read UUID: 0x%04x", p_data->char_id.uuid.uu.uuid16);
break;
}
@@ -2003,7 +2003,7 @@
pp = p_data->p_value->unformat.p_value;
STREAM_TO_UINT16(p_rpt->client_cfg_value, pp);
- APPL_TRACE_DEBUG1("Read Client Configuration: 0x%04x", p_rpt->client_cfg_value);
+ APPL_TRACE_DEBUG("Read Client Configuration: 0x%04x", p_rpt->client_cfg_value);
}
}
}
@@ -2049,7 +2049,7 @@
char_uuid16 = p_data->char_id.uuid.uu.uuid16;
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hh_w4_le_read_descr_cmpl uuid: %s(0x%04x)",
+ APPL_TRACE_DEBUG("bta_hh_w4_le_read_descr_cmpl uuid: %s(0x%04x)",
bta_hh_uuid_to_str(p_data->descr_type.uuid.uu.uuid16),
p_data->descr_type.uuid.uu.uuid16);
#endif
@@ -2076,7 +2076,7 @@
break;
default:
- APPL_TRACE_ERROR1("unknown descriptor read complete for uuid: 0x%04x", char_uuid16);
+ APPL_TRACE_ERROR("unknown descriptor read complete for uuid: 0x%04x", char_uuid16);
break;
}
}
@@ -2130,7 +2130,7 @@
return;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("bta_hh_le_write_cmpl w4_evt: %d", p_dev_cb->w4_evt);
+ APPL_TRACE_DEBUG("bta_hh_le_write_cmpl w4_evt: %d", p_dev_cb->w4_evt);
#endif
switch (p_data->char_id.uuid.uu.uuid16)
{
@@ -2208,17 +2208,17 @@
bta_hh_le_register_scpp_notif_cmpl(p_dev_cb, p_data->status);
break;
default:
- APPL_TRACE_ERROR1("Unknown char ID clt cfg: 0x%04x", p_data->char_id.uuid.uu.uuid16);
+ APPL_TRACE_ERROR("Unknown char ID clt cfg: 0x%04x", p_data->char_id.uuid.uu.uuid16);
}
}
else
{
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_ERROR2("Unexpected write to %s(0x%04x)",
+ APPL_TRACE_ERROR("Unexpected write to %s(0x%04x)",
bta_hh_uuid_to_str(p_data->descr_type.uuid.uu.uuid16),
p_data->descr_type.uuid.uu.uuid16);
#else
- APPL_TRACE_ERROR1("Unexpected write to (0x%04x)", p_data->descr_type.uuid.uu.uuid16);
+ APPL_TRACE_ERROR("Unexpected write to (0x%04x)", p_data->descr_type.uuid.uu.uuid16);
#endif
}
@@ -2241,7 +2241,7 @@
if (p_dev_cb == NULL)
{
- APPL_TRACE_ERROR0("notification received from Unknown device");
+ APPL_TRACE_ERROR("notification received from Unknown device");
return;
}
@@ -2253,7 +2253,7 @@
p_data->char_id.char_id.inst_id);
if (p_rpt == NULL)
{
- APPL_TRACE_ERROR0("notification received for Unknown Report");
+ APPL_TRACE_ERROR("notification received for Unknown Report");
return;
}
@@ -2262,14 +2262,14 @@
else if (p_data->char_id.char_id.uuid.uu.uuid16 == GATT_UUID_HID_BT_KB_INPUT)
app_id = BTA_HH_APP_ID_KB;
- APPL_TRACE_ERROR1("Notification received on report ID: %d", p_rpt->rpt_id);
+ APPL_TRACE_ERROR("Notification received on report ID: %d", p_rpt->rpt_id);
/* need to append report ID to the head of data */
if (p_rpt->rpt_id != 0)
{
if ((p_buf = (UINT8 *)GKI_getbuf((UINT16)(p_data->len + 1))) == NULL)
{
- APPL_TRACE_ERROR0("No resources to send report data");
+ APPL_TRACE_ERROR("No resources to send report data");
return;
}
@@ -2404,7 +2404,7 @@
if (p_rpt == NULL)
{
- APPL_TRACE_ERROR0("bta_hh_le_get_rpt: no matching report");
+ APPL_TRACE_ERROR("bta_hh_le_get_rpt: no matching report");
return;
}
if (p_rpt->uuid == GATT_UUID_BATTERY_LEVEL)
@@ -2440,7 +2440,7 @@
if (p_buf == NULL || p_buf->len == 0)
{
- APPL_TRACE_ERROR0("bta_hh_le_write_rpt: Illegal data");
+ APPL_TRACE_ERROR("bta_hh_le_write_rpt: Illegal data");
return;
}
@@ -2453,11 +2453,11 @@
if (p_rpt == NULL)
{
- APPL_TRACE_ERROR0("bta_hh_le_write_rpt: no matching report");
+ APPL_TRACE_ERROR("bta_hh_le_write_rpt: no matching report");
return;
}
- APPL_TRACE_ERROR2("bta_hh_le_write_rpt: ReportID: 0x%02x Data Len: %d", rpt_id, p_buf->len);
+ APPL_TRACE_ERROR("bta_hh_le_write_rpt: ReportID: 0x%02x Data Len: %d", rpt_id, p_buf->len);
p_cb->w4_evt = w4_evt;
@@ -2561,7 +2561,7 @@
break;
default:
- APPL_TRACE_ERROR1("unsupported trsanction for LE HID device: %d", p_data->api_sndcmd.t_type);
+ APPL_TRACE_ERROR("unsupported trsanction for LE HID device: %d", p_data->api_sndcmd.t_type);
break;
}
@@ -2703,7 +2703,7 @@
p_dev_cb->mode != BTA_HH_PROTO_RPT_MODE ||
p_dev_cb->scps_supported == FALSE)
{
- APPL_TRACE_ERROR0("Can not set ScPP scan paramter as boot host, or remote does not support ScPP ");
+ APPL_TRACE_ERROR("Can not set ScPP scan paramter as boot host, or remote does not support ScPP ");
cback_data.handle = p_dev_cb->hid_handle;
cback_data.status = BTA_HH_ERR;
@@ -2742,7 +2742,7 @@
tBTA_HH_DEV_CB *p_dev_cb;
UINT16 evt;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("bta_hh_gattc_callback event = %d", event);
+ APPL_TRACE_DEBUG("bta_hh_gattc_callback event = %d", event);
#endif
if (p_data == NULL)
return;
@@ -2835,7 +2835,7 @@
index = bta_hh_find_cb(bd_addr);
if ((index = bta_hh_find_cb(bd_addr))== BTA_HH_IDX_INVALID)
{
- APPL_TRACE_ERROR0("unknown device");
+ APPL_TRACE_ERROR("unknown device");
return;
}
@@ -2845,7 +2845,7 @@
if (p_rpt == NULL)
{
- APPL_TRACE_ERROR0("bta_hh_le_write_rpt: no matching report");
+ APPL_TRACE_ERROR("bta_hh_le_write_rpt: no matching report");
return;
}
diff --git a/bta/hh/bta_hh_main.c b/bta/hh/bta_hh_main.c
index 10e62cd..e5c353d 100644
--- a/bta/hh/bta_hh_main.c
+++ b/bta/hh/bta_hh_main.c
@@ -357,7 +357,7 @@
default:
/* invalid handle, call bad API event */
- APPL_TRACE_ERROR1("wrong device handle: [%d]", p_data->hdr.layer_specific);
+ APPL_TRACE_ERROR("wrong device handle: [%d]", p_data->hdr.layer_specific);
/* Free the callback buffer now */
if (p_data != NULL && p_data->hid_cback.p_data != NULL)
{
@@ -375,14 +375,14 @@
{
#if BTA_HH_DEBUG == TRUE
in_state = p_cb->state;
- APPL_TRACE_EVENT3("bta_hh_sm_execute: State 0x%02x [%s], Event [%s]",
+ APPL_TRACE_EVENT("bta_hh_sm_execute: State 0x%02x [%s], Event [%s]",
in_state, bta_hh_state_code(in_state),
bta_hh_evt_code(debug_event));
#endif
if ((p_cb->state == BTA_HH_NULL_ST) || (p_cb->state >= BTA_HH_INVALID_ST))
{
- APPL_TRACE_ERROR2("bta_hh_sm_execute: Invalid state State = 0x%x, Event = %d",
+ APPL_TRACE_ERROR("bta_hh_sm_execute: Invalid state State = 0x%x, Event = %d",
p_cb->state,event);
return;
}
@@ -400,7 +400,7 @@
#if BTA_HH_DEBUG == TRUE
if (in_state != p_cb->state)
{
- APPL_TRACE_DEBUG3("HH State Change: [%s] -> [%s] after Event [%s]",
+ APPL_TRACE_DEBUG("HH State Change: [%s] -> [%s] after Event [%s]",
bta_hh_state_code(in_state),
bta_hh_state_code(p_cb->state),
bta_hh_evt_code(debug_event));
@@ -481,7 +481,7 @@
p_cb = &bta_hh_cb.kdev[index];
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG2("bta_hh_hdl_event:: handle = %d dev_cb[%d] ", p_msg->layer_specific, index);
+ APPL_TRACE_DEBUG("bta_hh_hdl_event:: handle = %d dev_cb[%d] ", p_msg->layer_specific, index);
#endif
bta_hh_sm_execute(p_cb, p_msg->event, (tBTA_HH_DATA *) p_msg);
}
diff --git a/bta/hh/bta_hh_utils.c b/bta/hh/bta_hh_utils.c
index 629281b..dc20a0d 100644
--- a/bta/hh/bta_hh_utils.c
+++ b/bta/hh/bta_hh_utils.c
@@ -72,14 +72,14 @@
bdcmp(bda, bd_addr_null) != 0) )
{
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG2("found kdev_cb[%d] hid_handle = %d ", xx,
+ APPL_TRACE_DEBUG("found kdev_cb[%d] hid_handle = %d ", xx,
bta_hh_cb.kdev[xx].hid_handle)
#endif
return xx;
}
#if BTA_HH_DEBUG
else
- APPL_TRACE_DEBUG4("in_use ? [%d] kdev[%d].hid_handle = %d state = [%d]",
+ APPL_TRACE_DEBUG("in_use ? [%d] kdev[%d].hid_handle = %d state = [%d]",
bta_hh_cb.kdev[xx].in_use, xx,
bta_hh_cb.kdev[xx].hid_handle,
bta_hh_cb.kdev[xx].state);
@@ -97,7 +97,7 @@
}
/* If device list full, report BTA_HH_IDX_INVALID */
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG2("bta_hh_find_cb:: index = %d while max = %d",
+ APPL_TRACE_DEBUG("bta_hh_find_cb:: index = %d while max = %d",
xx, BTA_HH_MAX_DEVICE);
#endif
@@ -157,7 +157,7 @@
UINT16 version, UINT8 flag)
{
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG3("vendor_id = 0x%2x product_id = 0x%2x version = 0x%2x",
+ APPL_TRACE_DEBUG("vendor_id = 0x%2x product_id = 0x%2x version = 0x%2x",
vendor_id, product_id, version);
#endif
p_cb->dscp_info.vendor_id = vendor_id;
@@ -187,7 +187,7 @@
UINT8 app_id)
{
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("subclass = 0x%2x", sub_class);
+ APPL_TRACE_DEBUG("subclass = 0x%2x", sub_class);
#endif
p_cb->hid_handle = handle;
@@ -237,13 +237,13 @@
{
p_cb->app_id = p_bta_hh_cfg->p_devt_list[xx].app_id;
#if BTA_HH_DEBUG
- APPL_TRACE_EVENT1("bta_hh_tod_spt sub_class:0x%x supported", sub_class);
+ APPL_TRACE_EVENT("bta_hh_tod_spt sub_class:0x%x supported", sub_class);
#endif
return TRUE;
}
}
#if BTA_HH_DEBUG
- APPL_TRACE_EVENT1("bta_hh_tod_spt sub_class:0x%x NOT supported", sub_class);
+ APPL_TRACE_EVENT("bta_hh_tod_spt sub_class:0x%x NOT supported", sub_class);
#endif
return FALSE;
}
@@ -269,7 +269,7 @@
UINT8 this_report[BTA_HH_MAX_RPT_CHARS];
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG2("bta_hh_parse_keybd_rpt: (report=%p, report_len=%d) called",
+ APPL_TRACE_DEBUG("bta_hh_parse_keybd_rpt: (report=%p, report_len=%d) called",
p_report, report_len);
#endif
@@ -291,7 +291,7 @@
{
if (ctl_shift & bta_hh_mod_key_mask[xx])
{
- APPL_TRACE_DEBUG1("Mod Key[%02x] pressed", bta_hh_mod_key_mask[xx] );
+ APPL_TRACE_DEBUG("Mod Key[%02x] pressed", bta_hh_mod_key_mask[xx] );
p_kb->mod_key[xx] = TRUE;
}
else if (p_kb->mod_key[xx])
@@ -321,7 +321,7 @@
for (xx = 0; xx < report_len; xx++)
{
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("this_char = %02x", this_report[xx]);
+ APPL_TRACE_DEBUG("this_char = %02x", this_report[xx]);
#endif
if ((this_char = this_report[xx]) == 0)
continue;
@@ -334,7 +334,7 @@
p_data->this_char[key_idx ++] = this_char;
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("found keycode %02x ", this_report[xx]);
+ APPL_TRACE_DEBUG("found keycode %02x ", this_report[xx]);
#endif
p_data->caps_lock = p_kb->caps_lock;
p_data->num_lock = p_kb->num_lock;
@@ -362,7 +362,7 @@
#if BTA_HH_DEBUG
UINT8 xx;
- APPL_TRACE_DEBUG2("bta_hh_parse_mice_rpt: bta_keybd_rpt_rcvd(report=%p, \
+ APPL_TRACE_DEBUG("bta_hh_parse_mice_rpt: bta_keybd_rpt_rcvd(report=%p, \
report_len=%d) called", p_report, report_len);
#endif
@@ -375,7 +375,7 @@
#if BTA_HH_DEBUG
for (xx = 0; xx < report_len; xx++)
{
- APPL_TRACE_DEBUG1("this_char = %02x", p_report[xx]);
+ APPL_TRACE_DEBUG("this_char = %02x", p_report[xx]);
}
#endif
@@ -389,8 +389,8 @@
p_data->delta_y = p_report[2];
#if BTA_HH_DEBUG
- APPL_TRACE_DEBUG1("mice button: 0x%2x", p_data->mouse_button);
- APPL_TRACE_DEBUG2("mice move: x = %d y = %d", p_data->delta_x,
+ APPL_TRACE_DEBUG("mice button: 0x%2x", p_data->mouse_button);
+ APPL_TRACE_DEBUG("mice move: x = %d y = %d", p_data->delta_x,
p_data->delta_y );
#endif
@@ -496,7 +496,7 @@
if (BTA_HH_IS_LE_DEV_HDL_VALID(dev_handle))
index = bta_hh_cb.le_cb_index[BTA_HH_GET_LE_CB_IDX(dev_handle)];
#if BTA_HH_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hh_dev_handle_to_cb_idx dev_handle = %d index = %d", dev_handle, index);
+ APPL_TRACE_DEBUG("bta_hh_dev_handle_to_cb_idx dev_handle = %d index = %d", dev_handle, index);
#endif
}
else
@@ -522,18 +522,18 @@
{
UINT8 xx;
- APPL_TRACE_DEBUG0("bta_hh_trace_dev_db:: Device DB list********************");
+ APPL_TRACE_DEBUG("bta_hh_trace_dev_db:: Device DB list********************");
for (xx = 0; xx < BTA_HH_MAX_DEVICE; xx++)
{
- APPL_TRACE_DEBUG3("kdev[%d] in_use[%d] handle[%d] ",xx,
+ APPL_TRACE_DEBUG("kdev[%d] in_use[%d] handle[%d] ",xx,
bta_hh_cb.kdev[xx].in_use, bta_hh_cb.kdev[xx].hid_handle);
- APPL_TRACE_DEBUG4("\t\t\t attr_mask[%04x] state [%d] sub_class[%02x] index = %d",
+ APPL_TRACE_DEBUG("\t\t\t attr_mask[%04x] state [%d] sub_class[%02x] index = %d",
bta_hh_cb.kdev[xx].attr_mask, bta_hh_cb.kdev[xx].state,
bta_hh_cb.kdev[xx].sub_class, bta_hh_cb.kdev[xx].index);
}
- APPL_TRACE_DEBUG0("*********************************************************");
+ APPL_TRACE_DEBUG("*********************************************************");
}
#endif
#endif /* HL_INCLUDED */
diff --git a/bta/hl/bta_hl_act.c b/bta/hl/bta_hl_act.c
index 01528aa..b4c65c3 100644
--- a/bta/hl/bta_hl_act.c
+++ b/bta/hl/bta_hl_act.c
@@ -91,7 +91,7 @@
tBTA_HL evt_data;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG2("bta_hl_dch_mca_cong_change mdl_id=%d cong=%d",
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_cong_change mdl_id=%d cong=%d",
p_cong_chg->mdl_id,
p_cong_chg->cong);
#endif
@@ -124,7 +124,7 @@
UNUSED(p_data);
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_echo_test");
+ APPL_TRACE_DEBUG("bta_hl_dch_echo_test");
#endif
p_dcb->echo_oper = BTA_HL_ECHO_OP_CI_GET_ECHO_DATA;
@@ -152,7 +152,7 @@
tBTA_HL_MDL_CB *p_dcb = BTA_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_sdp_init");
+ APPL_TRACE_DEBUG("bta_hl_dch_sdp_init");
#endif
if ( p_mcb->sdp_oper == BTA_HL_SDP_OP_NONE)
{
@@ -169,14 +169,14 @@
if (bta_hl_init_sdp(p_mcb->sdp_oper, app_idx, mcl_idx, mdl_idx) != BTA_HL_STATUS_OK)
{
- APPL_TRACE_ERROR0("SDP INIT failed");
+ APPL_TRACE_ERROR("SDP INIT failed");
p_mcb->sdp_oper = BTA_HL_SDP_OP_NONE;
bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_SDP_FAIL_EVT, p_data);
}
}
else
{
- APPL_TRACE_ERROR0("SDP in use");
+ APPL_TRACE_ERROR("SDP in use");
bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_SDP_FAIL_EVT, p_data);
}
}
@@ -197,7 +197,7 @@
tBTA_HL_MDL_CB *p_dcb = BTA_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_close_echo_test");
+ APPL_TRACE_DEBUG("bta_hl_dch_close_echo_test");
#endif
switch (p_dcb->echo_oper)
@@ -238,7 +238,7 @@
tBTA_HL_MDL_CB *p_dcb = BTA_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_rcv_data");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_rcv_data");
#endif
if (p_dcb->local_mdep_id == BTA_HL_ECHO_TEST_MDEP_ID)
@@ -266,7 +266,7 @@
BTA_HL_CI_PUT_ECHO_DATA_EVT);
break;
default:
- APPL_TRACE_ERROR1("Unknonw echo_oper=%d",p_dcb->echo_oper);
+ APPL_TRACE_ERROR("Unknonw echo_oper=%d",p_dcb->echo_oper);
break;
}
@@ -302,7 +302,7 @@
tBTA_HL_MDL_CB *p_dcb = BTA_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_ci_put_echo_data");
+ APPL_TRACE_DEBUG("bta_hl_dch_ci_put_echo_data");
#endif
p_dcb->cout_oper &= ~BTA_HL_CO_PUT_ECHO_DATA_MASK;
@@ -332,7 +332,7 @@
tBTA_HL_STATUS status;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_ci_get_echo_data");
+ APPL_TRACE_DEBUG("bta_hl_dch_ci_get_echo_data");
#endif
p_dcb->cout_oper &= ~BTA_HL_CO_GET_ECHO_DATA_MASK;
@@ -376,7 +376,7 @@
tBTA_HL evt_data;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_ci_put_rx_data");
+ APPL_TRACE_DEBUG("bta_hl_dch_ci_put_rx_data");
#endif
p_dcb->cout_oper &= ~BTA_HL_CO_PUT_RX_DATA_MASK;
@@ -422,7 +422,7 @@
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_ci_get_tx_data");
+ APPL_TRACE_DEBUG("bta_hl_dch_ci_get_tx_data");
#endif
p_dcb->cout_oper &= ~BTA_HL_CO_GET_TX_DATA_MASK;
@@ -495,7 +495,7 @@
BOOLEAN success = TRUE;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_send_data");
+ APPL_TRACE_DEBUG("bta_hl_dch_send_data");
#endif
if (!(p_dcb->cout_oper & BTA_HL_CO_GET_TX_DATA_MASK))
@@ -552,9 +552,9 @@
#if (BTA_HL_DEBUG == TRUE)
#if (BT_TRACE_VERBOSE == TRUE)
- APPL_TRACE_DEBUG1("bta_hl_dch_close_cmpl dch oper=%s", bta_hl_dch_oper_code(p_dcb->dch_oper));
+ APPL_TRACE_DEBUG("bta_hl_dch_close_cmpl dch oper=%s", bta_hl_dch_oper_code(p_dcb->dch_oper));
#else
- APPL_TRACE_DEBUG1("bta_hl_dch_close_cmpl dch oper=%d", p_dcb->dch_oper);
+ APPL_TRACE_DEBUG("bta_hl_dch_close_cmpl dch oper=%d", p_dcb->dch_oper);
#endif
#endif
@@ -653,9 +653,9 @@
default:
#if (BTA_HL_DEBUG == TRUE)
#if (BT_TRACE_VERBOSE == TRUE)
- APPL_TRACE_ERROR1("DCH operation not found oper=%s", bta_hl_dch_oper_code(p_dcb->dch_oper));
+ APPL_TRACE_ERROR("DCH operation not found oper=%s", bta_hl_dch_oper_code(p_dcb->dch_oper));
#else
- APPL_TRACE_ERROR1("DCH operation not found oper=%d", p_dcb->dch_oper);
+ APPL_TRACE_ERROR("DCH operation not found oper=%d", p_dcb->dch_oper);
#endif
#endif
send_evt=FALSE;
@@ -684,7 +684,7 @@
case BTA_HL_ECHO_OP_ECHO_PKT:
break;
default:
- APPL_TRACE_ERROR1("Invalid echo_oper=%d", p_dcb->echo_oper);
+ APPL_TRACE_ERROR("Invalid echo_oper=%d", p_dcb->echo_oper);
break;
}
}
@@ -712,9 +712,9 @@
{
#if (BTA_HL_DEBUG == TRUE)
#if (BT_TRACE_VERBOSE == TRUE)
- APPL_TRACE_DEBUG1("Send Event: %s", bta_hl_cback_evt_code(event));
+ APPL_TRACE_DEBUG("Send Event: %s", bta_hl_cback_evt_code(event));
#else
- APPL_TRACE_DEBUG1("Send Event: 0x%02x", event);
+ APPL_TRACE_DEBUG("Send Event: 0x%02x", event);
#endif
#endif
p_acb->p_cback(event,(tBTA_HL *) &evt_data );
@@ -739,9 +739,9 @@
#if (BTA_HL_DEBUG == TRUE)
#if (BT_TRACE_VERBOSE == TRUE)
- APPL_TRACE_DEBUG1("bta_hl_dch_mca_close_ind dch oper=%s", bta_hl_dch_oper_code(p_dcb->dch_oper));
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_close_ind dch oper=%s", bta_hl_dch_oper_code(p_dcb->dch_oper));
#else
- APPL_TRACE_DEBUG1("bta_hl_dch_mca_close_ind dch oper=%d", p_dcb->dch_oper);
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_close_ind dch oper=%d", p_dcb->dch_oper);
#endif
#endif
@@ -783,9 +783,9 @@
#if (BTA_HL_DEBUG == TRUE)
#if (BT_TRACE_VERBOSE == TRUE)
- APPL_TRACE_DEBUG1("bta_hl_dch_mca_close_cfm dch_oper=%s", bta_hl_dch_oper_code(p_dcb->dch_oper) );
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_close_cfm dch_oper=%s", bta_hl_dch_oper_code(p_dcb->dch_oper) );
#else
- APPL_TRACE_DEBUG1("bta_hl_dch_mca_close_cfm dch_oper=%d", p_dcb->dch_oper);
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_close_cfm dch_oper=%d", p_dcb->dch_oper);
#endif
#endif
@@ -803,9 +803,9 @@
default:
#if (BTA_HL_DEBUG == TRUE)
#if (BT_TRACE_VERBOSE == TRUE)
- APPL_TRACE_ERROR1("Invalid dch_oper=%s for close cfm", bta_hl_dch_oper_code(p_dcb->dch_oper) );
+ APPL_TRACE_ERROR("Invalid dch_oper=%s for close cfm", bta_hl_dch_oper_code(p_dcb->dch_oper) );
#else
- APPL_TRACE_ERROR1("Invalid dch_oper=%d for close cfm", p_dcb->dch_oper);
+ APPL_TRACE_ERROR("Invalid dch_oper=%d for close cfm", p_dcb->dch_oper);
#endif
#endif
break;
@@ -832,7 +832,7 @@
tBTA_HL evt_data;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_close");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_close");
#endif
if (!p_dcb->cout_oper)
{
@@ -887,7 +887,7 @@
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_open_ind");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_open_ind");
#endif
if ((p_dcb->dch_oper == BTA_HL_DCH_OP_REMOTE_OPEN) ||
(p_dcb->dch_oper == BTA_HL_DCH_OP_REMOTE_RECONNECT) )
@@ -957,7 +957,7 @@
}
else
{
- APPL_TRACE_ERROR0("Unabel to close DCH for reconnect cfg mismatch");
+ APPL_TRACE_ERROR("Unabel to close DCH for reconnect cfg mismatch");
}
}
break;
@@ -995,7 +995,7 @@
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_open_cfm");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_open_cfm");
#endif
if ((p_dcb->dch_oper == BTA_HL_DCH_OP_LOCAL_OPEN) ||
(p_dcb->dch_oper == BTA_HL_DCH_OP_LOCAL_RECONNECT))
@@ -1034,7 +1034,7 @@
}
else
{
- APPL_TRACE_ERROR1("Error dch oper =%d", p_dcb->dch_oper);
+ APPL_TRACE_ERROR("Error dch oper =%d", p_dcb->dch_oper);
return;
}
@@ -1079,7 +1079,7 @@
}
else
{
- APPL_TRACE_ERROR0("Unabel to close DCH for reconnect cfg mismatch");
+ APPL_TRACE_ERROR("Unabel to close DCH for reconnect cfg mismatch");
}
}
break;
@@ -1108,7 +1108,7 @@
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_abort_ind");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_abort_ind");
#endif
p_dcb->abort_oper |= BTA_HL_ABORT_REMOTE_MASK;
@@ -1133,7 +1133,7 @@
tBTA_HL evt_data;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_abort_cfm");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_abort_cfm");
#endif
if (p_dcb->abort_oper)
@@ -1156,7 +1156,7 @@
}
else
{
- APPL_TRACE_ERROR0("Not expecting Abort CFM ");
+ APPL_TRACE_ERROR("Not expecting Abort CFM ");
}
}
@@ -1216,7 +1216,7 @@
}
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG1("bta_hl_dch_mca_abort abort_oper=0x%x", p_dcb->abort_oper);
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_abort abort_oper=0x%x", p_dcb->abort_oper);
#endif
}
@@ -1242,7 +1242,7 @@
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG1("bta_hl_dch_mca_reconnect_ind mdl_id=%d", p_reconnect_ind->mdl_id);
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_reconnect_ind mdl_id=%d", p_reconnect_ind->mdl_id);
#endif
if (bta_hl_find_mdl_cfg_idx(app_idx, mcl_idx, p_reconnect_ind->mdl_id, &mdl_cfg_idx))
@@ -1313,7 +1313,7 @@
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_reconnect_cfm");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_reconnect_cfm");
#endif
if (p_dcb->abort_oper & BTA_HL_ABORT_PENDING_MASK)
{
@@ -1362,7 +1362,7 @@
UINT8 sdp_idx;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_reconnect");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_reconnect");
#endif
if (bta_hl_find_sdp_idx_using_ctrl_psm(&p_mcb->sdp, p_mcb->ctrl_psm, &sdp_idx))
{
@@ -1401,7 +1401,7 @@
UINT8 mca_rsp_code = MCA_RSP_SUCCESS;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_create_rsp");
+ APPL_TRACE_DEBUG("bta_hl_dch_create_rsp");
#endif
if (p_create_rsp->rsp_code == BTA_HL_DCH_CREATE_RSP_SUCCESS)
{
@@ -1452,7 +1452,7 @@
tBTA_HL_ECHO_CFG *p_echo_cfg;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_create_ind");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_create_ind");
#endif
if (bta_hl_find_mdep_cfg_idx(app_idx, p_create_ind->dep_id, &mdep_cfg_idx))
@@ -1551,7 +1551,7 @@
tMCA_CREATE_CFM *p_create_cfm = &p_data->mca_evt.mca_data.create_cfm;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_create_cfm");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_create_cfm");
#endif
if (p_dcb->abort_oper & BTA_HL_ABORT_PENDING_MASK)
@@ -1572,7 +1572,7 @@
if (MCA_DataChnlCfg((tMCA_CL) p_mcb->mcl_handle, &p_dcb->chnl_cfg)!= MCA_SUCCESS)
{
/* this should not happen */
- APPL_TRACE_ERROR0("Unable to create data channel");
+ APPL_TRACE_ERROR("Unable to create data channel");
MCA_Abort((tMCA_CL) p_mcb->mcl_handle);
bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_CLOSE_CMPL_EVT, p_data);
}
@@ -1592,7 +1592,7 @@
}
else
{
- APPL_TRACE_ERROR0("MCA Create- failed");
+ APPL_TRACE_ERROR("MCA Create- failed");
bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_CLOSE_CMPL_EVT, p_data);
}
}
@@ -1616,7 +1616,7 @@
UINT8 sdp_idx;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG0("bta_hl_dch_mca_create");
+ APPL_TRACE_DEBUG("bta_hl_dch_mca_create");
#endif
if (bta_hl_find_sdp_idx_using_ctrl_psm(&p_mcb->sdp, p_mcb->ctrl_psm, &sdp_idx) &&
@@ -1635,13 +1635,13 @@
p_dcb->local_cfg,
NULL )) != MCA_SUCCESS)
{
- APPL_TRACE_ERROR1("MCA_CreateMdl FAIL mca_result=%d", result);
+ APPL_TRACE_ERROR("MCA_CreateMdl FAIL mca_result=%d", result);
bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_CLOSE_CMPL_EVT, p_data);
}
}
else
{
- APPL_TRACE_ERROR0("MCA Create- SDP idx or peer MDEP cfg not found");
+ APPL_TRACE_ERROR("MCA Create- SDP idx or peer MDEP cfg not found");
bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_CLOSE_CMPL_EVT, p_data);
}
}
@@ -1660,7 +1660,7 @@
{
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_dch_sdp_fail");
+ APPL_TRACE_DEBUG("bta_hl_dch_sdp_fail");
#endif
bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_CLOSE_CMPL_EVT, p_data);
}
@@ -1698,7 +1698,7 @@
UINT16 name_len;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG5("bta_hl_sdp_cback status:%d sdp_oper=%d app_idx=%d, mcl_idx=%d, mdl_idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_sdp_cback status:%d sdp_oper=%d app_idx=%d, mcl_idx=%d, mdl_idx=%d",
status, sdp_oper, app_idx, mcl_idx, mdl_idx);
#endif
@@ -1726,7 +1726,7 @@
}
else
{
- APPL_TRACE_WARNING0("Control PSM not found");
+ APPL_TRACE_WARNING("Control PSM not found");
break;
}
if (SDP_FindAddProtoListsElemInRec(p_rec, UUID_PROTOCOL_L2CAP, &pe))
@@ -1735,7 +1735,7 @@
}
else
{
- APPL_TRACE_WARNING0("Data PSM not found");
+ APPL_TRACE_WARNING("Data PSM not found");
break;
}
@@ -1776,7 +1776,7 @@
}
else
{
- APPL_TRACE_WARNING0("MCAP SUP PROC not found");
+ APPL_TRACE_WARNING("MCAP SUP PROC not found");
break;
}
@@ -1785,7 +1785,7 @@
if (bta_hl_fill_sup_feature_list (p_attr, &sup_feature))
{
p_hdp_rec->num_mdeps = (UINT8) sup_feature.num_elems;
- APPL_TRACE_WARNING1("bta_hl_sdp_cback num_mdeps %d",sup_feature.num_elems);
+ APPL_TRACE_WARNING("bta_hl_sdp_cback num_mdeps %d",sup_feature.num_elems);
for (i=0; i<sup_feature.num_elems; i++)
{
p_hdp_rec->mdep_cfg[i].data_type = sup_feature.list_elem[i].data_type;
@@ -1801,7 +1801,7 @@
}
else
{
- APPL_TRACE_ERROR1("bta_hl_sdp_cback Incorrect Mdep[%d] Description (Null ptr)", i);
+ APPL_TRACE_ERROR("bta_hl_sdp_cback Incorrect Mdep[%d] Description (Null ptr)", i);
}
}
@@ -1809,39 +1809,39 @@
}
else
{
- APPL_TRACE_WARNING0("HDP supported feature list fill failed");
+ APPL_TRACE_WARNING("HDP supported feature list fill failed");
break;
}
}
else
{
- APPL_TRACE_WARNING0("HDP supported feature list not found");
+ APPL_TRACE_WARNING("HDP supported feature list not found");
break;
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG3("record=%d ctrl_psm=%0x data_psm=%x",
+ APPL_TRACE_DEBUG("record=%d ctrl_psm=%0x data_psm=%x",
rec_cnt+1,
p_hdp_rec->ctrl_psm,
p_hdp_rec->data_psm );
- APPL_TRACE_DEBUG1("srv_name=[%s]",(p_hdp_rec->srv_name[0] != '\0')? p_hdp_rec->srv_name:"NULL");
- APPL_TRACE_DEBUG1("srv_desp=[%s]",(p_hdp_rec->srv_desp[0] != '\0')? p_hdp_rec->srv_desp:"NULL");
+ APPL_TRACE_DEBUG("srv_name=[%s]",(p_hdp_rec->srv_name[0] != '\0')? p_hdp_rec->srv_name:"NULL");
+ APPL_TRACE_DEBUG("srv_desp=[%s]",(p_hdp_rec->srv_desp[0] != '\0')? p_hdp_rec->srv_desp:"NULL");
for (i=0; i<sup_feature.num_elems; i++)
{
- APPL_TRACE_DEBUG5("index=0x%02x mdep_id=0x%04x data type=0x%04x mdep role=%s(0x%02x)",
+ APPL_TRACE_DEBUG("index=0x%02x mdep_id=0x%04x data type=0x%04x mdep role=%s(0x%02x)",
(i+1),
p_hdp_rec->mdep_cfg[i].mdep_id,
p_hdp_rec->mdep_cfg[i].data_type,
(p_hdp_rec->mdep_cfg[i].mdep_role == BTA_HL_MDEP_ROLE_SOURCE)?"Src":"Snk",
p_hdp_rec->mdep_cfg[i].mdep_role);
}
- APPL_TRACE_DEBUG1("provider_name=[%s]",(p_hdp_rec->provider_name[0] != '\0')? p_hdp_rec->provider_name:"NULL");
- APPL_TRACE_DEBUG1("found MCAP sup procedure=%d",
+ APPL_TRACE_DEBUG("provider_name=[%s]",(p_hdp_rec->provider_name[0] != '\0')? p_hdp_rec->provider_name:"NULL");
+ APPL_TRACE_DEBUG("found MCAP sup procedure=%d",
p_cb->sdp.sdp_rec[rec_cnt].mcap_sup_proc );
#endif
rec_cnt++;
if (rec_cnt >= BTA_HL_NUM_SDP_RECS)
{
- APPL_TRACE_WARNING1("No more spaces for SDP recs max_rec_cnt=%d", BTA_HL_NUM_SDP_RECS);
+ APPL_TRACE_WARNING("No more spaces for SDP recs max_rec_cnt=%d", BTA_HL_NUM_SDP_RECS);
break;
}
@@ -1860,7 +1860,7 @@
}
else
{
- APPL_TRACE_WARNING3("SDP Failed sdp_status=%d num_recs=%d sdp_parsing_ok=%d ",
+ APPL_TRACE_WARNING("SDP Failed sdp_status=%d num_recs=%d sdp_parsing_ok=%d ",
status, p_cb->sdp.num_recs,sdp_parsing_ok );
}
@@ -2113,7 +2113,7 @@
memset(p_spd_cb, 0, sizeof(tBTA_HL_SDP_CB));
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_deallocate_spd_cback index=%d", sdp_cback_idx);
+ APPL_TRACE_DEBUG("bta_hl_deallocate_spd_cback index=%d", sdp_cback_idx);
#endif
@@ -2155,13 +2155,13 @@
if (i == BTA_HL_NUM_SDP_CBACKS)
{
- APPL_TRACE_WARNING0("No scb is available to allocate")
+ APPL_TRACE_WARNING("No scb is available to allocate")
}
else
{
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_allocate_spd_cback cback_idx=%d ",i );
- APPL_TRACE_DEBUG4("sdp_oper=%d, app_idx=%d, mcl_idx=%d, mdl_idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_allocate_spd_cback cback_idx=%d ",i );
+ APPL_TRACE_DEBUG("sdp_oper=%d, app_idx=%d, mcl_idx=%d, mdl_idx=%d",
bta_hl_cb.scb[i].sdp_oper,
bta_hl_cb.scb[i].app_idx,
bta_hl_cb.scb[i].mcl_idx,
@@ -2191,7 +2191,7 @@
tBTA_HL_STATUS status;
UINT8 sdp_cback_idx;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG4("bta_hl_init_sdp sdp_oper=%d app_idx=%d mcl_idx=%d, mdl_idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_init_sdp sdp_oper=%d app_idx=%d mcl_idx=%d, mdl_idx=%d",
sdp_oper, app_idx, mcl_idx, mdl_idx);
#endif
if ((p_cb->sdp_cback = bta_hl_allocate_spd_cback(sdp_oper, app_idx, mcl_idx, mdl_idx, &sdp_cback_idx)) != NULL)
@@ -2260,7 +2260,7 @@
{
tBTA_HL_MCL_CB *p_cb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG0("bta_hl_cch_init_sdp");
+ APPL_TRACE_DEBUG("bta_hl_cch_init_sdp");
#endif
if ( p_cb->sdp_oper == BTA_HL_SDP_OP_NONE)
{
@@ -2275,7 +2275,7 @@
}
else
{
- APPL_TRACE_ERROR0("SDP in use");
+ APPL_TRACE_ERROR("SDP in use");
bta_hl_cch_sm_execute(app_idx, mcl_idx, BTA_HL_CCH_SDP_FAIL_EVT, p_data);
}
}
@@ -2296,7 +2296,7 @@
UINT8 sdp_idx;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG0("bta_hl_cch_mca_open");
+ APPL_TRACE_DEBUG("bta_hl_cch_mca_open");
#endif
if (bta_hl_find_sdp_idx_using_ctrl_psm(&p_mcb->sdp, p_mcb->req_ctrl_psm, &sdp_idx))
@@ -2332,7 +2332,7 @@
tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_cch_mca_close mcl_handle=%d", p_mcb->mcl_handle);
+ APPL_TRACE_DEBUG("bta_hl_cch_mca_close mcl_handle=%d", p_mcb->mcl_handle);
#endif
if (p_mcb->sdp_oper != BTA_HL_SDP_OP_CCH_INIT)
{
@@ -2346,13 +2346,13 @@
else
{
p_mcb->close_pending = TRUE;
- APPL_TRACE_DEBUG0("No valid mcl_handle to stop the CCH setup now so wait until CCH is up then close it" );
+ APPL_TRACE_DEBUG("No valid mcl_handle to stop the CCH setup now so wait until CCH is up then close it" );
}
}
else
{
p_mcb->close_pending = TRUE;
- APPL_TRACE_DEBUG0("can not stop the CCH setup becasue SDP is in progress so wait until it is done" );
+ APPL_TRACE_DEBUG("can not stop the CCH setup becasue SDP is in progress so wait until it is done" );
}
}
@@ -2374,14 +2374,14 @@
tBTA_HL_EVT event;
BOOLEAN send_evt=TRUE;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG0("bta_hl_cch_close_cmpl");
+ APPL_TRACE_DEBUG("bta_hl_cch_close_cmpl");
#endif
bta_sys_conn_close(BTA_ID_HL, p_acb->app_id, p_mcb->bd_addr);
if (p_mcb->cch_oper == BTA_HL_CCH_OP_LOCAL_CLOSE && p_mcb->force_close_local_cch_opening)
{
p_mcb->cch_oper = BTA_HL_CCH_OP_LOCAL_OPEN;
- APPL_TRACE_DEBUG0("change cch_oper from BTA_HL_CCH_OP_LOCAL_CLOSE to BTA_HL_CCH_OP_LOCAL_OPEN");
+ APPL_TRACE_DEBUG("change cch_oper from BTA_HL_CCH_OP_LOCAL_CLOSE to BTA_HL_CCH_OP_LOCAL_OPEN");
}
switch (p_mcb->cch_oper)
@@ -2435,7 +2435,7 @@
tBTA_HL_MDL_CB *p_dcb;
UINT8 i;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG0("bta_hl_cch_mca_disconnect");
+ APPL_TRACE_DEBUG("bta_hl_cch_mca_disconnect");
#endif
p_mcb->intentional_close = FALSE;
@@ -2476,7 +2476,7 @@
tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hl_cch_mca_disc_open mcl_handle=0x%x close_pending=%d", p_data->mca_evt.mcl_handle, p_mcb->close_pending );
+ APPL_TRACE_DEBUG("bta_hl_cch_mca_disc_open mcl_handle=0x%x close_pending=%d", p_data->mca_evt.mcl_handle, p_mcb->close_pending );
#endif
p_mcb->close_pending = FALSE;
@@ -2498,7 +2498,7 @@
tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG0("bta_hl_cch_mca_rsp_tout");
+ APPL_TRACE_DEBUG("bta_hl_cch_mca_rsp_tout");
#endif
p_mcb->rsp_tout = TRUE;
@@ -2524,7 +2524,7 @@
BOOLEAN send_event=TRUE;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_cch_mca_connect mcl_handle=%d ", p_data->mca_evt.mcl_handle);
+ APPL_TRACE_DEBUG("bta_hl_cch_mca_connect mcl_handle=%d ", p_data->mca_evt.mcl_handle);
#endif
p_mcb->mcl_handle = p_data->mca_evt.mcl_handle;
@@ -2574,9 +2574,9 @@
#if (BTA_HL_DEBUG == TRUE)
#if (BT_TRACE_VERBOSE == TRUE)
- APPL_TRACE_EVENT1("bta_hl_mcap_ctrl_cback event[%s]",bta_hl_mcap_evt_code(event));
+ APPL_TRACE_EVENT("bta_hl_mcap_ctrl_cback event[%s]",bta_hl_mcap_evt_code(event));
#else
- APPL_TRACE_EVENT1("bta_hl_mcap_ctrl_cback event[0x%02x]", event);
+ APPL_TRACE_EVENT("bta_hl_mcap_ctrl_cback event[0x%02x]", event);
#endif
#endif
diff --git a/bta/hl/bta_hl_api.c b/bta/hl/bta_hl_api.c
index 53b822d..86cb17f 100644
--- a/bta/hl/bta_hl_api.c
+++ b/bta/hl/bta_hl_api.c
@@ -114,7 +114,7 @@
{
tBTA_HL_API_UPDATE *p_buf;
- APPL_TRACE_DEBUG0("BTA_HlUpdate");
+ APPL_TRACE_DEBUG("BTA_HlUpdate");
if (is_register)
{
diff --git a/bta/hl/bta_hl_ci.c b/bta/hl/bta_hl_ci.c
index bd04b44..e4749d7 100644
--- a/bta/hl/bta_hl_ci.c
+++ b/bta/hl/bta_hl_ci.c
@@ -51,7 +51,7 @@
tBTA_HL_CI_GET_PUT_DATA *p_evt;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("bta_hl_ci_get_tx_data mdl_handle=%d status=%d evt=%d\n",
+ APPL_TRACE_DEBUG("bta_hl_ci_get_tx_data mdl_handle=%d status=%d evt=%d\n",
mdl_handle, status, evt);
#endif
@@ -85,7 +85,7 @@
{
tBTA_HL_CI_GET_PUT_DATA *p_evt;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("bta_hl_ci_put_rx_data mdl_handle=%d status=%d evt=%d\n",
+ APPL_TRACE_DEBUG("bta_hl_ci_put_rx_data mdl_handle=%d status=%d evt=%d\n",
mdl_handle, status, evt);
#endif
@@ -121,7 +121,7 @@
tBTA_HL_CI_ECHO_DATA *p_evt;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("bta_hl_ci_get_echo_data mcl_handle=%d status=%d evt=%d\n",
+ APPL_TRACE_DEBUG("bta_hl_ci_get_echo_data mcl_handle=%d status=%d evt=%d\n",
mcl_handle, status, evt);
#endif
@@ -156,7 +156,7 @@
tBTA_HL_CI_ECHO_DATA *p_evt;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG3("bta_hl_ci_put_echo_data mcl_handle=%d status=%d evt=%d\n",
+ APPL_TRACE_DEBUG("bta_hl_ci_put_echo_data mcl_handle=%d status=%d evt=%d\n",
mcl_handle, status, evt);
#endif
diff --git a/bta/hl/bta_hl_main.c b/bta/hl/bta_hl_main.c
index 7b15585..7f08752 100644
--- a/bta/hl/bta_hl_main.c
+++ b/bta/hl/bta_hl_main.c
@@ -426,7 +426,7 @@
#if (BTA_HL_DEBUG == TRUE) && (BT_USE_TRACES == TRUE)
tBTA_HL_CCH_STATE in_state = p_cb->cch_state;
UINT16 cur_evt = event;
- APPL_TRACE_DEBUG3("HDP CCH Event Handler: State 0x%02x [%s], Event [%s]", in_state,
+ APPL_TRACE_DEBUG("HDP CCH Event Handler: State 0x%02x [%s], Event [%s]", in_state,
bta_hl_cch_state_code(in_state),
bta_hl_evt_code(cur_evt));
#endif
@@ -455,7 +455,7 @@
#if (BTA_HL_DEBUG == TRUE) && (BT_USE_TRACES == TRUE)
if (in_state != p_cb->cch_state)
{
- APPL_TRACE_DEBUG3("HL CCH State Change: [%s] -> [%s] after [%s]",
+ APPL_TRACE_DEBUG("HL CCH State Change: [%s] -> [%s] after [%s]",
bta_hl_cch_state_code(in_state),
bta_hl_cch_state_code(p_cb->cch_state),
bta_hl_evt_code(cur_evt));
@@ -484,7 +484,7 @@
#if (BTA_HL_DEBUG == TRUE) && (BT_USE_TRACES == TRUE)
tBTA_HL_DCH_STATE in_state = p_cb->dch_state;
UINT16 cur_evt = event;
- APPL_TRACE_DEBUG3("HDP DCH Event Handler: State 0x%02x [%s], Event [%s]", in_state,
+ APPL_TRACE_DEBUG("HDP DCH Event Handler: State 0x%02x [%s], Event [%s]", in_state,
bta_hl_dch_state_code(in_state),
bta_hl_evt_code(cur_evt));
#endif
@@ -514,7 +514,7 @@
#if (BTA_HL_DEBUG == TRUE) && (BT_USE_TRACES == TRUE)
if (in_state != p_cb->dch_state)
{
- APPL_TRACE_DEBUG3("HL DCH State Change: [%s] -> [%s] after [%s]",
+ APPL_TRACE_DEBUG("HL DCH State Change: [%s] -> [%s] after [%s]",
bta_hl_dch_state_code(in_state),
bta_hl_dch_state_code(p_cb->dch_state),
bta_hl_evt_code(cur_evt));
@@ -537,7 +537,7 @@
/* If already enabled then reject this request */
if (p_cb->enable)
{
- APPL_TRACE_ERROR0("HL is already enabled");
+ APPL_TRACE_ERROR("HL is already enabled");
evt_data.enable_cfm.status = BTA_HL_STATUS_FAIL;
if (p_data->api_enable.p_cback)
p_data->api_enable.p_cback(BTA_HL_CTRL_ENABLE_CFM_EVT, (tBTA_HL_CTRL *) &evt_data);
@@ -584,7 +584,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_disable status =%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_disable status =%s", bta_hl_status_code(status));
}
#endif
@@ -606,14 +606,14 @@
tBTA_HL_STATUS status = BTA_HL_STATUS_FAIL;
- APPL_TRACE_DEBUG0("bta_hl_api_update");
+ APPL_TRACE_DEBUG("bta_hl_api_update");
if (p_cb->enable)
{
status = bta_hl_app_update(p_data->api_update.app_id, p_data->api_update.is_register);
if (!p_data->api_update.is_register)
{
- APPL_TRACE_DEBUG0("Deregister");
+ APPL_TRACE_DEBUG("Deregister");
memset(&evt_data, 0, sizeof(tBTA_HL));
evt_data.dereg_cfm.status = status;
evt_data.dereg_cfm.app_id = p_data->api_update.app_id;
@@ -640,7 +640,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_register status =%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_register status =%s", bta_hl_status_code(status));
}
#endif
@@ -730,7 +730,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_register status =%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_register status =%s", bta_hl_status_code(status));
}
#endif
@@ -782,7 +782,7 @@
}
else
{
- APPL_TRACE_ERROR1("Invalid app_handle=%d", p_data->api_dereg.app_handle);
+ APPL_TRACE_ERROR("Invalid app_handle=%d", p_data->api_dereg.app_handle);
}
}
@@ -827,7 +827,7 @@
{
/* Only one MCL per BD_ADDR */
status = BTA_HL_STATUS_DUPLICATE_CCH_OPEN;
- APPL_TRACE_DEBUG1("bta_hl_api_cch_open: CCH already open: status =%d",status)
+ APPL_TRACE_DEBUG("bta_hl_api_cch_open: CCH already open: status =%d",status)
p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
if (p_acb->p_cback)
@@ -841,7 +841,7 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_api_cch_open Null Callback");
+ APPL_TRACE_ERROR("bta_hl_api_cch_open Null Callback");
}
return;
}
@@ -853,7 +853,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_cch_open status =%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_cch_open status =%s", bta_hl_status_code(status));
}
#endif
switch (status)
@@ -876,11 +876,11 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_api_cch_open Null Callback");
+ APPL_TRACE_ERROR("bta_hl_api_cch_open Null Callback");
}
break;
default:
- APPL_TRACE_ERROR1("status code=%d", status);
+ APPL_TRACE_ERROR("status code=%d", status);
break;
}
}
@@ -915,7 +915,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_cch_close status =%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_cch_close status =%s", bta_hl_status_code(status));
}
#endif
switch (status)
@@ -936,12 +936,12 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_api_cch_close Null Callback");
+ APPL_TRACE_ERROR("bta_hl_api_cch_close Null Callback");
}
break;
default:
- APPL_TRACE_ERROR1("status code=%d", status);
+ APPL_TRACE_ERROR("status code=%d", status);
break;
}
@@ -974,7 +974,7 @@
p_acb = BTA_HL_GET_APP_CB_PTR(app_idx);
p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
- APPL_TRACE_DEBUG4("bta_hl_api_dch_open: app_ix=%d, mcl_idx=%d, cch_state=%d, mcl_handle=%d",app_idx,mcl_idx,p_mcb->cch_state,p_data->api_dch_open.mcl_handle);
+ APPL_TRACE_DEBUG("bta_hl_api_dch_open: app_ix=%d, mcl_idx=%d, cch_state=%d, mcl_handle=%d",app_idx,mcl_idx,p_mcb->cch_state,p_data->api_dch_open.mcl_handle);
if (p_mcb->cch_state == BTA_HL_CCH_OPEN_ST)
{
if (bta_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx))
@@ -1057,7 +1057,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_dch_open status =%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_dch_open status =%s", bta_hl_status_code(status));
}
#endif
switch (status)
@@ -1091,12 +1091,12 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_api_dch_open Null Callback");
+ APPL_TRACE_ERROR("bta_hl_api_dch_open Null Callback");
}
break;
default:
- APPL_TRACE_ERROR1("Status code=%d", status);
+ APPL_TRACE_ERROR("Status code=%d", status);
break;
}
@@ -1137,7 +1137,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_dch_close status =%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_dch_close status =%s", bta_hl_status_code(status));
}
#endif
@@ -1161,11 +1161,11 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_api_dch_close Null Callback");
+ APPL_TRACE_ERROR("bta_hl_api_dch_close Null Callback");
}
break;
default:
- APPL_TRACE_ERROR1("Status code=%d", status);
+ APPL_TRACE_ERROR("Status code=%d", status);
break;
}
}
@@ -1230,12 +1230,12 @@
if (p_mdep_cfg->mdep_role == BTA_HL_MDEP_ROLE_SINK)
{
p_dcb->peer_mdep_role = BTA_HL_MDEP_ROLE_SOURCE;
- APPL_TRACE_DEBUG0("peer mdep role = SOURCE ");
+ APPL_TRACE_DEBUG("peer mdep role = SOURCE ");
}
else
{
p_dcb->peer_mdep_role = BTA_HL_MDEP_ROLE_SINK;
- APPL_TRACE_DEBUG0("peer mdep role = SINK ");
+ APPL_TRACE_DEBUG("peer mdep role = SINK ");
}
bta_hl_find_rxtx_apdu_size(app_idx, mdep_cfg_idx,
@@ -1271,7 +1271,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_dch_reconnect status=%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_dch_reconnect status=%s", bta_hl_status_code(status));
}
#endif
@@ -1303,11 +1303,11 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_api_dch_reconnect Null Callback");
+ APPL_TRACE_ERROR("bta_hl_api_dch_reconnect Null Callback");
}
break;
default:
- APPL_TRACE_ERROR1("Status code=%d", status);
+ APPL_TRACE_ERROR("Status code=%d", status);
break;
}
}
@@ -1404,7 +1404,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_dch_echo_test status=%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_dch_echo_test status=%s", bta_hl_status_code(status));
}
#endif
@@ -1434,12 +1434,12 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_api_dch_echo_test Null Callback");
+ APPL_TRACE_ERROR("bta_hl_api_dch_echo_test Null Callback");
}
break;
default:
- APPL_TRACE_ERROR1("Status code=%s", status);
+ APPL_TRACE_ERROR("Status code=%s", status);
break;
}
}
@@ -1472,7 +1472,7 @@
p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
p_mcb->in_use = TRUE;
bdcpy(p_mcb->bd_addr, p_data->api_sdp_query.bd_addr);
- APPL_TRACE_DEBUG3("bta_hl_api_sdp_query p_mcb->app_id %d app_idx %d mcl_idx %d", p_mcb->app_id, app_idx, mcl_idx);
+ APPL_TRACE_DEBUG("bta_hl_api_sdp_query p_mcb->app_id %d app_idx %d mcl_idx %d", p_mcb->app_id, app_idx, mcl_idx);
p_mcb->app_id = p_data->api_sdp_query.app_id;
p_mcb->sdp_oper = BTA_HL_SDP_OP_SDP_QUERY_NEW ;
}
@@ -1512,7 +1512,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_sdp_query status=%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_sdp_query status=%s", bta_hl_status_code(status));
}
#endif
switch (status)
@@ -1533,13 +1533,13 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_api_sdp_query Null Callback");
+ APPL_TRACE_ERROR("bta_hl_api_sdp_query Null Callback");
}
break;
case BTA_HL_STATUS_OK:
break;
default:
- APPL_TRACE_ERROR1("Status code=%d", status);
+ APPL_TRACE_ERROR("Status code=%d", status);
break;
}
}
@@ -1593,11 +1593,11 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_sdp_query_results status=%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_sdp_query_results status=%s", bta_hl_status_code(status));
}
#endif
- APPL_TRACE_DEBUG3("bta_hl_sdp_query_results p_mcb->app_id %d app_idx %d mcl_idx %d", p_mcb->app_id, app_idx, mcl_idx);
+ APPL_TRACE_DEBUG("bta_hl_sdp_query_results p_mcb->app_id %d app_idx %d mcl_idx %d", p_mcb->app_id, app_idx, mcl_idx);
bta_hl_build_sdp_query_cfm(&evt_data,p_mcb->app_id, p_acb->app_handle,
p_mcb->bd_addr,p_sdp,status);
p_acb->p_cback(BTA_HL_SDP_QUERY_CFM_EVT,(tBTA_HL *) &evt_data );
@@ -1685,7 +1685,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_delete_mdl status=%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_delete_mdl status=%s", bta_hl_status_code(status));
}
#endif
switch (status)
@@ -1707,11 +1707,11 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_api_delete_mdl Null Callback");
+ APPL_TRACE_ERROR("bta_hl_api_delete_mdl Null Callback");
}
break;
default:
- APPL_TRACE_ERROR1("status code =%d", status);
+ APPL_TRACE_ERROR("status code =%d", status);
break;
}
}
@@ -1771,7 +1771,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_delete_mdl status=%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_delete_mdl status=%s", bta_hl_status_code(status));
}
#endif
@@ -1790,7 +1790,7 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_mca_delete_mdl_cfm Null Callback");
+ APPL_TRACE_ERROR("bta_hl_mca_delete_mdl_cfm Null Callback");
}
}
@@ -1836,7 +1836,7 @@
#if BTA_HL_DEBUG == TRUE
if (!send_ind_evt)
{
- APPL_TRACE_DEBUG1("bta_hl_mca_delete_mdl_ind is_send_ind_evt =%d", send_ind_evt);
+ APPL_TRACE_DEBUG("bta_hl_mca_delete_mdl_ind is_send_ind_evt =%d", send_ind_evt);
}
#endif
@@ -1852,7 +1852,7 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_mca_delete_mdl_ind Null Callback");
+ APPL_TRACE_ERROR("bta_hl_mca_delete_mdl_ind Null Callback");
}
}
}
@@ -1908,7 +1908,7 @@
#if BTA_HL_DEBUG == TRUE
if (status != BTA_HL_STATUS_OK)
{
- APPL_TRACE_DEBUG1("bta_hl_api_dch_abort status=%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_api_dch_abort status=%s", bta_hl_status_code(status));
}
#endif
switch (status)
@@ -1935,11 +1935,11 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_api_dch_abort Null Callback");
+ APPL_TRACE_ERROR("bta_hl_api_dch_abort Null Callback");
}
break;
default:
- APPL_TRACE_ERROR1("Status code=%d", status);
+ APPL_TRACE_ERROR("Status code=%d", status);
break;
}
}
@@ -1959,7 +1959,7 @@
BOOLEAN success = TRUE;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("BTA HL Event Handler: Event [%s]",
+ APPL_TRACE_DEBUG("BTA HL Event Handler: Event [%s]",
bta_hl_evt_code(p_msg->event));
#endif
@@ -2036,10 +2036,10 @@
else
{
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_ERROR1("unable to find control block indexes for CCH: [event=%s]",
+ APPL_TRACE_ERROR("unable to find control block indexes for CCH: [event=%s]",
bta_hl_evt_code(p_msg->event));
#else
- APPL_TRACE_ERROR1("unable to find control block indexes for CCH: [event=%d]", p_msg->event);
+ APPL_TRACE_ERROR("unable to find control block indexes for CCH: [event=%d]", p_msg->event);
#endif
success = FALSE;
}
@@ -2057,10 +2057,10 @@
{
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_ERROR1("unable to find control block indexes for DCH : [event=%s]",
+ APPL_TRACE_ERROR("unable to find control block indexes for DCH : [event=%s]",
bta_hl_evt_code(p_msg->event));
#else
- APPL_TRACE_ERROR1("unable to find control block indexes for DCH: [event=%d]", p_msg->event);
+ APPL_TRACE_ERROR("unable to find control block indexes for DCH: [event=%d]", p_msg->event);
#endif
success = FALSE;
}
diff --git a/bta/hl/bta_hl_sdp.c b/bta/hl/bta_hl_sdp.c
index 43d22d2..14171fa 100644
--- a/bta/hl/bta_hl_sdp.c
+++ b/bta/hl/bta_hl_sdp.c
@@ -286,7 +286,7 @@
mdep_id = (UINT8)p_cb->sup_feature.mdep[i].mdep_id;
mdep_role = (UINT8)p_cb->sup_feature.mdep[i].mdep_cfg.mdep_role;
- APPL_TRACE_DEBUG1("num_of_mdep_data_types %d ", p_cb->sup_feature.mdep[i].mdep_cfg.num_of_mdep_data_types);
+ APPL_TRACE_DEBUG("num_of_mdep_data_types %d ", p_cb->sup_feature.mdep[i].mdep_cfg.num_of_mdep_data_types);
for (j=0; j<p_cb->sup_feature.mdep[i].mdep_cfg.num_of_mdep_data_types; j++)
{
sup_feature_list.list_elem[cnt].mdep_id = mdep_id;
@@ -338,7 +338,7 @@
for(i=0; i < num_services; i++)
{
bta_sys_add_uuid(svc_class_id_list[i]);
- APPL_TRACE_DEBUG2("dbg bta_sys_add_uuid i=%d uuid=0x%x", i, svc_class_id_list[i]); //todo
+ APPL_TRACE_DEBUG("dbg bta_sys_add_uuid i=%d uuid=0x%x", i, svc_class_id_list[i]); //todo
}
}
else
@@ -351,7 +351,7 @@
status = BTA_HL_STATUS_SDP_FAIL;
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_sdp_update status=%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_sdp_update status=%s", bta_hl_status_code(status));
#endif
return status;
}
@@ -390,7 +390,7 @@
tBTA_HL_STATUS status = BTA_HL_STATUS_OK;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_sdp_register app_idx=%d",app_idx);
+ APPL_TRACE_DEBUG("bta_hl_sdp_register app_idx=%d",app_idx);
#endif
if ((p_cb->sup_feature.app_role_mask == BTA_HL_MDEP_ROLE_MASK_SOURCE) &&
@@ -545,7 +545,7 @@
for(i=0; i < num_services; i++)
{
bta_sys_add_uuid(svc_class_id_list[i]);
- APPL_TRACE_DEBUG2("dbg bta_sys_add_uuid i=%d uuid=0x%x", i, svc_class_id_list[i]); //todo
+ APPL_TRACE_DEBUG("dbg bta_sys_add_uuid i=%d uuid=0x%x", i, svc_class_id_list[i]); //todo
}
}
else
@@ -558,7 +558,7 @@
status = BTA_HL_STATUS_SDP_FAIL;
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_sdp_register status=%s", bta_hl_status_code(status));
+ APPL_TRACE_DEBUG("bta_hl_sdp_register status=%s", bta_hl_status_code(status));
#endif
return status;
}
@@ -628,7 +628,7 @@
/* If here, no matching UUID found */
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG0("bta_hl_find_sink_or_src_srv_class_in_db failed");
+ APPL_TRACE_DEBUG("bta_hl_find_sink_or_src_srv_class_in_db failed");
#endif
return(NULL);
diff --git a/bta/hl/bta_hl_utils.c b/bta/hl/bta_hl_utils.c
index 6a08b74..af3db24 100644
--- a/bta/hl/bta_hl_utils.c
+++ b/bta/hl/bta_hl_utils.c
@@ -78,7 +78,7 @@
#if BTA_HL_DEBUG == TRUE
if (!success)
{
- APPL_TRACE_DEBUG4("bta_hl_set_ctrl_psm_for_dch num_recs=%d success=%d update_ctrl_psm=%d ctrl_psm=0x%x ",
+ APPL_TRACE_DEBUG("bta_hl_set_ctrl_psm_for_dch num_recs=%d success=%d update_ctrl_psm=%d ctrl_psm=0x%x ",
p_mcb->sdp.num_recs, success, update_ctrl_psm, ctrl_psm );
}
#endif
@@ -126,7 +126,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG3("bta_hl_find_sdp_idx_using_ctrl_psm found=%d sdp_idx=%d ctrl_psm=0x%x ",
+ APPL_TRACE_DEBUG("bta_hl_find_sdp_idx_using_ctrl_psm found=%d sdp_idx=%d ctrl_psm=0x%x ",
found, *p_sdp_idx, ctrl_psm );
}
#endif
@@ -157,7 +157,7 @@
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG3("bta_hl_set_user_rx_pool_id pool_id=%d max_tx_size=%d default_ertm_pool_size=%d",
+ APPL_TRACE_DEBUG("bta_hl_set_user_rx_pool_id pool_id=%d max_tx_size=%d default_ertm_pool_size=%d",
pool_id, max_tx_size, GKI_get_pool_bufsize (OBX_FCR_TX_POOL_ID));
#endif
@@ -188,7 +188,7 @@
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG3("bta_hl_set_user_rx_pool_id pool_id=%d mtu=%d default_ertm_pool_size=%d",
+ APPL_TRACE_DEBUG("bta_hl_set_user_rx_pool_id pool_id=%d mtu=%d default_ertm_pool_size=%d",
pool_id, mtu, GKI_get_pool_bufsize (OBX_FCR_RX_POOL_ID));
#endif
@@ -222,13 +222,13 @@
}
else
{
- APPL_TRACE_ERROR0("The MPS is zero");
+ APPL_TRACE_ERROR("The MPS is zero");
tx_win_size = 10;
}
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG3("bta_hl_set_tx_win_size win_size=%d mtu=%d mps=%d",
+ APPL_TRACE_DEBUG("bta_hl_set_tx_win_size win_size=%d mtu=%d mps=%d",
tx_win_size, mtu, mps);
#endif
return tx_win_size;
@@ -255,7 +255,7 @@
mps = mtu;
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hl_set_mps mps=%d mtu=%d",
+ APPL_TRACE_DEBUG("bta_hl_set_mps mps=%d mtu=%d",
mps, mtu);
#endif
return mps;
@@ -275,7 +275,7 @@
{
tBTA_HL_MDL_CB *p_dcb = BTA_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG3("bta_hl_clean_mdl_cb app_idx=%d mcl_idx=%d mdl_idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_clean_mdl_cb app_idx=%d mcl_idx=%d mdl_idx=%d",
app_idx, mcl_idx, mdl_idx);
#endif
utl_freebuf((void **) &p_dcb->p_tx_pkt);
@@ -400,7 +400,7 @@
break;
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_get_service_uuids service_uuid=0x%x",service_uuid );
+ APPL_TRACE_DEBUG("bta_hl_get_service_uuids service_uuid=0x%x",service_uuid );
#endif
return service_uuid;
}
@@ -436,7 +436,7 @@
else
{
status = FALSE;
- APPL_TRACE_ERROR0("Inavlid echo cfg value");
+ APPL_TRACE_ERROR("Inavlid echo cfg value");
}
return status;
}
@@ -444,7 +444,7 @@
#if BTA_HL_DEBUG == TRUE
if (!status)
{
- APPL_TRACE_DEBUG4("bta_hl_find_echo_cfg_rsp status=failed app_idx=%d mcl_idx=%d mdep_idx=%d cfg=%d",
+ APPL_TRACE_DEBUG("bta_hl_find_echo_cfg_rsp status=failed app_idx=%d mcl_idx=%d mdep_idx=%d cfg=%d",
app_idx, mcl_idx, mdep_idx, cfg);
}
#endif
@@ -472,7 +472,7 @@
if (!bta_hl_is_the_first_reliable_existed(app_idx, mcl_idx) &&
(cfg != BTA_HL_DCH_CFG_RELIABLE))
{
- APPL_TRACE_ERROR0("the first DCH should be a reliable channel");
+ APPL_TRACE_ERROR("the first DCH should be a reliable channel");
return is_valid;
}
@@ -499,7 +499,7 @@
#if BTA_HL_DEBUG == TRUE
if (!is_valid)
{
- APPL_TRACE_DEBUG2("bta_hl_validate_dch_open_cfg is_valid=%d, cfg=%d", is_valid, cfg );
+ APPL_TRACE_DEBUG("bta_hl_validate_dch_open_cfg is_valid=%d, cfg=%d", is_valid, cfg );
}
#endif
return is_valid;
@@ -605,7 +605,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG4("bta_hl_find_cch_cb_indexes event=%s found=%d app_idx=%d mcl_idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_find_cch_cb_indexes event=%s found=%d app_idx=%d mcl_idx=%d",
bta_hl_evt_code(p_msg->hdr.event), found, app_idx, mcl_idx);
}
#endif
@@ -779,7 +779,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG5("bta_hl_find_dch_cb_indexes event=%s found=%d app_idx=%d mcl_idx=%d mdl_idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_find_dch_cb_indexes event=%s found=%d app_idx=%d mcl_idx=%d mdl_idx=%d",
bta_hl_evt_code(p_msg->hdr.event), found, *p_app_idx, *p_mcl_idx, *p_mdl_idx );
}
#endif
@@ -841,7 +841,7 @@
}while (TRUE);
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_allocate_mdl OK mdl_id=%d", mdl_id);
+ APPL_TRACE_DEBUG("bta_hl_allocate_mdl OK mdl_id=%d", mdl_id);
#endif
return mdl_id;
}
@@ -876,7 +876,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG3("bta_hl_find_mdl_idx found=%d mdl_id=%d mdl_idx=%d ",
+ APPL_TRACE_DEBUG("bta_hl_find_mdl_idx found=%d mdl_id=%d mdl_idx=%d ",
found, mdl_id, i);
}
#endif
@@ -914,7 +914,7 @@
#if BTA_HL_DEBUG == TRUE
if (found)
{
- APPL_TRACE_DEBUG4("bta_hl_find_an_opened_mdl_idx found=%d app_idx=%d mcl_idx=%d mdl_idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_find_an_opened_mdl_idx found=%d app_idx=%d mcl_idx=%d mdl_idx=%d",
found, app_idx, mcl_idx, i);
}
#endif
@@ -952,7 +952,7 @@
#if BTA_HL_DEBUG == TRUE
if (found)
{
- APPL_TRACE_DEBUG4("bta_hl_find_dch_setup_mdl_idx found=%d app_idx=%d mcl_idx=%d mdl_idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_find_dch_setup_mdl_idx found=%d app_idx=%d mcl_idx=%d mdl_idx=%d",
found, app_idx, mcl_idx, i);
}
#endif
@@ -991,7 +991,7 @@
#if BTA_HL_DEBUG == TRUE
if (found)
{
- APPL_TRACE_DEBUG3("bta_hl_find_an_in_use_mcl_idx found=%d app_idx=%d mcl_idx=%d ",
+ APPL_TRACE_DEBUG("bta_hl_find_an_in_use_mcl_idx found=%d app_idx=%d mcl_idx=%d ",
found, app_idx, i);
}
#endif
@@ -1029,7 +1029,7 @@
#if BTA_HL_DEBUG == TRUE
if (found)
{
- APPL_TRACE_DEBUG2("bta_hl_find_an_in_use_app_idx found=%d app_idx=%d ",
+ APPL_TRACE_DEBUG("bta_hl_find_an_in_use_app_idx found=%d app_idx=%d ",
found, i);
}
#endif
@@ -1063,7 +1063,7 @@
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG3("bta_hl_find_app_idx found=%d app_id=%d idx=%d ",
+ APPL_TRACE_DEBUG("bta_hl_find_app_idx found=%d app_id=%d idx=%d ",
found, app_id, i);
#endif
@@ -1101,7 +1101,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG3("bta_hl_find_app_idx_using_mca_handle status=%d handle=%d app_idx=%d ",
+ APPL_TRACE_DEBUG("bta_hl_find_app_idx_using_mca_handle status=%d handle=%d app_idx=%d ",
found, app_handle , i);
}
#endif
@@ -1148,7 +1148,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG3("bta_hl_find_mcl_idx_using_handle found=%d app_idx=%d mcl_idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_find_mcl_idx_using_handle found=%d app_idx=%d mcl_idx=%d",
found, i, j);
}
#endif
@@ -1187,7 +1187,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG2("bta_hl_find_mcl_idx found=%d idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_find_mcl_idx found=%d idx=%d",
found, i);
}
#endif
@@ -1250,7 +1250,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG2("bta_hl_find_mdl_idx_using_handle found=%d mdl_handle=%d ",
+ APPL_TRACE_DEBUG("bta_hl_find_mdl_idx_using_handle found=%d mdl_handle=%d ",
found, mdl_handle);
}
#endif
@@ -1283,7 +1283,7 @@
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_is_the_first_reliable_existed is_existed=%d ",is_existed );
+ APPL_TRACE_DEBUG("bta_hl_is_the_first_reliable_existed is_existed=%d ",is_existed );
#endif
return is_existed;
}
@@ -1435,7 +1435,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG2("bta_hl_find_avail_mdl_cfg_idx found=%d mdl_cfg_idx=%d ",found, *p_mdl_cfg_idx );
+ APPL_TRACE_DEBUG("bta_hl_find_avail_mdl_cfg_idx found=%d mdl_cfg_idx=%d ",found, *p_mdl_cfg_idx );
}
#endif
@@ -1466,7 +1466,7 @@
{
p_mdl = BTA_HL_GET_MDL_CFG_PTR(app_idx, i);
if(p_mdl->active)
- APPL_TRACE_DEBUG2("bta_hl_find_mdl_cfg_idx: mdl_id =%d, p_mdl->mdl_id=%d",mdl_id,
+ APPL_TRACE_DEBUG("bta_hl_find_mdl_cfg_idx: mdl_id =%d, p_mdl->mdl_id=%d",mdl_id,
p_mdl->mdl_id);
if (p_mdl->active &&
(!memcmp (p_mcb->bd_addr, p_mdl->peer_bd_addr, BD_ADDR_LEN))&&
@@ -1481,7 +1481,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG2("bta_hl_find_mdl_cfg_idx found=%d mdl_cfg_idx=%d ",found, i );
+ APPL_TRACE_DEBUG("bta_hl_find_mdl_cfg_idx found=%d mdl_cfg_idx=%d ",found, i );
}
#endif
@@ -1551,7 +1551,7 @@
#if BTA_HL_DEBUG == TRUE
if (!result)
{
- APPL_TRACE_DEBUG2("bta_hl_get_cur_time result=%s cur_time=%d",
+ APPL_TRACE_DEBUG("bta_hl_get_cur_time result=%s cur_time=%d",
(result?"OK":"FAIL"), *p_cur_time);
}
#endif
@@ -1621,7 +1621,7 @@
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_compact_mdl_cfg_time cnt=%d ",cnt );
+ APPL_TRACE_DEBUG("bta_hl_compact_mdl_cfg_time cnt=%d ",cnt );
#endif
@@ -1803,7 +1803,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG3("bta_hl_find_mdep_cfg_idx found=%d mdep_idx=%d local_mdep_id=%d ",
+ APPL_TRACE_DEBUG("bta_hl_find_mdep_cfg_idx found=%d mdep_idx=%d local_mdep_id=%d ",
found,i, local_mdep_id );
}
#endif
@@ -1852,7 +1852,7 @@
*p_tx_apu_size = max_tx_apdu_size;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hl_find_rxtx_apdu_size max_rx_apdu_size=%d max_tx_apdu_size=%d ",
+ APPL_TRACE_DEBUG("bta_hl_find_rxtx_apdu_size max_rx_apdu_size=%d max_tx_apdu_size=%d ",
max_rx_apdu_size, max_tx_apdu_size );
#endif
@@ -1880,7 +1880,7 @@
BOOLEAN peer_found =FALSE;
UINT8 i;
- APPL_TRACE_DEBUG2("bta_hl_validate_peer_cfg sdp_idx=%d app_idx %d", sdp_idx, app_idx);
+ APPL_TRACE_DEBUG("bta_hl_validate_peer_cfg sdp_idx=%d app_idx %d", sdp_idx, app_idx);
if (p_dcb->local_mdep_id == BTA_HL_ECHO_TEST_MDEP_ID)
@@ -1891,8 +1891,8 @@
p_rec = &p_mcb->sdp.sdp_rec[sdp_idx];
for (i=0; i< p_rec->num_mdeps; i++)
{
- APPL_TRACE_DEBUG2("mdep_id %d peer_mdep_id %d",p_rec->mdep_cfg[i].mdep_id , peer_mdep_id);
- APPL_TRACE_DEBUG2("mdep_role %d peer_mdep_role %d",p_rec->mdep_cfg[i].mdep_role,
+ APPL_TRACE_DEBUG("mdep_id %d peer_mdep_id %d",p_rec->mdep_cfg[i].mdep_id , peer_mdep_id);
+ APPL_TRACE_DEBUG("mdep_role %d peer_mdep_role %d",p_rec->mdep_cfg[i].mdep_role,
peer_mdep_role)
if ( (p_rec->mdep_cfg[i].mdep_id == peer_mdep_id) &&
(p_rec->mdep_cfg[i].mdep_role == peer_mdep_role))
@@ -1906,7 +1906,7 @@
#if BTA_HL_DEBUG == TRUE
if (!peer_found)
{
- APPL_TRACE_DEBUG1("bta_hl_validate_peer_cfg failed num_mdeps=%d",p_rec->num_mdeps);
+ APPL_TRACE_DEBUG("bta_hl_validate_peer_cfg failed num_mdeps=%d",p_rec->num_mdeps);
}
#endif
return peer_found;
@@ -1937,7 +1937,7 @@
(local_cfg != BTA_HL_DCH_CFG_RELIABLE))
{
status = BTA_HL_STATUS_NO_FIRST_RELIABLE;
- APPL_TRACE_ERROR0("BTA_HL_STATUS_INVALID_DCH_CFG");
+ APPL_TRACE_ERROR("BTA_HL_STATUS_INVALID_DCH_CFG");
}
return status;
@@ -1967,7 +1967,7 @@
UINT8 i, in_use_mdl_idx = 0;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG2("bta_hl_validate_reconnect_params mdl_id=%d app_idx=%d", p_reconnect->mdl_id, app_idx);
+ APPL_TRACE_DEBUG("bta_hl_validate_reconnect_params mdl_id=%d app_idx=%d", p_reconnect->mdl_id, app_idx);
#endif
if (bta_hl_find_mdl_cfg_idx(app_idx, mcl_idx, p_reconnect->mdl_id, &mdl_cfg_idx))
{
@@ -1977,7 +1977,7 @@
#if BTA_HL_DEBUG == TRUE
if (!mdl_cfg_found)
{
- APPL_TRACE_DEBUG0("mdl_cfg_found not found");
+ APPL_TRACE_DEBUG("mdl_cfg_found not found");
}
#endif
@@ -2000,7 +2000,7 @@
#if BTA_HL_DEBUG == TRUE
if (!local_mdep_id_found)
{
- APPL_TRACE_DEBUG0("local_mdep_id not found");
+ APPL_TRACE_DEBUG("local_mdep_id not found");
}
#endif
@@ -2013,14 +2013,14 @@
}
else
{
- APPL_TRACE_ERROR1("mdl_id=%d is curreltly in use",p_reconnect->mdl_id);
+ APPL_TRACE_ERROR("mdl_id=%d is curreltly in use",p_reconnect->mdl_id);
}
}
#if BTA_HL_DEBUG == TRUE
if (!status)
{
- APPL_TRACE_DEBUG3("Reconnect validation failed local_mdep_id found=%d mdl_cfg_idx found=%d in_use_mdl_idx=%d ",
+ APPL_TRACE_DEBUG("Reconnect validation failed local_mdep_id found=%d mdl_cfg_idx found=%d in_use_mdl_idx=%d ",
local_mdep_id_found, mdl_cfg_found, in_use_mdl_idx);
}
#endif
@@ -2053,7 +2053,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG2("bta_hl_find_avail_mcl_idx found=%d idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_find_avail_mcl_idx found=%d idx=%d",
found, i);
}
#endif
@@ -2093,7 +2093,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG2("bta_hl_find_avail_mdl_idx found=%d idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_find_avail_mdl_idx found=%d idx=%d",
found, i);
}
#endif
@@ -2129,7 +2129,7 @@
if (is_duplicate)
{
- APPL_TRACE_DEBUG2("bta_hl_is_a_duplicate_id app_id=%d is_duplicate=%d",
+ APPL_TRACE_DEBUG("bta_hl_is_a_duplicate_id app_id=%d is_duplicate=%d",
app_id, is_duplicate);
}
#endif
@@ -2166,7 +2166,7 @@
#if BTA_HL_DEBUG == TRUE
if (!found)
{
- APPL_TRACE_DEBUG2("bta_hl_find_avail_app_idx found=%d app_idx=%d",
+ APPL_TRACE_DEBUG("bta_hl_find_avail_app_idx found=%d app_idx=%d",
found, i);
}
#endif
@@ -2192,7 +2192,7 @@
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_app_update app_id=%d", app_id);
+ APPL_TRACE_DEBUG("bta_hl_app_update app_id=%d", app_id);
#endif
if (is_register)
@@ -2221,7 +2221,7 @@
/* If no available MDEPs, return error */
if (mdep_idx == BTA_HL_NUM_MDEPS)
{
- APPL_TRACE_ERROR0("bta_hl_app_update: Out of MDEP IDs");
+ APPL_TRACE_ERROR("bta_hl_app_update: Out of MDEP IDs");
status = BTA_HL_STATUS_MCAP_REG_FAIL;
break;
}
@@ -2235,7 +2235,7 @@
&p_acb->sup_feature.mdep[mdep_idx].mdep_cfg))
{
p_acb->sup_feature.mdep[mdep_idx].ori_app_id = app_id;
- APPL_TRACE_DEBUG4("mdep idx %d id %d ori_app_id %d num data type %d",mdep_idx,
+ APPL_TRACE_DEBUG("mdep idx %d id %d ori_app_id %d num data type %d",mdep_idx,
p_acb->sup_feature.mdep[mdep_idx].mdep_id,
p_acb->sup_feature.mdep[mdep_idx].ori_app_id,
p_acb->sup_feature.mdep[mdep_idx].mdep_cfg.num_of_mdep_data_types);
@@ -2251,7 +2251,7 @@
}
else
{
- APPL_TRACE_ERROR1("bta_hl_app_registration: Invalid Role %d",
+ APPL_TRACE_ERROR("bta_hl_app_registration: Invalid Role %d",
p_acb->sup_feature.mdep[mdep_idx].mdep_cfg.mdep_role);
status = BTA_HL_STATUS_MDEP_CO_FAIL;
break;
@@ -2259,21 +2259,21 @@
}
else
{
- APPL_TRACE_ERROR0("bta_hl_app_registration: Cfg callout failed");
+ APPL_TRACE_ERROR("bta_hl_app_registration: Cfg callout failed");
status = BTA_HL_STATUS_MDEP_CO_FAIL;
break;
}
}
else
{
- APPL_TRACE_ERROR0("bta_hl_app_registration: MCA_CreateDep failed");
+ APPL_TRACE_ERROR("bta_hl_app_registration: MCA_CreateDep failed");
status = BTA_HL_STATUS_MCAP_REG_FAIL;
break;
}
}
p_acb->sup_feature.num_of_mdeps += num_of_mdeps;
- APPL_TRACE_DEBUG1("num_of_mdeps %d", p_acb->sup_feature.num_of_mdeps);
+ APPL_TRACE_DEBUG("num_of_mdeps %d", p_acb->sup_feature.num_of_mdeps);
if ((status == BTA_HL_STATUS_OK) &&
(p_acb->sup_feature.app_role_mask == BTA_HL_MDEP_ROLE_MASK_SOURCE))
@@ -2305,13 +2305,13 @@
{
if (p_acb->sup_feature.mdep[i].ori_app_id == app_id)
{
- APPL_TRACE_DEBUG1("Found index %", i);
+ APPL_TRACE_DEBUG("Found index %", i);
if (MCA_DeleteDep((tMCA_HANDLE)p_acb->app_handle,
(p_acb->sup_feature.mdep[i].mdep_id)) != MCA_SUCCESS)
{
- APPL_TRACE_ERROR0("Error deregistering");
+ APPL_TRACE_ERROR("Error deregistering");
status = BTA_HL_STATUS_MCAP_REG_FAIL;
return status;
}
@@ -2353,7 +2353,7 @@
UINT8 mdep_counter = 0;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("bta_hl_app_registration app_idx=%d", app_idx);
+ APPL_TRACE_DEBUG("bta_hl_app_registration app_idx=%d", app_idx);
#endif
reg.ctrl_psm = p_acb->ctrl_psm;
@@ -2374,14 +2374,14 @@
if (p_acb->sup_feature.mdep[0].mdep_id != BTA_HL_ECHO_TEST_MDEP_ID)
{
status = BTA_HL_STATUS_MCAP_REG_FAIL;
- APPL_TRACE_ERROR1("BAD MDEP ID for echo test mdep_id=%d",
+ APPL_TRACE_ERROR("BAD MDEP ID for echo test mdep_id=%d",
p_acb->sup_feature.mdep[0].mdep_id );
}
}
else
{
status = BTA_HL_STATUS_MCAP_REG_FAIL;
- APPL_TRACE_ERROR0("MCA_CreateDep for echo test(mdep_id=0) failed");
+ APPL_TRACE_ERROR("MCA_CreateDep for echo test(mdep_id=0) failed");
}
@@ -2418,7 +2418,7 @@
break;
}
p_acb->sup_feature.mdep[i].ori_app_id = p_acb->app_id;
- APPL_TRACE_DEBUG2("index %d ori_app_id %d", i,
+ APPL_TRACE_DEBUG("index %d ori_app_id %d", i,
p_acb->sup_feature.mdep[i].ori_app_id);
}
else
@@ -2488,7 +2488,7 @@
{
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_ERROR1("BTA HL Discard event=%s",bta_hl_evt_code(event));
+ APPL_TRACE_ERROR("BTA HL Discard event=%s",bta_hl_evt_code(event));
#endif
@@ -2533,7 +2533,7 @@
{
if (!bta_hl_find_avail_mdl_cfg_idx(app_idx, mcl_idx, &mdl_cfg_idx))
{
- APPL_TRACE_ERROR0("No space to save the MDL config");
+ APPL_TRACE_ERROR("No space to save the MDL config");
found= FALSE; /*no space available*/
}
}
@@ -2566,11 +2566,11 @@
{
if (p_dcb->mtu != l2cap_cfg.mtu)
{
- APPL_TRACE_WARNING2("MCAP and L2CAP peer mtu size out of sync from MCAP mtu=%d from l2cap mtu=%d",
+ APPL_TRACE_WARNING("MCAP and L2CAP peer mtu size out of sync from MCAP mtu=%d from l2cap mtu=%d",
p_dcb->mtu, l2cap_cfg.mtu);
}
- APPL_TRACE_DEBUG1("bta_hl_save_mdl_cfg saved=%d", found);
- APPL_TRACE_DEBUG4("Saved. L2cap cfg mdl_id=%d mtu=%d fcs=%d dch_mode=%d",
+ APPL_TRACE_DEBUG("bta_hl_save_mdl_cfg saved=%d", found);
+ APPL_TRACE_DEBUG("Saved. L2cap cfg mdl_id=%d mtu=%d fcs=%d dch_mode=%d",
mdl_cfg.mdl_id, mdl_cfg.mtu, mdl_cfg.fcs, mdl_cfg.dch_mode);
}
#endif
@@ -2611,7 +2611,7 @@
l2cap_mode = L2CAP_FCR_STREAM_MODE;
break;
default:
- APPL_TRACE_ERROR1("Invalid dch oper=%d for set dch chan cfg", p_dcb->dch_oper);
+ APPL_TRACE_ERROR("Invalid dch oper=%d for set dch chan cfg", p_dcb->dch_oper);
break;
}
p_dcb->chnl_cfg.fcr_opt.mode = l2cap_mode;
@@ -2643,17 +2643,17 @@
}
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG1("L2CAP Params l2cap_mode[3-ERTM 4-STREAM]=%d", l2cap_mode);
- APPL_TRACE_DEBUG2("Use FCS =%s mtu=%d", ((p_dcb->chnl_cfg.fcs & 1)?"YES":"NO"),
+ APPL_TRACE_DEBUG("L2CAP Params l2cap_mode[3-ERTM 4-STREAM]=%d", l2cap_mode);
+ APPL_TRACE_DEBUG("Use FCS =%s mtu=%d", ((p_dcb->chnl_cfg.fcs & 1)?"YES":"NO"),
p_dcb->chnl_cfg.data_mtu);
- APPL_TRACE_DEBUG5("tx_win_sz=%d, max_transmit=%d, rtrans_tout=%d, mon_tout=%d, mps=%d",
+ APPL_TRACE_DEBUG("tx_win_sz=%d, max_transmit=%d, rtrans_tout=%d, mon_tout=%d, mps=%d",
p_dcb->chnl_cfg.fcr_opt.tx_win_sz,
p_dcb->chnl_cfg.fcr_opt.max_transmit,
p_dcb->chnl_cfg.fcr_opt.rtrans_tout,
p_dcb->chnl_cfg.fcr_opt.mon_tout,
p_dcb->chnl_cfg.fcr_opt.mps);
- APPL_TRACE_DEBUG4("USER rx_pool_id=%d, tx_pool_id=%d, FCR rx_pool_id=%d, tx_pool_id=%d",
+ APPL_TRACE_DEBUG("USER rx_pool_id=%d, tx_pool_id=%d, FCR rx_pool_id=%d, tx_pool_id=%d",
p_dcb->chnl_cfg.user_rx_pool_id,
p_dcb->chnl_cfg.user_tx_pool_id,
p_dcb->chnl_cfg.fcr_rx_pool_id,
@@ -2729,8 +2729,8 @@
#if BTA_HL_DEBUG == TRUE
if (!success)
{
- APPL_TRACE_DEBUG3("bta_hl_get_l2cap_cfg success=%d mdl=%d lcid=%d", success, mdl_hnd, lcid);
- APPL_TRACE_DEBUG2("l2cap mtu=%d fcs=%d", p_cfg->mtu, p_cfg->fcs);
+ APPL_TRACE_DEBUG("bta_hl_get_l2cap_cfg success=%d mdl=%d lcid=%d", success, mdl_hnd, lcid);
+ APPL_TRACE_DEBUG("l2cap mtu=%d fcs=%d", p_cfg->mtu, p_cfg->fcs);
}
#endif
@@ -2772,15 +2772,15 @@
if (p_dcb->mtu != l2cap_cfg.mtu)
{
- APPL_TRACE_WARNING2("MCAP and L2CAP peer mtu size out of sync from MCAP mtu=%d from l2cap mtu=%d",
+ APPL_TRACE_WARNING("MCAP and L2CAP peer mtu size out of sync from MCAP mtu=%d from l2cap mtu=%d",
p_dcb->mtu, l2cap_cfg.mtu);
}
if (!success)
{
- APPL_TRACE_DEBUG4("bta_hl_validate_chan_cfg success=%d app_idx=%d mcl_idx=%d mdl_idx=%d",success, app_idx, mcl_idx, mdl_idx);
- APPL_TRACE_DEBUG3("Cur. L2cap cfg mtu=%d fcs=%d dch_mode=%d", l2cap_cfg.mtu, l2cap_cfg.fcs, p_dcb->dch_mode);
- APPL_TRACE_DEBUG3("From saved: L2cap cfg mtu=%d fcs=%d dch_mode=%d", p_acb->mdl_cfg[mdl_cfg_idx].mtu,
+ APPL_TRACE_DEBUG("bta_hl_validate_chan_cfg success=%d app_idx=%d mcl_idx=%d mdl_idx=%d",success, app_idx, mcl_idx, mdl_idx);
+ APPL_TRACE_DEBUG("Cur. L2cap cfg mtu=%d fcs=%d dch_mode=%d", l2cap_cfg.mtu, l2cap_cfg.fcs, p_dcb->dch_mode);
+ APPL_TRACE_DEBUG("From saved: L2cap cfg mtu=%d fcs=%d dch_mode=%d", p_acb->mdl_cfg[mdl_cfg_idx].mtu,
p_acb->mdl_cfg[mdl_cfg_idx].fcs , p_acb->mdl_cfg[mdl_cfg_idx].dch_mode);
}
#endif
@@ -2837,7 +2837,7 @@
UINT8 mdl_idx;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG1("bta_hl_check_cch_close cch_close_dch_oper=%d",p_mcb->cch_close_dch_oper );
+ APPL_TRACE_DEBUG("bta_hl_check_cch_close cch_close_dch_oper=%d",p_mcb->cch_close_dch_oper );
#endif
if (p_mcb->cch_oper == BTA_HL_CCH_OP_LOCAL_CLOSE)
@@ -2889,7 +2889,7 @@
int i, num_act_apps=0;
#if BTA_HL_DEBUG == TRUE
- APPL_TRACE_DEBUG0("bta_hl_clean_app");
+ APPL_TRACE_DEBUG("bta_hl_clean_app");
#endif
MCA_Deregister((tMCA_HANDLE)p_acb->app_handle);
@@ -2927,7 +2927,7 @@
tBTA_HL evt_data;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_check_deregistration");
+ APPL_TRACE_DEBUG("bta_hl_check_deregistration");
#endif
if (p_acb->deregistering)
@@ -2940,7 +2940,7 @@
if (p_mcb->cch_state == BTA_HL_CCH_OPENING_ST)
p_mcb->force_close_local_cch_opening = TRUE;
p_mcb->cch_oper = BTA_HL_CCH_OP_LOCAL_CLOSE;
- APPL_TRACE_DEBUG1("p_mcb->force_close_local_cch_opening=%d", p_mcb->force_close_local_cch_opening );
+ APPL_TRACE_DEBUG("p_mcb->force_close_local_cch_opening=%d", p_mcb->force_close_local_cch_opening );
bta_hl_check_cch_close(app_idx,mcl_idx,p_data, TRUE);
}
}
@@ -2976,7 +2976,7 @@
tBTA_HL_CTRL evt_data;
#if (BTA_HL_DEBUG == TRUE)
- APPL_TRACE_DEBUG0("bta_hl_check_disable");
+ APPL_TRACE_DEBUG("bta_hl_check_disable");
#endif
if (bta_hl_cb.disabling)
@@ -3141,7 +3141,7 @@
p_evt_data->cch_open_cfm.mcl_handle = mcl_handle;
bdcpy(p_evt_data->cch_open_cfm.bd_addr, bd_addr);
p_evt_data->cch_open_cfm.status = status;
- APPL_TRACE_DEBUG1("bta_hl_build_cch_open_cfm: status=%d",status);
+ APPL_TRACE_DEBUG("bta_hl_build_cch_open_cfm: status=%d",status);
}
/*******************************************************************************
@@ -3252,7 +3252,7 @@
tBTA_HL_STATUS status)
{
- APPL_TRACE_DEBUG2("bta_hl_build_sdp_query_cfm: app_id = %d, app_handle=%d",
+ APPL_TRACE_DEBUG("bta_hl_build_sdp_query_cfm: app_id = %d, app_handle=%d",
app_id,app_handle);
p_evt_data->sdp_query_cfm.app_id = app_id;
p_evt_data->sdp_query_cfm.app_handle = app_handle;
diff --git a/bta/jv/bta_jv_act.c b/bta/jv/bta_jv_act.c
index 0e9d4eb..ca14837 100644
--- a/bta/jv/bta_jv_act.c
+++ b/bta/jv/bta_jv_act.c
@@ -56,7 +56,7 @@
{
char uuids[128];
uuid_to_string((bt_uuid_t*)p_uuid, uuids);
- APPL_TRACE_DEBUG2("%s: %s", title, uuids);
+ APPL_TRACE_DEBUG("%s: %s", title, uuids);
}
@@ -135,7 +135,7 @@
used++;
}
if (used == BTA_JV_NUM_SERVICE_ID)
- APPL_TRACE_ERROR1("get_sec_id_used, sec id exceeds the limit:%d",
+ APPL_TRACE_ERROR("get_sec_id_used, sec id exceeds the limit:%d",
BTA_JV_NUM_SERVICE_ID);
return used;
}
@@ -149,7 +149,7 @@
used++;
}
if (used == BTA_JV_MAX_RFC_CONN)
- APPL_TRACE_ERROR1("get_sec_id_used, rfc ctrl block exceeds the limit:%d",
+ APPL_TRACE_ERROR("get_sec_id_used, rfc ctrl block exceeds the limit:%d",
BTA_JV_MAX_RFC_CONN);
return used;
}
@@ -201,7 +201,7 @@
for (j = 0; j < BTA_JV_MAX_RFC_SR_SESSION; j++)
p_cb->rfc_hdl[j] = 0;
p_cb->rfc_hdl[0] = port_handle;
- APPL_TRACE_DEBUG2( "bta_jv_alloc_rfc_cb port_handle:%d handle:0x%2x",
+ APPL_TRACE_DEBUG( "bta_jv_alloc_rfc_cb port_handle:%d handle:0x%2x",
port_handle, p_cb->handle);
p_pcb = &bta_jv_cb.port_cb[port_handle - 1];
@@ -214,7 +214,7 @@
}
if(p_cb == NULL)
{
- APPL_TRACE_ERROR2( "bta_jv_alloc_rfc_cb: port_handle:%d, ctrl block exceeds "
+ APPL_TRACE_ERROR( "bta_jv_alloc_rfc_cb: port_handle:%d, ctrl block exceeds "
"limit:%d", port_handle, BTA_JV_MAX_RFC_CONN);
}
return p_cb;
@@ -267,7 +267,7 @@
}
else
{
- APPL_TRACE_WARNING2("bta_jv_rfc_port_to_cb(port_handle:0x%x):jv handle:0x%x not"
+ APPL_TRACE_WARNING("bta_jv_rfc_port_to_cb(port_handle:0x%x):jv handle:0x%x not"
" FOUND", port_handle, bta_jv_cb.port_cb[port_handle - 1].handle);
}
return p_cb;
@@ -281,10 +281,10 @@
if (!p_cb || !p_pcb)
{
- APPL_TRACE_ERROR0("bta_jv_free_sr_rfc_cb, p_cb or p_pcb cannot be null");
+ APPL_TRACE_ERROR("bta_jv_free_sr_rfc_cb, p_cb or p_pcb cannot be null");
return BTA_JV_FAILURE;
}
- APPL_TRACE_DEBUG6("bta_jv_free_sr_rfc_cb: max_sess:%d, curr_sess:%d, p_pcb:%p, user:"
+ APPL_TRACE_DEBUG("bta_jv_free_sr_rfc_cb: max_sess:%d, curr_sess:%d, p_pcb:%p, user:"
"%d, state:%d, jv handle: 0x%x" ,p_cb->max_sess, p_cb->curr_sess, p_pcb,
(int)p_pcb->user_data, p_pcb->state, p_pcb->handle);
@@ -295,30 +295,30 @@
{
case BTA_JV_ST_CL_CLOSING:
case BTA_JV_ST_SR_CLOSING:
- APPL_TRACE_WARNING4("bta_jv_free_sr_rfc_cb: return on closing, port state:%d, "
+ APPL_TRACE_WARNING("bta_jv_free_sr_rfc_cb: return on closing, port state:%d, "
"scn:%d, p_pcb:%p, user_data:%d", p_pcb->state, p_cb->scn, p_pcb,
(int)p_pcb->user_data);
status = BTA_JV_FAILURE;
return status;
case BTA_JV_ST_CL_OPEN:
case BTA_JV_ST_CL_OPENING:
- APPL_TRACE_DEBUG3("bta_jv_free_sr_rfc_cb: state: %d, scn:%d,"
+ APPL_TRACE_DEBUG("bta_jv_free_sr_rfc_cb: state: %d, scn:%d,"
" user_data:%d", p_pcb->state, p_cb->scn, (int)p_pcb->user_data);
p_pcb->state = BTA_JV_ST_CL_CLOSING;
break;
case BTA_JV_ST_SR_LISTEN:
p_pcb->state = BTA_JV_ST_SR_CLOSING;
remove_server = TRUE;
- APPL_TRACE_DEBUG2("bta_jv_free_sr_rfc_cb: state: BTA_JV_ST_SR_LISTEN, scn:%d,"
+ APPL_TRACE_DEBUG("bta_jv_free_sr_rfc_cb: state: BTA_JV_ST_SR_LISTEN, scn:%d,"
" user_data:%d", p_cb->scn, (int)p_pcb->user_data);
break;
case BTA_JV_ST_SR_OPEN:
p_pcb->state = BTA_JV_ST_SR_CLOSING;
- APPL_TRACE_DEBUG2("bta_jv_free_sr_rfc_cb: state: BTA_JV_ST_SR_OPEN, scn:%d,"
+ APPL_TRACE_DEBUG("bta_jv_free_sr_rfc_cb: state: BTA_JV_ST_SR_OPEN, scn:%d,"
" user_data:%d", p_cb->scn, (int)p_pcb->user_data);
break;
default:
- APPL_TRACE_WARNING6("bta_jv_free_sr_rfc_cb():failed, ignore port state:%d, scn:"
+ APPL_TRACE_WARNING("bta_jv_free_sr_rfc_cb():failed, ignore port state:%d, scn:"
"%d, p_pcb:%p, jv handle: 0x%x, port_handle: %d, user_data:%d",
p_pcb->state, p_cb->scn, p_pcb, p_pcb->handle, p_pcb->port_handle,
(int)p_pcb->user_data);
@@ -336,7 +336,7 @@
if (port_status != PORT_SUCCESS)
{
status = BTA_JV_FAILURE;
- APPL_TRACE_WARNING5("bta_jv_free_rfc_cb(jv handle: 0x%x, state %d)::"
+ APPL_TRACE_WARNING("bta_jv_free_rfc_cb(jv handle: 0x%x, state %d)::"
"port_status: %d, port_handle: %d, close_pending: %d:Remove",
p_pcb->handle, p_pcb->state, port_status, p_pcb->port_handle,
close_pending);
@@ -465,9 +465,9 @@
appid_counter++;
}
- APPL_TRACE_API3("bta_jv_free_set_pm_profile_cb(jv_handle: 0x%2x), idx: %d, "
+ APPL_TRACE_API("bta_jv_free_set_pm_profile_cb(jv_handle: 0x%2x), idx: %d, "
"app_id: 0x%x", jv_handle, i, bta_jv_cb.pm_cb[i].app_id);
- APPL_TRACE_API2("bta_jv_free_set_pm_profile_cb, bd_counter = %d, "
+ APPL_TRACE_API("bta_jv_free_set_pm_profile_cb, bd_counter = %d, "
"appid_counter = %d", bd_counter, appid_counter);
if (bd_counter > 1)
{
@@ -494,7 +494,7 @@
if (p_pcb)
{
if (NULL == p_pcb->p_pm_cb)
- APPL_TRACE_WARNING3("bta_jv_free_set_pm_profile_cb(jv_handle:"
+ APPL_TRACE_WARNING("bta_jv_free_set_pm_profile_cb(jv_handle:"
" 0x%x):port_handle: 0x%x, p_pm_cb: %d: no link to "
"pm_cb?", jv_handle, p_pcb->port_handle, i);
p_cb = &p_pcb->p_pm_cb;
@@ -507,7 +507,7 @@
{
tBTA_JV_L2C_CB *p_l2c_cb = &bta_jv_cb.l2c_cb[jv_handle];
if (NULL == p_l2c_cb->p_pm_cb)
- APPL_TRACE_WARNING2("bta_jv_free_set_pm_profile_cb(jv_handle: "
+ APPL_TRACE_WARNING("bta_jv_free_set_pm_profile_cb(jv_handle: "
"0x%x): p_pm_cb: %d: no link to pm_cb?", jv_handle, i);
p_cb = &p_l2c_cb->p_pm_cb;
}
@@ -577,7 +577,7 @@
}
}
}
- APPL_TRACE_API5("bta_jv_alloc_set_pm_profile_cb(handle 0x%2x, app_id %d): "
+ APPL_TRACE_API("bta_jv_alloc_set_pm_profile_cb(handle 0x%2x, app_id %d): "
"idx: %d, (BTA_JV_PM_MAX_NUM: %d), pp_cb: 0x%x", jv_handle, app_id,
i, BTA_JV_PM_MAX_NUM, pp_cb);
break;
@@ -593,7 +593,7 @@
bta_jv_cb.pm_cb[i].state = BTA_JV_PM_IDLE_ST;
return &bta_jv_cb.pm_cb[i];
}
- APPL_TRACE_WARNING2("bta_jv_alloc_set_pm_profile_cb(jv_handle: 0x%x, app_id: %d) "
+ APPL_TRACE_WARNING("bta_jv_alloc_set_pm_profile_cb(jv_handle: 0x%x, app_id: %d) "
"return NULL", jv_handle, app_id);
return (tBTA_JV_PM_CB *)NULL;
}
@@ -757,7 +757,7 @@
{
UNUSED(p_data);
- APPL_TRACE_ERROR0("bta_jv_disable not used");
+ APPL_TRACE_ERROR("bta_jv_disable not used");
#if 0
int i;
@@ -767,7 +767,7 @@
{
if(bta_jv_cb.sdp_handle[i])
{
- APPL_TRACE_DEBUG1( "delete SDP record: %d", bta_jv_cb.sdp_handle[i]);
+ APPL_TRACE_DEBUG( "delete SDP record: %d", bta_jv_cb.sdp_handle[i]);
SDP_DeleteRecord(bta_jv_cb.sdp_handle[i]);
bta_jv_cb.sdp_handle[i] = 0;
}
@@ -778,7 +778,7 @@
{
if(bta_jv_cb.scn[i])
{
- APPL_TRACE_DEBUG1( "free scn: %d", (i+1));
+ APPL_TRACE_DEBUG( "free scn: %d", (i+1));
BTM_FreeSCN((UINT8)(i+1));
bta_jv_cb.scn[i] = FALSE;
}
@@ -1005,7 +1005,7 @@
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB };
logu("in, uuid:", u->uu.uuid128);
- APPL_TRACE_DEBUG1("uuid len:%d", u->len);
+ APPL_TRACE_DEBUG("uuid len:%d", u->len);
if(u->len == 16)
{
if(memcmp(&u->uu.uuid128[4], &bt_base_uuid[4], 12) == 0)
@@ -1018,7 +1018,7 @@
uint16_t u16;
memcpy(&u16, &u->uu.uuid128[2], sizeof(u16));
su.uu.uuid16 = ntohs(u16);
- APPL_TRACE_DEBUG1("shorten to 16 bits uuid: %x", su.uu.uuid16);
+ APPL_TRACE_DEBUG("shorten to 16 bits uuid: %x", su.uu.uuid16);
}
else
{
@@ -1026,12 +1026,12 @@
uint32_t u32;
memcpy(&u32, &u->uu.uuid128[0], sizeof(u32));
su.uu.uuid32 = ntohl(u32);
- APPL_TRACE_DEBUG1("shorten to 32 bits uuid: %x", su.uu.uuid32);
+ APPL_TRACE_DEBUG("shorten to 32 bits uuid: %x", su.uu.uuid32);
}
return su;
}
}
- APPL_TRACE_DEBUG0("cannot shorten none-reserved 128 bits uuid");
+ APPL_TRACE_DEBUG("cannot shorten none-reserved 128 bits uuid");
return *u;
}
@@ -1049,14 +1049,14 @@
tBTA_JV_STATUS status;
UINT8 old_sdp_act = bta_jv_cb.sdp_active;
- APPL_TRACE_DEBUG1("bta_jv_start_discovery_cback res: 0x%x", result);
+ APPL_TRACE_DEBUG("bta_jv_start_discovery_cback res: 0x%x", result);
bta_jv_cb.sdp_active = BTA_JV_SDP_ACT_NONE;
if(bta_jv_cb.p_dm_cback)
{
if (old_sdp_act == BTA_JV_SDP_ACT_CANCEL)
{
- APPL_TRACE_DEBUG0("BTA_JV_SDP_ACT_CANCEL");
+ APPL_TRACE_DEBUG("BTA_JV_SDP_ACT_CANCEL");
status = BTA_JV_SUCCESS;
bta_jv_cb.p_dm_cback(BTA_JV_CANCEL_DISCVRY_EVT, (tBTA_JV *)&status, user_data);
}
@@ -1073,7 +1073,7 @@
tBT_UUID su = shorten_sdp_uuid(&bta_jv_cb.uuid);
logu("shorten uuid:", su.uu.uuid128);
p_sdp_rec = SDP_FindServiceUUIDInDb(p_bta_jv_cfg->p_sdp_db, &su, p_sdp_rec);
- APPL_TRACE_DEBUG1("p_sdp_rec:%p", p_sdp_rec);
+ APPL_TRACE_DEBUG("p_sdp_rec:%p", p_sdp_rec);
if(p_sdp_rec && SDP_FindProtocolListElemInRec(p_sdp_rec, UUID_PROTOCOL_RFCOMM, &pe))
{
dcomp.scn = (UINT8) pe.params[0];
@@ -1101,7 +1101,7 @@
void bta_jv_start_discovery(tBTA_JV_MSG *p_data)
{
tBTA_JV_STATUS status = BTA_JV_FAILURE;
- APPL_TRACE_DEBUG1("bta_jv_start_discovery in, sdp_active:%d", bta_jv_cb.sdp_active);
+ APPL_TRACE_DEBUG("bta_jv_start_discovery in, sdp_active:%d", bta_jv_cb.sdp_active);
if (bta_jv_cb.sdp_active != BTA_JV_SDP_ACT_NONE)
{
/* SDP is still in progress */
@@ -1119,7 +1119,7 @@
}
*/
/* init the database/set up the filter */
- APPL_TRACE_DEBUG1("call SDP_InitDiscoveryDb, p_data->start_discovery.num_uuid:%d",
+ APPL_TRACE_DEBUG("call SDP_InitDiscoveryDb, p_data->start_discovery.num_uuid:%d",
p_data->start_discovery.num_uuid);
SDP_InitDiscoveryDb (p_bta_jv_cfg->p_sdp_db, p_bta_jv_cfg->sdp_db_size,
p_data->start_discovery.num_uuid, p_data->start_discovery.uuid_list, 0, NULL);
@@ -1268,7 +1268,7 @@
bta_jv_cb.sel_len = len;
serv_sel.service_len = len;
bdcpy(serv_sel.bd_addr, p_rec->remote_bd_addr);
- APPL_TRACE_DEBUG1( "bta_jv_service_select found uuid: 0x%x",
+ APPL_TRACE_DEBUG( "bta_jv_service_select found uuid: 0x%x",
p_data->service_select.uuid);
break;
}
@@ -1286,7 +1286,7 @@
p_tmp = p_tmp->p_next_rec;
} /* end of while */
}
- APPL_TRACE_DEBUG1( "service_len: %d", serv_sel.service_len);
+ APPL_TRACE_DEBUG( "service_len: %d", serv_sel.service_len);
if(bta_jv_cb.p_dm_cback)
bta_jv_cb.p_dm_cback(BTA_JV_SERVICE_SEL_EVT, (tBTA_JV *)&serv_sel);
#endif
@@ -1406,7 +1406,7 @@
ptr = aa->p_value;
type = *ptr;
next_ptr = sdpu_get_len_from_type(ptr + 1, *ptr, &len);
- APPL_TRACE_DEBUG3( "bta_jv_add_attribute: ptr chg:%d len:%d, size:%d",
+ APPL_TRACE_DEBUG( "bta_jv_add_attribute: ptr chg:%d len:%d, size:%d",
(next_ptr - ptr), len, aa->value_size);
if(ATTR_ID_SERVICE_RECORD_HDL != aa->attr_id && /* do not allow the SDP record handle to be updated */
((INT32)(next_ptr - ptr + len) == aa->value_size) && /* double check data size */
@@ -1490,7 +1490,7 @@
tBTA_JV evt_data;
tBTA_JV_L2C_CB *p_cb = &bta_jv_cb.l2c_cb[BTA_JV_L2C_FOR_SDP_HDL];
- APPL_TRACE_DEBUG2( "bta_jv_sdp_res_cback: %d evt:x%x",
+ APPL_TRACE_DEBUG( "bta_jv_sdp_res_cback: %d evt:x%x",
bta_jv_cb.sdp_for_jv, event);
if(!bta_jv_cb.sdp_for_jv)
@@ -1510,7 +1510,7 @@
case SDP_EVT_DATA_IND:
evt_data.handle = BTA_JV_L2C_FOR_SDP_HDL;
memcpy(p_bta_jv_cfg->p_sdp_raw_data, p_data->data.p_data, p_data->data.data_len);
- APPL_TRACE_DEBUG2( "data size: %d/%d ", bta_jv_cb.sdp_data_size, p_data->data.data_len);
+ APPL_TRACE_DEBUG( "data size: %d/%d ", bta_jv_cb.sdp_data_size, p_data->data.data_len);
bta_jv_cb.sdp_data_size = p_data->data.data_len;
p_cb->p_cback(BTA_JV_L2CAP_DATA_IND_EVT, &evt_data);
break;
@@ -1530,7 +1530,7 @@
{
tBTA_JV_L2CAP_CLOSE close;
tBTA_JV_L2C_CB *p_cb = &bta_jv_cb.l2c_cb[BTA_JV_L2C_FOR_SDP_HDL];
- APPL_TRACE_DEBUG1( "bta_jv_sdp_cback: result:x%x", result);
+ APPL_TRACE_DEBUG( "bta_jv_sdp_cback: result:x%x", result);
if(p_cb->p_cback)
{
@@ -1647,7 +1647,7 @@
if (p_cback)
p_cback(BTA_JV_L2CAP_CLOSE_EVT, (tBTA_JV *)&evt_data);
else
- APPL_TRACE_ERROR0("### NO CALLBACK SET !!! ###");
+ APPL_TRACE_ERROR("### NO CALLBACK SET !!! ###");
#endif
}
@@ -1871,7 +1871,7 @@
{
tBTA_JV_RFC_CB *p_cb = bta_jv_rfc_port_to_cb(port_handle);
tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
- APPL_TRACE_DEBUG3("bta_jv_port_data_co_cback, p_cb:%p, p_pcb:%p, len:%d",
+ APPL_TRACE_DEBUG("bta_jv_port_data_co_cback, p_cb:%p, p_pcb:%p, len:%d",
p_cb, p_pcb, len);
if (p_pcb != NULL)
{
@@ -1884,7 +1884,7 @@
case DATA_CO_CALLBACK_TYPE_OUTGOING:
return bta_co_rfc_data_outgoing(p_pcb->user_data, buf, len);
default:
- APPL_TRACE_ERROR1("unknown callout type:%d", type);
+ APPL_TRACE_ERROR("unknown callout type:%d", type);
break;
}
}
@@ -1910,11 +1910,11 @@
UINT16 lcid;
tBTA_JV_RFCOMM_CBACK *p_cback; /* the callback function */
- APPL_TRACE_DEBUG2( "bta_jv_port_mgmt_cl_cback:code:%d, port_handle%d", code, port_handle);
+ APPL_TRACE_DEBUG( "bta_jv_port_mgmt_cl_cback:code:%d, port_handle%d", code, port_handle);
if(NULL == p_cb || NULL == p_cb->p_cback)
return;
- APPL_TRACE_DEBUG3( "bta_jv_port_mgmt_cl_cback code=%d port_handle:%d handle:%d",
+ APPL_TRACE_DEBUG( "bta_jv_port_mgmt_cl_cback code=%d port_handle:%d handle:%d",
code, port_handle, p_cb->handle);
PORT_CheckConnection(port_handle, rem_bda, &lcid);
@@ -1961,11 +1961,11 @@
tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
tBTA_JV evt_data;
- APPL_TRACE_DEBUG1( "bta_jv_port_event_cl_cback:%d", port_handle);
+ APPL_TRACE_DEBUG( "bta_jv_port_event_cl_cback:%d", port_handle);
if(NULL == p_cb || NULL == p_cb->p_cback)
return;
- APPL_TRACE_DEBUG3( "bta_jv_port_event_cl_cback code=x%x port_handle:%d handle:%d",
+ APPL_TRACE_DEBUG( "bta_jv_port_event_cl_cback code=x%x port_handle:%d handle:%d",
code, port_handle, p_cb->handle);
if (code & PORT_EV_RXCHAR)
{
@@ -2020,14 +2020,14 @@
BTM_SEC_PROTO_RFCOMM, cc->remote_scn) == FALSE)
{
evt_data.status = BTA_JV_FAILURE;
- APPL_TRACE_ERROR2("sec_id:%d is zero or BTM_SetSecurityLevel failed, remote_scn:%d", sec_id, cc->remote_scn);
+ APPL_TRACE_ERROR("sec_id:%d is zero or BTM_SetSecurityLevel failed, remote_scn:%d", sec_id, cc->remote_scn);
}
if (evt_data.status == BTA_JV_SUCCESS &&
RFCOMM_CreateConnection(UUID_SERVCLASS_SERIAL_PORT, cc->remote_scn, FALSE,
BTA_JV_DEF_RFC_MTU, cc->peer_bd_addr, &handle, bta_jv_port_mgmt_cl_cback) != PORT_SUCCESS)
{
- APPL_TRACE_ERROR0("bta_jv_rfcomm_connect, RFCOMM_CreateConnection failed");
+ APPL_TRACE_ERROR("bta_jv_rfcomm_connect, RFCOMM_CreateConnection failed");
evt_data.status = BTA_JV_FAILURE;
}
if (evt_data.status == BTA_JV_SUCCESS)
@@ -2059,7 +2059,7 @@
else
{
evt_data.status = BTA_JV_FAILURE;
- APPL_TRACE_ERROR0("run out of rfc control block");
+ APPL_TRACE_ERROR("run out of rfc control block");
}
}
cc->p_cback(BTA_JV_RFCOMM_CL_INIT_EVT, (tBTA_JV *)&evt_data, cc->user_data);
@@ -2085,13 +2085,13 @@
{
*pcb = &bta_jv_cb.port_cb[i];
*cb = &bta_jv_cb.rfc_cb[rfc_handle - 1];
- APPL_TRACE_DEBUG4("find_rfc_pcb(): FOUND rfc_cb_handle 0x%x, port.jv_handle:"
+ APPL_TRACE_DEBUG("find_rfc_pcb(): FOUND rfc_cb_handle 0x%x, port.jv_handle:"
" 0x%x, state: %d, rfc_cb->handle: 0x%x", rfc_handle, (*pcb)->handle,
(*pcb)->state, (*cb)->handle);
return 1;
}
}
- APPL_TRACE_DEBUG1("find_rfc_pcb: cannot find rfc_cb from user data:%d", (UINT32)user_data);
+ APPL_TRACE_DEBUG("find_rfc_pcb: cannot find rfc_cb from user data:%d", (UINT32)user_data);
return 0;
}
@@ -2109,10 +2109,10 @@
tBTA_JV_API_RFCOMM_CLOSE *cc = &(p_data->rfcomm_close);
tBTA_JV_RFC_CB *p_cb = NULL;
tBTA_JV_PCB *p_pcb = NULL;
- APPL_TRACE_DEBUG1("bta_jv_rfcomm_close, rfc handle:%d", cc->handle);
+ APPL_TRACE_DEBUG("bta_jv_rfcomm_close, rfc handle:%d", cc->handle);
if (!cc->handle)
{
- APPL_TRACE_ERROR0("bta_jv_rfcomm_close, rfc handle is null");
+ APPL_TRACE_ERROR("bta_jv_rfcomm_close, rfc handle is null");
return;
}
@@ -2120,7 +2120,7 @@
if (!find_rfc_pcb(user_data, &p_cb, &p_pcb))
return;
bta_jv_free_rfc_cb(p_cb, p_pcb);
- APPL_TRACE_DEBUG2("bta_jv_rfcomm_close: sec id in use:%d, rfc_cb in use:%d",
+ APPL_TRACE_DEBUG("bta_jv_rfcomm_close: sec id in use:%d, rfc_cb in use:%d",
get_sec_id_used(), get_rfc_cb_used());
}
@@ -2143,15 +2143,15 @@
UINT16 lcid;
UINT8 num;
UINT32 si;
- APPL_TRACE_DEBUG2("bta_jv_port_mgmt_sr_cback, code:%d, port_handle:%d", code, port_handle);
+ APPL_TRACE_DEBUG("bta_jv_port_mgmt_sr_cback, code:%d, port_handle:%d", code, port_handle);
if(NULL == p_cb || NULL == p_cb->p_cback)
{
- APPL_TRACE_ERROR2("bta_jv_port_mgmt_sr_cback, p_cb:%p, p_cb->p_cback%p",
+ APPL_TRACE_ERROR("bta_jv_port_mgmt_sr_cback, p_cb:%p, p_cb->p_cback%p",
p_cb, p_cb ? p_cb->p_cback : NULL);
return;
}
void *user_data = p_pcb->user_data;
- APPL_TRACE_DEBUG5( "bta_jv_port_mgmt_sr_cback code=%d port_handle:0x%x handle:0x%x, p_pcb:%p, user:%d",
+ APPL_TRACE_DEBUG( "bta_jv_port_mgmt_sr_cback code=%d port_handle:0x%x handle:0x%x, p_pcb:%p, user:%d",
code, port_handle, p_cb->handle, p_pcb, p_pcb->user_data);
PORT_CheckConnection(port_handle, rem_bda, &lcid);
@@ -2166,11 +2166,11 @@
{
evt_data.rfc_srv_open.new_listen_handle = p_pcb_new_listen->handle;
p_pcb_new_listen->user_data = p_cb->p_cback(BTA_JV_RFCOMM_SRV_OPEN_EVT, &evt_data, user_data);
- APPL_TRACE_DEBUG2("PORT_SUCCESS: curr_sess:%d, max_sess:%d", p_cb->curr_sess, p_cb->max_sess);
+ APPL_TRACE_DEBUG("PORT_SUCCESS: curr_sess:%d, max_sess:%d", p_cb->curr_sess, p_cb->max_sess);
failed = FALSE;
}
else
- APPL_TRACE_ERROR0("bta_jv_add_rfc_port failed to create new listen port");
+ APPL_TRACE_ERROR("bta_jv_add_rfc_port failed to create new listen port");
}
if (failed)
{
@@ -2181,7 +2181,7 @@
p_pcb->cong = FALSE;
tBTA_JV_RFCOMM_CBACK *p_cback = p_cb->p_cback;
- APPL_TRACE_DEBUG2("PORT_CLOSED before BTA_JV_RFCOMM_CLOSE_EVT: curr_sess:%d, max_sess:%d",
+ APPL_TRACE_DEBUG("PORT_CLOSED before BTA_JV_RFCOMM_CLOSE_EVT: curr_sess:%d, max_sess:%d",
p_cb->curr_sess, p_cb->max_sess);
if(BTA_JV_ST_SR_CLOSING == p_pcb->state)
{
@@ -2192,7 +2192,7 @@
p_cback(BTA_JV_RFCOMM_CLOSE_EVT, &evt_data, user_data);
//bta_jv_free_rfc_cb(p_cb, p_pcb);
- APPL_TRACE_DEBUG2("PORT_CLOSED after BTA_JV_RFCOMM_CLOSE_EVT: curr_sess:%d, max_sess:%d",
+ APPL_TRACE_DEBUG("PORT_CLOSED after BTA_JV_RFCOMM_CLOSE_EVT: curr_sess:%d, max_sess:%d",
p_cb->curr_sess, p_cb->max_sess);
}
}
@@ -2215,7 +2215,7 @@
if(NULL == p_cb || NULL == p_cb->p_cback)
return;
- APPL_TRACE_DEBUG3( "bta_jv_port_event_sr_cback code=x%x port_handle:%d handle:%d",
+ APPL_TRACE_DEBUG( "bta_jv_port_event_sr_cback code=x%x port_handle:%d handle:%d",
code, port_handle, p_cb->handle);
void *user_data = p_pcb->user_data;
@@ -2268,14 +2268,14 @@
listen++;
if(p_pcb_open == p_pcb)
{
- APPL_TRACE_DEBUG1("bta_jv_add_rfc_port, port_handle:%d, change the listen port to open state",
+ APPL_TRACE_DEBUG("bta_jv_add_rfc_port, port_handle:%d, change the listen port to open state",
p_pcb->port_handle);
p_pcb->state = BTA_JV_ST_SR_OPEN;
}
else
{
- APPL_TRACE_ERROR3("bta_jv_add_rfc_port, open pcb not matching listen one,"
+ APPL_TRACE_ERROR("bta_jv_add_rfc_port, open pcb not matching listen one,"
"listen count:%d, listen pcb handle:%d, open pcb:%d",
listen, p_pcb->port_handle, p_pcb_open->handle);
return NULL;
@@ -2289,7 +2289,7 @@
}
}
- APPL_TRACE_DEBUG5("bta_jv_add_rfc_port max_sess=%d used:%d curr_sess:%d, listen:%d si:%d",
+ APPL_TRACE_DEBUG("bta_jv_add_rfc_port max_sess=%d used:%d curr_sess:%d, listen:%d si:%d",
p_cb->max_sess, used, p_cb->curr_sess, listen, si);
if (used < p_cb->max_sess && listen == 1 && si)
{
@@ -2315,14 +2315,14 @@
FALSE-POSITIVE: port_state is initialized at PORT_GetState() */
PORT_SetState(p_pcb->port_handle, &port_state);
p_pcb->handle = BTA_JV_RFC_H_S_TO_HDL(p_cb->handle, si);
- APPL_TRACE_DEBUG2("bta_jv_add_rfc_port: p_pcb->handle:0x%x, curr_sess:%d",
+ APPL_TRACE_DEBUG("bta_jv_add_rfc_port: p_pcb->handle:0x%x, curr_sess:%d",
p_pcb->handle, p_cb->curr_sess);
}
}
else
- APPL_TRACE_ERROR0("bta_jv_add_rfc_port, cannot create new rfc listen port");
+ APPL_TRACE_ERROR("bta_jv_add_rfc_port, cannot create new rfc listen port");
}
- APPL_TRACE_DEBUG2("bta_jv_add_rfc_port: sec id in use:%d, rfc_cb in use:%d",
+ APPL_TRACE_DEBUG("bta_jv_add_rfc_port: sec id in use:%d, rfc_cb in use:%d",
get_sec_id_used(), get_rfc_cb_used());
return p_pcb;
}
@@ -2351,7 +2351,7 @@
L2CA_SetDesireRole(rs->role);
*/
evt_data.status = BTA_JV_FAILURE;
- APPL_TRACE_DEBUG2("bta_jv_rfcomm_start_server: sec id in use:%d, rfc_cb in use:%d",
+ APPL_TRACE_DEBUG("bta_jv_rfcomm_start_server: sec id in use:%d, rfc_cb in use:%d",
get_sec_id_used(), get_rfc_cb_used());
do
@@ -2362,14 +2362,14 @@
BTM_SetSecurityLevel(FALSE, "JV PORT", sec_id, rs->sec_mask,
BT_PSM_RFCOMM, BTM_SEC_PROTO_RFCOMM, rs->local_scn) == FALSE)
{
- APPL_TRACE_ERROR0("bta_jv_rfcomm_start_server, run out of sec_id");
+ APPL_TRACE_ERROR("bta_jv_rfcomm_start_server, run out of sec_id");
break;
}
if (RFCOMM_CreateConnection(sec_id, rs->local_scn, TRUE,
BTA_JV_DEF_RFC_MTU, (UINT8 *) bd_addr_any, &handle, bta_jv_port_mgmt_sr_cback) != PORT_SUCCESS)
{
- APPL_TRACE_ERROR0("bta_jv_rfcomm_start_server, RFCOMM_CreateConnection failed");
+ APPL_TRACE_ERROR("bta_jv_rfcomm_start_server, RFCOMM_CreateConnection failed");
break;
}
@@ -2377,7 +2377,7 @@
p_cb = bta_jv_alloc_rfc_cb(handle, &p_pcb);
if(!p_cb)
{
- APPL_TRACE_ERROR0("bta_jv_rfcomm_start_server, run out of rfc control block");
+ APPL_TRACE_ERROR("bta_jv_rfcomm_start_server, run out of rfc control block");
break;
}
@@ -2432,19 +2432,19 @@
tBTA_JV_API_RFCOMM_SERVER *ls = &(p_data->rfcomm_server);
tBTA_JV_RFC_CB *p_cb = NULL;
tBTA_JV_PCB *p_pcb = NULL;
- APPL_TRACE_ERROR0("bta_jv_rfcomm_stop_server");
+ APPL_TRACE_ERROR("bta_jv_rfcomm_stop_server");
if(!ls->handle)
{
- APPL_TRACE_ERROR0("bta_jv_rfcomm_stop_server, jv handle is null");
+ APPL_TRACE_ERROR("bta_jv_rfcomm_stop_server, jv handle is null");
return;
}
void* user_data = ls->user_data;
if(!find_rfc_pcb(user_data, &p_cb, &p_pcb))
return;
- APPL_TRACE_DEBUG2("bta_jv_rfcomm_stop_server: p_pcb:%p, p_pcb->port_handle:%d",
+ APPL_TRACE_DEBUG("bta_jv_rfcomm_stop_server: p_pcb:%p, p_pcb->port_handle:%d",
p_pcb, p_pcb->port_handle);
bta_jv_free_rfc_cb(p_cb, p_pcb);
- APPL_TRACE_DEBUG2("bta_jv_rfcomm_stop_server: sec id in use:%d, rfc_cb in use:%d",
+ APPL_TRACE_DEBUG("bta_jv_rfcomm_stop_server: sec id in use:%d, rfc_cb in use:%d",
get_sec_id_used(), get_rfc_cb_used());
}
@@ -2513,7 +2513,7 @@
}
else
{
- APPL_TRACE_ERROR0("bta_jv_rfcomm_write :: WARNING ! No JV callback set");
+ APPL_TRACE_ERROR("bta_jv_rfcomm_write :: WARNING ! No JV callback set");
}
}
@@ -2531,7 +2531,7 @@
tBTA_JV_STATUS status;
tBTA_JV_PM_CB *p_cb;
- APPL_TRACE_API3("bta_jv_set_pm_profile(handle: 0x%x, app_id: %d, init_st: %d)",
+ APPL_TRACE_API("bta_jv_set_pm_profile(handle: 0x%x, app_id: %d, init_st: %d)",
p_data->set_pm.handle, p_data->set_pm.app_id, p_data->set_pm.init_st);
/* clear PM control block */
@@ -2541,7 +2541,7 @@
if (status != BTA_JV_SUCCESS)
{
- APPL_TRACE_WARNING1("bta_jv_set_pm_profile() free pm cb failed: reason %d",
+ APPL_TRACE_WARNING("bta_jv_set_pm_profile() free pm cb failed: reason %d",
status);
}
}
@@ -2553,7 +2553,7 @@
if (NULL != p_cb)
bta_jv_pm_state_change(p_cb, p_data->set_pm.init_st);
else
- APPL_TRACE_WARNING0("bta_jv_alloc_set_pm_profile_cb() failed");
+ APPL_TRACE_WARNING("bta_jv_alloc_set_pm_profile_cb() failed");
}
}
@@ -2597,7 +2597,7 @@
if (NULL == p_cb)
return status;
- APPL_TRACE_API2("bta_jv_set_pm_conn_state(handle:0x%x, state: %d)", p_cb->handle,
+ APPL_TRACE_API("bta_jv_set_pm_conn_state(handle:0x%x, state: %d)", p_cb->handle,
new_st);
if ((p_msg = (tBTA_JV_API_PM_STATE_CHANGE *)GKI_getbuf(
sizeof(tBTA_JV_API_PM_STATE_CHANGE))) != NULL)
@@ -2658,7 +2658,7 @@
*******************************************************************************/
static void bta_jv_pm_state_change(tBTA_JV_PM_CB *p_cb, const tBTA_JV_CONN_STATE state)
{
- APPL_TRACE_API5("bta_jv_pm_state_change(p_cb: 0x%x, handle: 0x%x, busy/idle_state: %d"
+ APPL_TRACE_API("bta_jv_pm_state_change(p_cb: 0x%x, handle: 0x%x, busy/idle_state: %d"
", app_id: %d, conn_state: %d)", p_cb, p_cb->handle, p_cb->state,
p_cb->app_id, state);
@@ -2699,7 +2699,7 @@
break;
default:
- APPL_TRACE_WARNING1("bta_jv_pm_state_change(state: %d): Invalid state", state);
+ APPL_TRACE_WARNING("bta_jv_pm_state_change(state: %d): Invalid state", state);
break;
}
}
diff --git a/bta/jv/bta_jv_api.c b/bta/jv/bta_jv_api.c
index c91eacf..e0d100d 100644
--- a/bta/jv/bta_jv_api.c
+++ b/bta/jv/bta_jv_api.c
@@ -63,7 +63,7 @@
tBTA_JV_API_ENABLE *p_buf;
int i;
- APPL_TRACE_API0( "BTA_JvEnable");
+ APPL_TRACE_API( "BTA_JvEnable");
if(p_cback && FALSE == bta_sys_is_register(BTA_ID_JV))
{
memset(&bta_jv_cb, 0, sizeof(tBTA_JV_CB));
@@ -86,7 +86,7 @@
}
else
{
- APPL_TRACE_ERROR0("JVenable fails");
+ APPL_TRACE_ERROR("JVenable fails");
}
return(status);
}
@@ -104,7 +104,7 @@
{
BT_HDR *p_buf;
- APPL_TRACE_API0( "BTA_JvDisable");
+ APPL_TRACE_API( "BTA_JvDisable");
bta_sys_deregister(BTA_ID_JV);
if ((p_buf = (BT_HDR *) GKI_getbuf(sizeof(BT_HDR))) != NULL)
{
@@ -147,7 +147,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_SET_DISCOVERABILITY *p_msg;
- APPL_TRACE_API0( "BTA_JvSetDiscoverability");
+ APPL_TRACE_API( "BTA_JvSetDiscoverability");
if ((p_msg = (tBTA_JV_API_SET_DISCOVERABILITY *)GKI_getbuf(sizeof(tBTA_JV_MSG))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_SET_DISCOVERABILITY_EVT;
@@ -171,7 +171,7 @@
*******************************************************************************/
tBTA_JV_DISC BTA_JvGetDiscoverability(void)
{
- APPL_TRACE_API0( "BTA_JvGetDiscoverability");
+ APPL_TRACE_API( "BTA_JvGetDiscoverability");
return BTM_ReadDiscoverability(0, 0);
}
@@ -192,7 +192,7 @@
tBTA_JV_STATUS ret = BTA_JV_FAILURE;
BT_HDR *p_msg;
- APPL_TRACE_API0( "BTA_JvGetLocalDeviceAddr");
+ APPL_TRACE_API( "BTA_JvGetLocalDeviceAddr");
if ((p_msg = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR))) != NULL)
{
p_msg->event = BTA_JV_API_GET_LOCAL_DEVICE_ADDR_EVT;
@@ -220,7 +220,7 @@
tBTA_JV_STATUS ret = BTA_JV_FAILURE;
BT_HDR *p_msg;
- APPL_TRACE_API0( "BTA_JvGetLocalDeviceName");
+ APPL_TRACE_API( "BTA_JvGetLocalDeviceName");
if ((p_msg = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR))) != NULL)
{
p_msg->event = BTA_JV_API_GET_LOCAL_DEVICE_NAME_EVT;
@@ -248,7 +248,7 @@
tBTA_JV_STATUS ret = BTA_JV_FAILURE;
tBTA_JV_API_GET_REMOTE_NAME *p_msg;
- APPL_TRACE_API0( "BTA_JvGetRemoteDeviceName");
+ APPL_TRACE_API( "BTA_JvGetRemoteDeviceName");
if ((p_msg = (tBTA_JV_API_GET_REMOTE_NAME *)GKI_getbuf(sizeof(tBTA_JV_API_GET_REMOTE_NAME))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_GET_REMOTE_DEVICE_NAME_EVT;
@@ -279,7 +279,7 @@
UINT32 count = 0;
INT32 ret = BTA_JV_INTERNAL_ERR;
- APPL_TRACE_API0( "BTA_JvGetPreknownDevice");
+ APPL_TRACE_API( "BTA_JvGetPreknownDevice");
p_info = BTM_InqFirstResult();
if(p_info)
{
@@ -346,7 +346,7 @@
*******************************************************************************/
UINT8 * BTA_JvGetDeviceClass(void)
{
- APPL_TRACE_API0( "BTA_JvGetDeviceClass");
+ APPL_TRACE_API( "BTA_JvGetDeviceClass");
return BTM_ReadDeviceClass();
}
@@ -365,7 +365,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_SET_SERVICE_CLASS *p_msg;
- APPL_TRACE_API0( "BTA_JvSetServiceClass");
+ APPL_TRACE_API( "BTA_JvSetServiceClass");
if ((p_msg = (tBTA_JV_API_SET_SERVICE_CLASS *)GKI_getbuf(sizeof(tBTA_JV_API_SET_SERVICE_CLASS))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_SET_SERVICE_CLASS_EVT;
@@ -395,7 +395,7 @@
tBTA_JV_STATUS ret = BTA_JV_FAILURE;
tBTA_JV_API_SET_ENCRYPTION *p_msg;
- APPL_TRACE_API0( "BTA_JvSetEncryption");
+ APPL_TRACE_API( "BTA_JvSetEncryption");
if ((p_msg = (tBTA_JV_API_SET_ENCRYPTION *)GKI_getbuf(sizeof(tBTA_JV_API_SET_ENCRYPTION))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_SET_ENCRYPTION_EVT;
@@ -541,7 +541,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
BT_HDR *p_msg;
- APPL_TRACE_API0( "BTA_JvGetSCN");
+ APPL_TRACE_API( "BTA_JvGetSCN");
if ((p_msg = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR))) != NULL)
{
p_msg->event = BTA_JV_API_GET_SCN_EVT;
@@ -568,7 +568,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_FREE_SCN *p_msg;
- APPL_TRACE_API0( "BTA_JvFreeSCN");
+ APPL_TRACE_API( "BTA_JvFreeSCN");
if ((p_msg = (tBTA_JV_API_FREE_SCN *)GKI_getbuf(sizeof(tBTA_JV_API_FREE_SCN))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_FREE_SCN_EVT;
@@ -595,7 +595,7 @@
UINT16 BTA_JvGetPSM(void)
{
#if 0
- APPL_TRACE_API0( "BTA_JvGetPSM");
+ APPL_TRACE_API( "BTA_JvGetPSM");
return (L2CA_AllocatePSM());
#endif
@@ -622,7 +622,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_START_DISCOVERY *p_msg;
- APPL_TRACE_API0( "BTA_JvStartDiscovery");
+ APPL_TRACE_API( "BTA_JvStartDiscovery");
if ((p_msg = (tBTA_JV_API_START_DISCOVERY *)GKI_getbuf(sizeof(tBTA_JV_API_START_DISCOVERY))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_START_DISCOVERY_EVT;
@@ -656,7 +656,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_CANCEL_DISCOVERY *p_msg;
- APPL_TRACE_API0( "BTA_JvCancelDiscovery");
+ APPL_TRACE_API( "BTA_JvCancelDiscovery");
if ((p_msg = (tBTA_JV_API_CANCEL_DISCOVERY *)GKI_getbuf(sizeof(tBTA_JV_API_CANCEL_DISCOVERY))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_CANCEL_DISCOVERY_EVT;
@@ -687,7 +687,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_GET_SERVICES_LENGTH *p_msg;
- APPL_TRACE_API0( "BTA_JvGetServicesLength");
+ APPL_TRACE_API( "BTA_JvGetServicesLength");
if ((p_msg = (tBTA_JV_API_GET_SERVICES_LENGTH *)GKI_getbuf(sizeof(tBTA_JV_API_GET_SERVICES_LENGTH))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_GET_SERVICES_LENGTH_EVT;
@@ -724,7 +724,7 @@
UINT32 len;
UINT32 hdr_len;
- APPL_TRACE_API0( "BTA_JvGetServicesResult");
+ APPL_TRACE_API( "BTA_JvGetServicesResult");
if(p_bta_jv_cfg->p_sdp_db->p_first_rec)
{
/* the database is valid */
@@ -781,7 +781,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_SERVICE_SELECT *p_msg;
- APPL_TRACE_API0( "BTA_JvServiceSelect");
+ APPL_TRACE_API( "BTA_JvServiceSelect");
if ((p_msg = (tBTA_JV_API_SERVICE_SELECT *)GKI_getbuf(sizeof(tBTA_JV_API_SERVICE_SELECT))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_SERVICE_SELECT_EVT;
@@ -808,7 +808,7 @@
{
INT32 serv_sel = -1;
- APPL_TRACE_API0( "BTA_JvServiceResult");
+ APPL_TRACE_API( "BTA_JvServiceResult");
if(bta_jv_cb.p_sel_raw_data)
{
serv_sel = bta_jv_cb.sel_len;
@@ -836,7 +836,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_CREATE_RECORD *p_msg;
- APPL_TRACE_API0( "BTA_JvCreateRecordByUser");
+ APPL_TRACE_API( "BTA_JvCreateRecordByUser");
if ((p_msg = (tBTA_JV_API_CREATE_RECORD *)GKI_getbuf(sizeof(tBTA_JV_API_CREATE_RECORD))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_CREATE_RECORD_EVT;
@@ -872,7 +872,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_UPDATE_RECORD *p_msg;
- APPL_TRACE_API0( "BTA_JvUpdateRecord");
+ APPL_TRACE_API( "BTA_JvUpdateRecord");
if ((p_msg = (tBTA_JV_API_UPDATE_RECORD *)GKI_getbuf(sizeof(tBTA_JV_API_UPDATE_RECORD))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_UPDATE_RECORD_EVT;
@@ -907,7 +907,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_ADD_ATTRIBUTE *p_msg;
- APPL_TRACE_API0( "BTA_JvAddAttribute");
+ APPL_TRACE_API( "BTA_JvAddAttribute");
if ((p_msg = (tBTA_JV_API_ADD_ATTRIBUTE *)GKI_getbuf(sizeof(tBTA_JV_API_ADD_ATTRIBUTE))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_ADD_ATTRIBUTE_EVT;
@@ -938,7 +938,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_ADD_ATTRIBUTE *p_msg;
- APPL_TRACE_API0( "BTA_JvDeleteAttribute");
+ APPL_TRACE_API( "BTA_JvDeleteAttribute");
if ((p_msg = (tBTA_JV_API_ADD_ATTRIBUTE *)GKI_getbuf(sizeof(tBTA_JV_API_ADD_ATTRIBUTE))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_DELETE_ATTRIBUTE_EVT;
@@ -965,7 +965,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_ADD_ATTRIBUTE *p_msg;
- APPL_TRACE_API0( "BTA_JvDeleteRecord");
+ APPL_TRACE_API( "BTA_JvDeleteRecord");
if ((p_msg = (tBTA_JV_API_ADD_ATTRIBUTE *)GKI_getbuf(sizeof(tBTA_JV_API_ADD_ATTRIBUTE))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_DELETE_RECORD_EVT;
@@ -1024,7 +1024,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_L2CAP_CONNECT *p_msg;
- APPL_TRACE_API0( "BTA_JvL2capConnect");
+ APPL_TRACE_API( "BTA_JvL2capConnect");
if (p_cback &&
(p_msg = (tBTA_JV_API_L2CAP_CONNECT *)GKI_getbuf(sizeof(tBTA_JV_API_L2CAP_CONNECT))) != NULL)
{
@@ -1057,7 +1057,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_L2CAP_CLOSE *p_msg;
- APPL_TRACE_API0( "BTA_JvL2capClose");
+ APPL_TRACE_API( "BTA_JvL2capClose");
if (handle < BTA_JV_MAX_L2C_CONN && bta_jv_cb.l2c_cb[handle].p_cback &&
(p_msg = (tBTA_JV_API_L2CAP_CLOSE *)GKI_getbuf(sizeof(tBTA_JV_API_L2CAP_CLOSE))) != NULL)
{
@@ -1092,7 +1092,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_L2CAP_SERVER *p_msg;
- APPL_TRACE_API0( "BTA_JvL2capStartServer");
+ APPL_TRACE_API( "BTA_JvL2capStartServer");
if (p_cback &&
(p_msg = (tBTA_JV_API_L2CAP_SERVER *)GKI_getbuf(sizeof(tBTA_JV_API_L2CAP_SERVER))) != NULL)
{
@@ -1125,7 +1125,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_L2CAP_SERVER *p_msg;
- APPL_TRACE_API0( "BTA_JvL2capStopServer");
+ APPL_TRACE_API( "BTA_JvL2capStopServer");
if ((p_msg = (tBTA_JV_API_L2CAP_SERVER *)GKI_getbuf(sizeof(tBTA_JV_API_L2CAP_SERVER))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_L2CAP_STOP_SERVER_EVT;
@@ -1165,7 +1165,7 @@
#endif
tBTA_JV_L2CAP_READ evt_data;
- APPL_TRACE_API0( "BTA_JvL2capRead");
+ APPL_TRACE_API( "BTA_JvL2capRead");
#if SDP_FOR_JV_INCLUDED == TRUE
if(BTA_JV_L2C_FOR_SDP_HDL == handle)
@@ -1231,7 +1231,7 @@
UINT32 left_over = 0;
UINT16 max_len, read_len;
- APPL_TRACE_API0( "BTA_JvL2capReceive");
+ APPL_TRACE_API( "BTA_JvL2capReceive");
if (handle < BTA_JV_MAX_L2C_CONN && bta_jv_cb.l2c_cb[handle].p_cback)
{
@@ -1278,7 +1278,7 @@
#if 0
tBTA_JV_STATUS status = BTA_JV_FAILURE;
- APPL_TRACE_API1( "BTA_JvL2capReady: %d", handle);
+ APPL_TRACE_API( "BTA_JvL2capReady: %d", handle);
if (p_data_size && handle < BTA_JV_MAX_L2C_CONN && bta_jv_cb.l2c_cb[handle].p_cback)
{
*p_data_size = 0;
@@ -1319,7 +1319,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_L2CAP_WRITE *p_msg;
- APPL_TRACE_API0( "BTA_JvL2capWrite");
+ APPL_TRACE_API( "BTA_JvL2capWrite");
if (handle < BTA_JV_MAX_L2C_CONN && bta_jv_cb.l2c_cb[handle].p_cback &&
(p_msg = (tBTA_JV_API_L2CAP_WRITE *)GKI_getbuf(sizeof(tBTA_JV_API_L2CAP_WRITE))) != NULL)
{
@@ -1358,7 +1358,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_RFCOMM_CONNECT *p_msg;
- APPL_TRACE_API0( "BTA_JvRfcommConnect");
+ APPL_TRACE_API( "BTA_JvRfcommConnect");
if (p_cback &&
(p_msg = (tBTA_JV_API_RFCOMM_CONNECT *)GKI_getbuf(sizeof(tBTA_JV_API_RFCOMM_CONNECT))) != NULL)
{
@@ -1393,7 +1393,7 @@
UINT32 hi = ((handle & BTA_JV_RFC_HDL_MASK)&~BTA_JV_RFCOMM_MASK) - 1;
UINT32 si = BTA_JV_RFC_HDL_TO_SIDX(handle);
- APPL_TRACE_API0( "BTA_JvRfcommClose");
+ APPL_TRACE_API( "BTA_JvRfcommClose");
if (hi < BTA_JV_MAX_RFC_CONN && bta_jv_cb.rfc_cb[hi].p_cback &&
si < BTA_JV_MAX_RFC_SR_SESSION && bta_jv_cb.rfc_cb[hi].rfc_hdl[si] &&
(p_msg = (tBTA_JV_API_RFCOMM_CLOSE *)GKI_getbuf(sizeof(tBTA_JV_API_RFCOMM_CLOSE))) != NULL)
@@ -1432,7 +1432,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_RFCOMM_SERVER *p_msg;
- APPL_TRACE_API0( "BTA_JvRfcommStartServer");
+ APPL_TRACE_API( "BTA_JvRfcommStartServer");
if (p_cback &&
(p_msg = (tBTA_JV_API_RFCOMM_SERVER *)GKI_getbuf(sizeof(tBTA_JV_API_RFCOMM_SERVER))) != NULL)
{
@@ -1440,7 +1440,7 @@
max_session = 1;
if (max_session > BTA_JV_MAX_RFC_SR_SESSION)
{
- APPL_TRACE_DEBUG2( "max_session is too big. use max (%d)", max_session, BTA_JV_MAX_RFC_SR_SESSION);
+ APPL_TRACE_DEBUG( "max_session is too big. use max (%d)", max_session, BTA_JV_MAX_RFC_SR_SESSION);
max_session = BTA_JV_MAX_RFC_SR_SESSION;
}
p_msg->hdr.event = BTA_JV_API_RFCOMM_START_SERVER_EVT;
@@ -1472,7 +1472,7 @@
{
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_RFCOMM_SERVER *p_msg;
- APPL_TRACE_API0( "BTA_JvRfcommStopServer");
+ APPL_TRACE_API( "BTA_JvRfcommStopServer");
if ((p_msg = (tBTA_JV_API_RFCOMM_SERVER *)GKI_getbuf(sizeof(tBTA_JV_API_RFCOMM_SERVER))) != NULL)
{
p_msg->hdr.event = BTA_JV_API_RFCOMM_STOP_SERVER_EVT;
@@ -1503,7 +1503,7 @@
UINT32 hi = ((handle & BTA_JV_RFC_HDL_MASK)&~BTA_JV_RFCOMM_MASK) - 1;
UINT32 si = BTA_JV_RFC_HDL_TO_SIDX(handle);
- APPL_TRACE_API0( "BTA_JvRfcommRead");
+ APPL_TRACE_API( "BTA_JvRfcommRead");
if (hi < BTA_JV_MAX_RFC_CONN && bta_jv_cb.rfc_cb[hi].p_cback &&
si < BTA_JV_MAX_RFC_SR_SESSION && bta_jv_cb.rfc_cb[hi].rfc_hdl[si] &&
(p_msg = (tBTA_JV_API_RFCOMM_READ *)GKI_getbuf(sizeof(tBTA_JV_API_RFCOMM_READ))) != NULL)
@@ -1563,7 +1563,7 @@
UINT32 hi = ((handle & BTA_JV_RFC_HDL_MASK)&~BTA_JV_RFCOMM_MASK) - 1;
UINT32 si = BTA_JV_RFC_HDL_TO_SIDX(handle);
- APPL_TRACE_API0( "BTA_JvRfcommReady");
+ APPL_TRACE_API( "BTA_JvRfcommReady");
if (hi < BTA_JV_MAX_RFC_CONN && bta_jv_cb.rfc_cb[hi].p_cback &&
si < BTA_JV_MAX_RFC_SR_SESSION && bta_jv_cb.rfc_cb[hi].rfc_hdl[si])
{
@@ -1593,8 +1593,8 @@
UINT32 hi = ((handle & BTA_JV_RFC_HDL_MASK)&~BTA_JV_RFCOMM_MASK) - 1;
UINT32 si = BTA_JV_RFC_HDL_TO_SIDX(handle);
- APPL_TRACE_API0( "BTA_JvRfcommWrite");
- APPL_TRACE_DEBUG3( "handle:0x%x, hi:%d, si:%d", handle, hi, si);
+ APPL_TRACE_API( "BTA_JvRfcommWrite");
+ APPL_TRACE_DEBUG( "handle:0x%x, hi:%d, si:%d", handle, hi, si);
if (hi < BTA_JV_MAX_RFC_CONN && bta_jv_cb.rfc_cb[hi].p_cback &&
si < BTA_JV_MAX_RFC_SR_SESSION && bta_jv_cb.rfc_cb[hi].rfc_hdl[si] &&
(p_msg = (tBTA_JV_API_RFCOMM_WRITE *)GKI_getbuf(sizeof(tBTA_JV_API_RFCOMM_WRITE))) != NULL)
@@ -1604,7 +1604,7 @@
p_msg->req_id = req_id;
p_msg->p_cb = &bta_jv_cb.rfc_cb[hi];
p_msg->p_pcb = &bta_jv_cb.port_cb[p_msg->p_cb->rfc_hdl[si] - 1];
- APPL_TRACE_API0( "write ok");
+ APPL_TRACE_API( "write ok");
bta_sys_sendmsg(p_msg);
status = BTA_JV_SUCCESS;
}
@@ -1637,7 +1637,7 @@
tBTA_JV_STATUS status = BTA_JV_FAILURE;
tBTA_JV_API_SET_PM_PROFILE *p_msg;
- APPL_TRACE_API2("BTA_JVSetPmProfile handle:0x%x, app_id:%d", handle, app_id);
+ APPL_TRACE_API("BTA_JVSetPmProfile handle:0x%x, app_id:%d", handle, app_id);
if ((p_msg = (tBTA_JV_API_SET_PM_PROFILE *)GKI_getbuf(sizeof(tBTA_JV_API_SET_PM_PROFILE)))
!= NULL)
{
diff --git a/bta/pan/bta_pan_act.c b/bta/pan/bta_pan_act.c
index b01e95a..575416e 100644
--- a/bta/pan/bta_pan_act.c
+++ b/bta/pan/bta_pan_act.c
@@ -177,7 +177,7 @@
p_new_buf = (BT_HDR *)GKI_getpoolbuf( PAN_POOL_ID );
if(!p_new_buf)
{
- APPL_TRACE_WARNING0("Cannot get a PAN GKI buffer");
+ APPL_TRACE_WARNING("Cannot get a PAN GKI buffer");
GKI_freebuf( p_buf );
return;
}
diff --git a/bta/pan/bta_pan_main.c b/bta/pan/bta_pan_main.c
index 5ed545f..7fa0508 100644
--- a/bta/pan/bta_pan_main.c
+++ b/bta/pan/bta_pan_main.c
@@ -180,7 +180,7 @@
if (!p_scb->in_use)
{
p_scb->in_use = TRUE;
- APPL_TRACE_DEBUG1("bta_pan_scb_alloc %d", i);
+ APPL_TRACE_DEBUG("bta_pan_scb_alloc %d", i);
break;
}
}
@@ -189,7 +189,7 @@
{
/* out of scbs */
p_scb = NULL;
- APPL_TRACE_WARNING0("Out of scbs");
+ APPL_TRACE_WARNING("Out of scbs");
}
return p_scb;
}
@@ -210,7 +210,7 @@
UINT8 action;
int i;
- APPL_TRACE_EVENT3("PAN scb=%d event=0x%x state=%d", bta_pan_scb_to_idx(p_scb), event, p_scb->state);
+ APPL_TRACE_EVENT("PAN scb=%d event=0x%x state=%d", bta_pan_scb_to_idx(p_scb), event, p_scb->state);
/* look up the state table for the current state */
state_table = bta_pan_st_tbl[p_scb->state];
@@ -312,7 +312,7 @@
*******************************************************************************/
void bta_pan_scb_dealloc(tBTA_PAN_SCB *p_scb)
{
- APPL_TRACE_DEBUG1("bta_pan_scb_dealloc %d", bta_pan_scb_to_idx(p_scb));
+ APPL_TRACE_DEBUG("bta_pan_scb_dealloc %d", bta_pan_scb_to_idx(p_scb));
memset(p_scb, 0, sizeof(tBTA_PAN_SCB));
}
@@ -358,7 +358,7 @@
}
- APPL_TRACE_WARNING1("No scb for handle %d", handle);
+ APPL_TRACE_WARNING("No scb for handle %d", handle);
return NULL;
}
diff --git a/bta/sys/bta_sys_main.c b/bta/sys/bta_sys_main.c
index a440f52..0219290 100644
--- a/bta/sys/bta_sys_main.c
+++ b/bta/sys/bta_sys_main.c
@@ -205,7 +205,7 @@
UINT8 action;
int i;
- APPL_TRACE_EVENT2("bta_sys_sm_execute state:%d, event:0x%x", bta_sys_cb.state, p_msg->event);
+ APPL_TRACE_EVENT("bta_sys_sm_execute state:%d, event:0x%x", bta_sys_cb.state, p_msg->event);
/* look up the state table for the current state */
state_table = bta_sys_st_tbl[bta_sys_cb.state];
@@ -255,7 +255,7 @@
tBTA_SYS_HW_MSG *sys_event;
- APPL_TRACE_DEBUG1(" bta_sys_hw_btm_cback was called with parameter: %i" , status );
+ APPL_TRACE_DEBUG(" bta_sys_hw_btm_cback was called with parameter: %i" , status );
/* send a message to BTA SYS */
if ((sys_event = (tBTA_SYS_HW_MSG *) GKI_getbuf(sizeof(tBTA_SYS_HW_MSG))) != NULL)
@@ -278,7 +278,7 @@
}
else
{
- APPL_TRACE_DEBUG0("ERROR bta_sys_hw_btm_cback couldn't send msg" );
+ APPL_TRACE_DEBUG("ERROR bta_sys_hw_btm_cback couldn't send msg" );
}
}
@@ -299,7 +299,7 @@
UINT8 module_index;
UNUSED(p_sys_hw_msg);
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
for (module_index = 0; module_index < BTA_SYS_MAX_HW_MODULES; module_index++)
{
@@ -352,7 +352,7 @@
bta_sys_cb.sys_hw_cback[p_sys_hw_msg->hw_module ]( BTA_SYS_HW_ON_EVT );
}
- APPL_TRACE_EVENT2 ("bta_sys_hw_api_enable for %d, active modules 0x%04X",
+ APPL_TRACE_EVENT ("bta_sys_hw_api_enable for %d, active modules 0x%04X",
p_sys_hw_msg->hw_module, bta_sys_cb.sys_hw_module_active);
}
@@ -369,7 +369,7 @@
*******************************************************************************/
void bta_sys_hw_api_disable(tBTA_SYS_HW_MSG *p_sys_hw_msg)
{
- APPL_TRACE_DEBUG2("bta_sys_hw_api_disable for %d, active modules: 0x%04X",
+ APPL_TRACE_DEBUG("bta_sys_hw_api_disable for %d, active modules: 0x%04X",
p_sys_hw_msg->hw_module, bta_sys_cb.sys_hw_module_active );
/* make sure the related SW blocks were stopped */
@@ -410,7 +410,7 @@
*******************************************************************************/
void bta_sys_hw_evt_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg)
{
- APPL_TRACE_EVENT1("bta_sys_hw_evt_enabled for %i", p_sys_hw_msg->hw_module);
+ APPL_TRACE_EVENT("bta_sys_hw_evt_enabled for %i", p_sys_hw_msg->hw_module);
#if ( defined BTM_AUTOMATIC_HCI_RESET && BTM_AUTOMATIC_HCI_RESET == TRUE )
/* If device is already up, send a fake "BTM DEVICE UP" using BTA SYS state machine */
@@ -443,7 +443,7 @@
{
UINT8 hw_module_index;
- APPL_TRACE_DEBUG1("bta_sys_hw_evt_disabled - module 0x%X", p_sys_hw_msg->hw_module);
+ APPL_TRACE_DEBUG("bta_sys_hw_evt_disabled - module 0x%X", p_sys_hw_msg->hw_module);
for (hw_module_index = 0; hw_module_index < BTA_SYS_MAX_HW_MODULES; hw_module_index++)
{
@@ -467,7 +467,7 @@
UINT8 hw_module_index;
UNUSED(p_sys_hw_msg);
- APPL_TRACE_DEBUG0(" bta_sys_hw_evt_stack_enabled!notify the callers");
+ APPL_TRACE_DEBUG(" bta_sys_hw_evt_stack_enabled!notify the callers");
for (hw_module_index = 0; hw_module_index < BTA_SYS_MAX_HW_MODULES; hw_module_index++ )
{
@@ -494,7 +494,7 @@
UINT8 id;
BOOLEAN freebuf = TRUE;
- APPL_TRACE_EVENT1("BTA got event 0x%x", p_msg->event);
+ APPL_TRACE_EVENT("BTA got event 0x%x", p_msg->event);
/* get subsystem id from event */
id = (UINT8) (p_msg->event >> 8);
@@ -506,7 +506,7 @@
}
else
{
- APPL_TRACE_WARNING1("BTA got unregistered event id %d", id);
+ APPL_TRACE_WARNING("BTA got unregistered event id %d", id);
}
if (freebuf)
@@ -642,7 +642,7 @@
int bta_id = 0;
int bta_id_max = 0;
- APPL_TRACE_DEBUG1("bta_sys_disable: module %i", module);
+ APPL_TRACE_DEBUG("bta_sys_disable: module %i", module);
switch( module )
{
@@ -663,7 +663,7 @@
bta_id_max = BTA_ID_GPS;
break;
default:
- APPL_TRACE_WARNING0("bta_sys_disable: unkown module");
+ APPL_TRACE_WARNING("bta_sys_disable: unkown module");
return;
}
diff --git a/btif/co/bta_ag_co.c b/btif/co/bta_ag_co.c
index 9c6de7d..56a11e6 100644
--- a/btif/co/bta_ag_co.c
+++ b/btif/co/bta_ag_co.c
@@ -76,7 +76,7 @@
void bta_ag_co_audio_state(UINT16 handle, UINT8 app_id, UINT8 state)
{
UNUSED(app_id);
- BTIF_TRACE_DEBUG2("bta_ag_co_audio_state: handle %d, state %d", handle, state);
+ BTIF_TRACE_DEBUG("bta_ag_co_audio_state: handle %d, state %d", handle, state);
}
@@ -95,7 +95,7 @@
*******************************************************************************/
void bta_ag_co_data_open(UINT16 handle, tBTA_SERVICE_ID service)
{
- BTIF_TRACE_DEBUG2("bta_ag_co_data_open handle:%d service:%d", handle, service);
+ BTIF_TRACE_DEBUG("bta_ag_co_data_open handle:%d service:%d", handle, service);
}
/*******************************************************************************
@@ -111,7 +111,7 @@
*******************************************************************************/
void bta_ag_co_data_close(UINT16 handle)
{
- BTIF_TRACE_DEBUG1("bta_ag_co_data_close handle:%d", handle);
+ BTIF_TRACE_DEBUG("bta_ag_co_data_close handle:%d", handle);
}
@@ -130,6 +130,6 @@
void bta_ag_co_tx_write(UINT16 handle, UINT8 * p_data, UINT16 len)
{
UNUSED(p_data);
- BTIF_TRACE_DEBUG2( "bta_ag_co_tx_write: handle: %d, len: %d", handle, len );
+ BTIF_TRACE_DEBUG( "bta_ag_co_tx_write: handle: %d, len: %d", handle, len );
}
diff --git a/btif/co/bta_av_co.c b/btif/co/bta_av_co.c
index a0cc344..78a1128 100644
--- a/btif/co/bta_av_co.c
+++ b/btif/co/bta_av_co.c
@@ -42,7 +42,7 @@
** Constants
*****************************************************************************/
-#define FUNC_TRACE() APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+#define FUNC_TRACE() APPL_TRACE_DEBUG("%s", __FUNCTION__);
/* Macro to retrieve the number of elements in a statically allocated array */
#define BTA_AV_CO_NUM_ELEMENTS(__a) (sizeof(__a)/sizeof((__a)[0]))
@@ -254,7 +254,7 @@
/* Sanity check */
if (index >= BTA_AV_CO_NUM_ELEMENTS(bta_av_co_cb.peers))
{
- APPL_TRACE_ERROR1("bta_av_co_get_peer peer index out of bounds:%d", index);
+ APPL_TRACE_ERROR("bta_av_co_get_peer peer index out of bounds:%d", index);
return NULL;
}
@@ -279,7 +279,7 @@
{
FUNC_TRACE();
- APPL_TRACE_DEBUG1("bta_av_co_audio_init: %d", index);
+ APPL_TRACE_DEBUG("bta_av_co_audio_init: %d", index);
#if defined(BTA_AV_CO_CP_SCMS_T) && (BTA_AV_CO_CP_SCMS_T == TRUE)
{
@@ -346,21 +346,21 @@
FUNC_TRACE();
- APPL_TRACE_DEBUG4("bta_av_co_audio_disc_res h:x%x num_seps:%d num_snk:%d num_src:%d",
+ APPL_TRACE_DEBUG("bta_av_co_audio_disc_res h:x%x num_seps:%d num_snk:%d num_src:%d",
hndl, num_seps, num_snk, num_src);
/* Find the peer info */
p_peer = bta_av_co_get_peer(hndl);
if (p_peer == NULL)
{
- APPL_TRACE_ERROR0("bta_av_co_audio_disc_res could not find peer entry");
+ APPL_TRACE_ERROR("bta_av_co_audio_disc_res could not find peer entry");
return;
}
/* Sanity check : this should never happen */
if (p_peer->opened)
{
- APPL_TRACE_ERROR0("bta_av_co_audio_disc_res peer already opened");
+ APPL_TRACE_ERROR("bta_av_co_audio_disc_res peer already opened");
}
/* Copy the discovery results */
@@ -399,7 +399,7 @@
/* parse configuration */
if ((status = A2D_ParsSbcInfo(&src_cap, p_src_cap, TRUE)) != 0)
{
- APPL_TRACE_DEBUG1(" Cant parse src cap ret = %d", status);
+ APPL_TRACE_DEBUG(" Cant parse src cap ret = %d", status);
return ;
}
@@ -469,20 +469,20 @@
FUNC_TRACE();
- APPL_TRACE_DEBUG3("bta_av_audio_sink_getconfig handle:0x%x codec_type:%d seid:%d",
+ APPL_TRACE_DEBUG("bta_av_audio_sink_getconfig handle:0x%x codec_type:%d seid:%d",
hndl, codec_type, seid);
- APPL_TRACE_DEBUG4("num_protect:0x%02x protect_info:0x%02x%02x%02x",
+ APPL_TRACE_DEBUG("num_protect:0x%02x protect_info:0x%02x%02x%02x",
*p_num_protect, p_protect_info[0], p_protect_info[1], p_protect_info[2]);
/* Retrieve the peer info */
p_peer = bta_av_co_get_peer(hndl);
if (p_peer == NULL)
{
- APPL_TRACE_ERROR0("bta_av_audio_sink_getconfig could not find peer entry");
+ APPL_TRACE_ERROR("bta_av_audio_sink_getconfig could not find peer entry");
return A2D_FAIL;
}
- APPL_TRACE_DEBUG4("bta_av_audio_sink_getconfig peer(o=%d,n_snks=%d,n_rx_snks=%d,n_sup_snks=%d)",
+ APPL_TRACE_DEBUG("bta_av_audio_sink_getconfig peer(o=%d,n_snks=%d,n_rx_snks=%d,n_sup_snks=%d)",
p_peer->opened, p_peer->num_srcs, p_peer->num_rx_srcs, p_peer->num_sup_srcs);
p_peer->num_rx_srcs++;
@@ -506,7 +506,7 @@
{
p_src = &p_peer->srcs[p_peer->num_sup_srcs++];
- APPL_TRACE_DEBUG6("bta_av_audio_sink_getconfig saved caps[%x:%x:%x:%x:%x:%x]",
+ APPL_TRACE_DEBUG("bta_av_audio_sink_getconfig saved caps[%x:%x:%x:%x:%x:%x]",
p_codec_info[1], p_codec_info[2], p_codec_info[3],
p_codec_info[4], p_codec_info[5], p_codec_info[6]);
@@ -519,7 +519,7 @@
}
else
{
- APPL_TRACE_ERROR0("bta_av_audio_sink_getconfig no more room for SRC info");
+ APPL_TRACE_ERROR("bta_av_audio_sink_getconfig no more room for SRC info");
}
}
@@ -527,7 +527,7 @@
if ((p_peer->num_rx_srcs == p_peer->num_srcs) ||
(p_peer->num_sup_srcs == BTA_AV_CO_NUM_ELEMENTS(p_peer->srcs)))
{
- APPL_TRACE_DEBUG0("bta_av_audio_sink_getconfig last SRC reached");
+ APPL_TRACE_DEBUG("bta_av_audio_sink_getconfig last SRC reached");
/* Protect access to bta_av_co_cb.codec_cfg */
GKI_disable();
@@ -535,7 +535,7 @@
/* Find a src that matches the codec config */
if (bta_av_co_audio_peer_src_supports_codec(p_peer, &index))
{
- APPL_TRACE_DEBUG0(" Codec Supported ");
+ APPL_TRACE_DEBUG(" Codec Supported ");
p_src = &p_peer->srcs[index];
/* Build the codec configuration for this sink */
@@ -546,7 +546,7 @@
bta_av_build_src_cfg(pref_cfg, p_src->codec_caps);
memcpy(p_peer->codec_cfg, pref_cfg, AVDT_CODEC_SIZE);
- APPL_TRACE_DEBUG6("bta_av_audio_sink_getconfig p_codec_info[%x:%x:%x:%x:%x:%x]",
+ APPL_TRACE_DEBUG("bta_av_audio_sink_getconfig p_codec_info[%x:%x:%x:%x:%x:%x]",
p_peer->codec_cfg[1], p_peer->codec_cfg[2], p_peer->codec_cfg[3],
p_peer->codec_cfg[4], p_peer->codec_cfg[5], p_peer->codec_cfg[6]);
/* By default, no content protection */
@@ -608,7 +608,7 @@
p_peer = bta_av_co_get_peer(hndl);
if (p_peer == NULL)
{
- APPL_TRACE_ERROR0("bta_av_co_audio_getconfig could not find peer entry");
+ APPL_TRACE_ERROR("bta_av_co_audio_getconfig could not find peer entry");
return A2D_FAIL;
}
@@ -618,12 +618,12 @@
seid, p_num_protect, p_protect_info);
return result;
}
- APPL_TRACE_DEBUG3("bta_av_co_audio_getconfig handle:0x%x codec_type:%d seid:%d",
+ APPL_TRACE_DEBUG("bta_av_co_audio_getconfig handle:0x%x codec_type:%d seid:%d",
hndl, codec_type, seid);
- APPL_TRACE_DEBUG4("num_protect:0x%02x protect_info:0x%02x%02x%02x",
+ APPL_TRACE_DEBUG("num_protect:0x%02x protect_info:0x%02x%02x%02x",
*p_num_protect, p_protect_info[0], p_protect_info[1], p_protect_info[2]);
- APPL_TRACE_DEBUG4("bta_av_co_audio_getconfig peer(o=%d,n_snks=%d,n_rx_snks=%d,n_sup_snks=%d)",
+ APPL_TRACE_DEBUG("bta_av_co_audio_getconfig peer(o=%d,n_snks=%d,n_rx_snks=%d,n_sup_snks=%d)",
p_peer->opened, p_peer->num_snks, p_peer->num_rx_snks, p_peer->num_sup_snks);
p_peer->num_rx_snks++;
@@ -647,7 +647,7 @@
{
p_sink = &p_peer->snks[p_peer->num_sup_snks++];
- APPL_TRACE_DEBUG6("bta_av_co_audio_getconfig saved caps[%x:%x:%x:%x:%x:%x]",
+ APPL_TRACE_DEBUG("bta_av_co_audio_getconfig saved caps[%x:%x:%x:%x:%x:%x]",
p_codec_info[1], p_codec_info[2], p_codec_info[3],
p_codec_info[4], p_codec_info[5], p_codec_info[6]);
@@ -660,7 +660,7 @@
}
else
{
- APPL_TRACE_ERROR0("bta_av_co_audio_getconfig no more room for SNK info");
+ APPL_TRACE_ERROR("bta_av_co_audio_getconfig no more room for SNK info");
}
}
@@ -668,7 +668,7 @@
if ((p_peer->num_rx_snks == p_peer->num_snks) ||
(p_peer->num_sup_snks == BTA_AV_CO_NUM_ELEMENTS(p_peer->snks)))
{
- APPL_TRACE_DEBUG0("bta_av_co_audio_getconfig last sink reached");
+ APPL_TRACE_DEBUG("bta_av_co_audio_getconfig last sink reached");
/* Protect access to bta_av_co_cb.codec_cfg */
GKI_disable();
@@ -680,7 +680,7 @@
if (p_peer->acp)
{
*p_sep_info_idx = p_peer->num_seps;
- APPL_TRACE_EVENT0("no need to fetch more SEPs");
+ APPL_TRACE_EVENT("no need to fetch more SEPs");
}
p_sink = &p_peer->snks[index];
@@ -688,7 +688,7 @@
/* Build the codec configuration for this sink */
if (bta_av_co_audio_codec_build_config(p_sink->codec_caps, codec_cfg))
{
- APPL_TRACE_DEBUG6("bta_av_co_audio_getconfig reconfig p_codec_info[%x:%x:%x:%x:%x:%x]",
+ APPL_TRACE_DEBUG("bta_av_co_audio_getconfig reconfig p_codec_info[%x:%x:%x:%x:%x:%x]",
codec_cfg[1], codec_cfg[2], codec_cfg[3],
codec_cfg[4], codec_cfg[5], codec_cfg[6]);
@@ -720,7 +720,7 @@
{
if (p_peer->recfg_needed)
{
- APPL_TRACE_DEBUG1("bta_av_co_audio_getconfig call BTA_AvReconfig(x%x)", hndl);
+ APPL_TRACE_DEBUG("bta_av_co_audio_getconfig call BTA_AvReconfig(x%x)", hndl);
BTA_AvReconfig(hndl, TRUE, p_sink->sep_info_idx, p_peer->codec_cfg, *p_num_protect, (UINT8 *)bta_av_co_cp_scmst);
}
}
@@ -764,29 +764,29 @@
FUNC_TRACE();
- APPL_TRACE_DEBUG6("bta_av_co_audio_setconfig p_codec_info[%x:%x:%x:%x:%x:%x]",
+ APPL_TRACE_DEBUG("bta_av_co_audio_setconfig p_codec_info[%x:%x:%x:%x:%x:%x]",
p_codec_info[1], p_codec_info[2], p_codec_info[3],
p_codec_info[4], p_codec_info[5], p_codec_info[6]);
- APPL_TRACE_DEBUG4("num_protect:0x%02x protect_info:0x%02x%02x%02x",
+ APPL_TRACE_DEBUG("num_protect:0x%02x protect_info:0x%02x%02x%02x",
num_protect, p_protect_info[0], p_protect_info[1], p_protect_info[2]);
/* Retrieve the peer info */
p_peer = bta_av_co_get_peer(hndl);
if (p_peer == NULL)
{
- APPL_TRACE_ERROR0("bta_av_co_audio_setconfig could not find peer entry");
+ APPL_TRACE_ERROR("bta_av_co_audio_setconfig could not find peer entry");
/* Call call-in rejecting the configuration */
bta_av_ci_setconfig(hndl, A2D_BUSY, AVDT_ASC_CODEC, 0, NULL, FALSE, avdt_handle);
return;
}
- APPL_TRACE_DEBUG4("bta_av_co_audio_setconfig peer(o=%d,n_snks=%d,n_rx_snks=%d,n_sup_snks=%d)",
+ APPL_TRACE_DEBUG("bta_av_co_audio_setconfig peer(o=%d,n_snks=%d,n_rx_snks=%d,n_sup_snks=%d)",
p_peer->opened, p_peer->num_snks, p_peer->num_rx_snks, p_peer->num_sup_snks);
/* Sanity check: should not be opened at this point */
if (p_peer->opened)
{
- APPL_TRACE_ERROR0("bta_av_co_audio_setconfig peer already in use");
+ APPL_TRACE_ERROR("bta_av_co_audio_setconfig peer already in use");
}
#if defined(BTA_AV_CO_CP_SCMS_T) && (BTA_AV_CO_CP_SCMS_T == TRUE)
@@ -796,7 +796,7 @@
if ((num_protect != 1) ||
(bta_av_co_cp_is_scmst(p_protect_info) == FALSE))
{
- APPL_TRACE_ERROR0("bta_av_co_audio_setconfig wrong CP configuration");
+ APPL_TRACE_ERROR("bta_av_co_audio_setconfig wrong CP configuration");
status = A2D_BAD_CP_TYPE;
category = AVDT_ASC_PROTECT;
}
@@ -805,7 +805,7 @@
/* Do not support content protection for the time being */
if (num_protect != 0)
{
- APPL_TRACE_ERROR0("bta_av_co_audio_setconfig wrong CP configuration");
+ APPL_TRACE_ERROR("bta_av_co_audio_setconfig wrong CP configuration");
status = A2D_BAD_CP_TYPE;
category = AVDT_ASC_PROTECT;
}
@@ -815,12 +815,12 @@
if(AVDT_TSEP_SNK == t_local_sep)
{
codec_cfg_supported = bta_av_co_audio_sink_supports_config(codec_type, p_codec_info);
- APPL_TRACE_DEBUG0(" Peer is A2DP SRC ");
+ APPL_TRACE_DEBUG(" Peer is A2DP SRC ");
}
if(AVDT_TSEP_SRC == t_local_sep)
{
codec_cfg_supported = bta_av_co_audio_media_supports_config(codec_type, p_codec_info);
- APPL_TRACE_DEBUG0(" Peer is A2DP SINK ");
+ APPL_TRACE_DEBUG(" Peer is A2DP SINK ");
}
/* Check if codec configuration is supported */
if (codec_cfg_supported)
@@ -844,7 +844,7 @@
/* if remote side requests a restricted notify sinks preferred bitpool range as all other params are
already checked for validify */
- APPL_TRACE_EVENT2("remote peer setconfig bitpool range [%d:%d]",
+ APPL_TRACE_EVENT("remote peer setconfig bitpool range [%d:%d]",
p_codec_info[BTA_AV_CO_SBC_MIN_BITPOOL_OFF],
p_codec_info[BTA_AV_CO_SBC_MAX_BITPOOL_OFF] );
@@ -861,7 +861,7 @@
default:
- APPL_TRACE_ERROR1("bta_av_co_audio_setconfig unsupported cid %d", bta_av_co_cb.codec_cfg.id);
+ APPL_TRACE_ERROR("bta_av_co_audio_setconfig unsupported cid %d", bta_av_co_cb.codec_cfg.id);
recfg_needed = TRUE;
break;
}
@@ -877,7 +877,7 @@
if (status != A2D_SUCCESS)
{
- APPL_TRACE_DEBUG2("bta_av_co_audio_setconfig reject s=%d c=%d", status, category);
+ APPL_TRACE_DEBUG("bta_av_co_audio_setconfig reject s=%d c=%d", status, category);
/* Call call-in rejecting the configuration */
bta_av_ci_setconfig(hndl, status, category, 0, NULL, FALSE, avdt_handle);
@@ -888,7 +888,7 @@
p_peer->acp = TRUE;
p_peer->recfg_needed = recfg_needed;
- APPL_TRACE_DEBUG1("bta_av_co_audio_setconfig accept reconf=%d", recfg_needed);
+ APPL_TRACE_DEBUG("bta_av_co_audio_setconfig accept reconf=%d", recfg_needed);
/* Call call-in accepting the configuration */
bta_av_ci_setconfig(hndl, A2D_SUCCESS, A2D_SUCCESS, 0, NULL, recfg_needed, avdt_handle);
@@ -914,13 +914,13 @@
FUNC_TRACE();
- APPL_TRACE_DEBUG2("bta_av_co_audio_open mtu:%d codec_type:%d", mtu, codec_type);
+ APPL_TRACE_DEBUG("bta_av_co_audio_open mtu:%d codec_type:%d", mtu, codec_type);
/* Retrieve the peer info */
p_peer = bta_av_co_get_peer(hndl);
if (p_peer == NULL)
{
- APPL_TRACE_ERROR0("bta_av_co_audio_setconfig could not find peer entry");
+ APPL_TRACE_ERROR("bta_av_co_audio_setconfig could not find peer entry");
}
else
{
@@ -949,7 +949,7 @@
FUNC_TRACE();
- APPL_TRACE_DEBUG0("bta_av_co_audio_close");
+ APPL_TRACE_DEBUG("bta_av_co_audio_close");
/* Retrieve the peer info */
p_peer = bta_av_co_get_peer(hndl);
@@ -960,7 +960,7 @@
}
else
{
- APPL_TRACE_ERROR0("bta_av_co_audio_close could not find peer entry");
+ APPL_TRACE_ERROR("bta_av_co_audio_close could not find peer entry");
}
/* reset remote preference through setconfig */
@@ -988,7 +988,7 @@
FUNC_TRACE();
- APPL_TRACE_DEBUG0("bta_av_co_audio_start");
+ APPL_TRACE_DEBUG("bta_av_co_audio_start");
}
@@ -1010,7 +1010,7 @@
FUNC_TRACE();
- APPL_TRACE_DEBUG0("bta_av_co_audio_stop");
+ APPL_TRACE_DEBUG("bta_av_co_audio_stop");
}
/*******************************************************************************
@@ -1050,7 +1050,7 @@
default:
- APPL_TRACE_ERROR1("bta_av_co_audio_src_data_path Unsupported codec type (%d)", codec_type);
+ APPL_TRACE_ERROR("bta_av_co_audio_src_data_path Unsupported codec type (%d)", codec_type);
break;
}
#if defined(BTA_AV_CO_CP_SCMS_T) && (BTA_AV_CO_CP_SCMS_T == TRUE)
@@ -1085,7 +1085,7 @@
{
FUNC_TRACE();
- APPL_TRACE_ERROR1("bta_av_co_audio_drop dropped: x%x", hndl);
+ APPL_TRACE_ERROR("bta_av_co_audio_drop dropped: x%x", hndl);
}
/*******************************************************************************
@@ -1103,7 +1103,7 @@
{
FUNC_TRACE();
- APPL_TRACE_ERROR2("bta_av_co_audio_delay handle: x%x, delay:0x%x", hndl, delay);
+ APPL_TRACE_ERROR("bta_av_co_audio_delay handle: x%x, delay:0x%x", hndl, delay);
}
@@ -1134,12 +1134,12 @@
p_codec_cfg[BTA_AV_CO_SBC_MIN_BITPOOL_OFF] = p_codec_caps[BTA_AV_CO_SBC_MIN_BITPOOL_OFF];
p_codec_cfg[BTA_AV_CO_SBC_MAX_BITPOOL_OFF] = p_codec_caps[BTA_AV_CO_SBC_MAX_BITPOOL_OFF];
- APPL_TRACE_EVENT2("bta_av_co_audio_codec_build_config : bitpool min %d, max %d",
+ APPL_TRACE_EVENT("bta_av_co_audio_codec_build_config : bitpool min %d, max %d",
p_codec_cfg[BTA_AV_CO_SBC_MIN_BITPOOL_OFF],
p_codec_caps[BTA_AV_CO_SBC_MAX_BITPOOL_OFF]);
break;
default:
- APPL_TRACE_ERROR1("bta_av_co_audio_codec_build_config: unsupported codec id %d", bta_av_co_cb.codec_cfg.id);
+ APPL_TRACE_ERROR("bta_av_co_audio_codec_build_config: unsupported codec id %d", bta_av_co_cb.codec_cfg.id);
return FALSE;
break;
}
@@ -1163,7 +1163,7 @@
{
case BTIF_AV_CODEC_SBC:
- APPL_TRACE_EVENT4("bta_av_co_audio_codec_cfg_matches_caps : min %d/%d max %d/%d",
+ APPL_TRACE_EVENT("bta_av_co_audio_codec_cfg_matches_caps : min %d/%d max %d/%d",
p_codec_caps[BTA_AV_CO_SBC_MIN_BITPOOL_OFF],
p_codec_cfg[BTA_AV_CO_SBC_MIN_BITPOOL_OFF],
p_codec_caps[BTA_AV_CO_SBC_MAX_BITPOOL_OFF],
@@ -1173,7 +1173,7 @@
if (!((p_codec_caps[BTA_AV_CO_SBC_FREQ_CHAN_OFF] & p_codec_cfg[BTA_AV_CO_SBC_FREQ_CHAN_OFF]) &&
(p_codec_caps[BTA_AV_CO_SBC_BLOCK_BAND_OFF] & p_codec_cfg[BTA_AV_CO_SBC_BLOCK_BAND_OFF])))
{
- APPL_TRACE_EVENT4("FALSE %x %x %x %x",
+ APPL_TRACE_EVENT("FALSE %x %x %x %x",
p_codec_caps[BTA_AV_CO_SBC_FREQ_CHAN_OFF],
p_codec_cfg[BTA_AV_CO_SBC_FREQ_CHAN_OFF],
p_codec_caps[BTA_AV_CO_SBC_BLOCK_BAND_OFF],
@@ -1184,11 +1184,11 @@
default:
- APPL_TRACE_ERROR1("bta_av_co_audio_codec_cfg_matches_caps: unsupported codec id %d", codec_id);
+ APPL_TRACE_ERROR("bta_av_co_audio_codec_cfg_matches_caps: unsupported codec id %d", codec_id);
return FALSE;
break;
}
- APPL_TRACE_EVENT0("TRUE");
+ APPL_TRACE_EVENT("TRUE");
return TRUE;
}
@@ -1246,7 +1246,7 @@
STREAM_TO_UINT16(cp_id, p_protectinfo);
if (cp_id == BTA_AV_CP_SCMS_T_ID)
{
- APPL_TRACE_DEBUG0("bta_av_co_cp_is_scmst: SCMS-T found");
+ APPL_TRACE_DEBUG("bta_av_co_cp_is_scmst: SCMS-T found");
return TRUE;
}
}
@@ -1284,7 +1284,7 @@
/* Decrement the SC counter */
index--;
}
- APPL_TRACE_DEBUG0("bta_av_co_audio_sink_has_scmst: SCMS-T not found");
+ APPL_TRACE_DEBUG("bta_av_co_audio_sink_has_scmst: SCMS-T not found");
return FALSE;
}
@@ -1308,7 +1308,7 @@
}
else
{
- APPL_TRACE_DEBUG0("bta_av_co_audio_sink_supports_cp: not required");
+ APPL_TRACE_DEBUG("bta_av_co_audio_sink_supports_cp: not required");
return TRUE;
}
}
@@ -1345,7 +1345,7 @@
default:
- APPL_TRACE_ERROR1("bta_av_co_audio_peer_supports_codec: unsupported codec id %d", bta_av_co_cb.codec_cfg.id);
+ APPL_TRACE_ERROR("bta_av_co_audio_peer_supports_codec: unsupported codec id %d", bta_av_co_cb.codec_cfg.id);
return FALSE;
break;
}
@@ -1389,7 +1389,7 @@
break;
default:
- APPL_TRACE_ERROR1("peer_src_supports_codec: unsupported codec id %d",
+ APPL_TRACE_ERROR("peer_src_supports_codec: unsupported codec id %d",
bta_av_co_cb.codec_cfg.id);
return FALSE;
break;
@@ -1423,7 +1423,7 @@
default:
- APPL_TRACE_ERROR1("bta_av_co_audio_media_supports_config unsupported codec type %d", codec_type);
+ APPL_TRACE_ERROR("bta_av_co_audio_media_supports_config unsupported codec type %d", codec_type);
return FALSE;
break;
}
@@ -1454,7 +1454,7 @@
default:
- APPL_TRACE_ERROR1("bta_av_co_audio_media_supports_config unsupported codec type %d", codec_type);
+ APPL_TRACE_ERROR("bta_av_co_audio_media_supports_config unsupported codec type %d", codec_type);
return FALSE;
break;
}
@@ -1485,7 +1485,7 @@
FUNC_TRACE();
- APPL_TRACE_DEBUG0("bta_av_co_audio_codec_supported");
+ APPL_TRACE_DEBUG("bta_av_co_audio_codec_supported");
/* Check AV feeding is supported */
*p_status = BTIF_ERROR_SRV_AV_FEEDING_NOT_SUPPORTED;
@@ -1502,7 +1502,7 @@
/* Check that this sink is compatible with the CP */
if (!bta_av_co_audio_sink_supports_cp(p_sink))
{
- APPL_TRACE_DEBUG2("bta_av_co_audio_codec_supported sink %d of peer %d doesn't support cp",
+ APPL_TRACE_DEBUG("bta_av_co_audio_codec_supported sink %d of peer %d doesn't support cp",
snk_index, index);
*p_status = BTIF_ERROR_SRV_AV_CP_NOT_SUPPORTED;
return FALSE;
@@ -1538,7 +1538,7 @@
bta_av_co_cb.cp.active = FALSE;
}
#endif
- APPL_TRACE_DEBUG1("bta_av_co_audio_codec_supported call BTA_AvReconfig(x%x)", BTA_AV_CO_AUDIO_INDX_TO_HNDL(index));
+ APPL_TRACE_DEBUG("bta_av_co_audio_codec_supported call BTA_AvReconfig(x%x)", BTA_AV_CO_AUDIO_INDX_TO_HNDL(index));
BTA_AvReconfig(BTA_AV_CO_AUDIO_INDX_TO_HNDL(index), TRUE, p_sink->sep_info_idx,
p_peer->codec_cfg, num_protect, (UINT8 *)bta_av_co_cp_scmst);
}
@@ -1546,7 +1546,7 @@
}
else
{
- APPL_TRACE_DEBUG1("bta_av_co_audio_codec_supported index %d doesn't support codec", index);
+ APPL_TRACE_DEBUG("bta_av_co_audio_codec_supported index %d doesn't support codec", index);
return FALSE;
}
}
@@ -1575,7 +1575,7 @@
if (A2D_BldSbcInfo(A2D_MEDIA_TYPE_AUDIO, (tA2D_SBC_CIE *)&btif_av_sbc_default_config, bta_av_co_cb.codec_cfg.info) != A2D_SUCCESS)
{
- APPL_TRACE_ERROR0("bta_av_co_audio_codec_reset A2D_BldSbcInfo failed");
+ APPL_TRACE_ERROR("bta_av_co_audio_codec_reset A2D_BldSbcInfo failed");
}
GKI_enable();
@@ -1602,7 +1602,7 @@
/* Check AV feeding is supported */
*p_status = BTIF_ERROR_SRV_AV_FEEDING_NOT_SUPPORTED;
- APPL_TRACE_DEBUG1("bta_av_co_audio_set_codec cid=%d", p_feeding->format);
+ APPL_TRACE_DEBUG("bta_av_co_audio_set_codec cid=%d", p_feeding->format);
/* Supported codecs */
switch (p_feeding->format)
@@ -1614,13 +1614,13 @@
if ((p_feeding->cfg.pcm.num_channel != 1) &&
(p_feeding->cfg.pcm.num_channel != 2))
{
- APPL_TRACE_ERROR0("bta_av_co_audio_set_codec PCM channel number unsupported");
+ APPL_TRACE_ERROR("bta_av_co_audio_set_codec PCM channel number unsupported");
return FALSE;
}
if ((p_feeding->cfg.pcm.bit_per_sample != 8) &&
(p_feeding->cfg.pcm.bit_per_sample != 16))
{
- APPL_TRACE_ERROR0("bta_av_co_audio_set_codec PCM sample size unsupported");
+ APPL_TRACE_ERROR("bta_av_co_audio_set_codec PCM sample size unsupported");
return FALSE;
}
switch (p_feeding->cfg.pcm.sampling_freq)
@@ -1640,21 +1640,21 @@
sbc_config.samp_freq = A2D_SBC_IE_SAMP_FREQ_44;
break;
default:
- APPL_TRACE_ERROR0("bta_av_co_audio_set_codec PCM sampling frequency unsupported");
+ APPL_TRACE_ERROR("bta_av_co_audio_set_codec PCM sampling frequency unsupported");
return FALSE;
break;
}
/* Build the codec config */
if (A2D_BldSbcInfo(A2D_MEDIA_TYPE_AUDIO, &sbc_config, new_cfg.info) != A2D_SUCCESS)
{
- APPL_TRACE_ERROR0("bta_av_co_audio_set_codec A2D_BldSbcInfo failed");
+ APPL_TRACE_ERROR("bta_av_co_audio_set_codec A2D_BldSbcInfo failed");
return FALSE;
}
break;
default:
- APPL_TRACE_ERROR0("bta_av_co_audio_set_codec Feeding format unsupported");
+ APPL_TRACE_ERROR("bta_av_co_audio_set_codec Feeding format unsupported");
return FALSE;
break;
}
@@ -1685,7 +1685,7 @@
tBTA_AV_CO_PEER *p_peer;
tBTA_AV_CO_SINK *p_sink;
- APPL_TRACE_EVENT1("bta_av_co_cb.codec_cfg.id : codec 0x%x", bta_av_co_cb.codec_cfg.id);
+ APPL_TRACE_EVENT("bta_av_co_cb.codec_cfg.id : codec 0x%x", bta_av_co_cb.codec_cfg.id);
/* Minimum MTU is by default very large */
*p_minmtu = 0xFFFF;
@@ -1716,7 +1716,7 @@
p_sbc_config->max_bitpool =
BTA_AV_CO_MIN(p_sink->codec_caps[BTA_AV_CO_SBC_MAX_BITPOOL_OFF],
p_sbc_config->max_bitpool);
- APPL_TRACE_EVENT2("bta_av_co_audio_get_sbc_config : sink bitpool min %d, max %d",
+ APPL_TRACE_EVENT("bta_av_co_audio_get_sbc_config : sink bitpool min %d, max %d",
p_sbc_config->min_bitpool, p_sbc_config->max_bitpool);
break;
}
@@ -1756,7 +1756,7 @@
p_peer = bta_av_co_get_peer(hndl);
if (p_peer == NULL)
{
- APPL_TRACE_ERROR0("bta_av_co_audio_discard_config could not find peer entry");
+ APPL_TRACE_ERROR("bta_av_co_audio_discard_config could not find peer entry");
return;
}
@@ -1814,7 +1814,7 @@
p_peer = bta_av_co_get_peer(hndl);
if (p_peer == NULL)
{
- APPL_TRACE_ERROR0("bta_av_co_peer_cp_supported could not find peer entry");
+ APPL_TRACE_ERROR("bta_av_co_peer_cp_supported could not find peer entry");
return FALSE;
}
@@ -1826,7 +1826,7 @@
return bta_av_co_audio_sink_has_scmst(p_sink);
}
}
- APPL_TRACE_ERROR0("bta_av_co_peer_cp_supported did not find SBC sink");
+ APPL_TRACE_ERROR("bta_av_co_peer_cp_supported did not find SBC sink");
return FALSE;
}
diff --git a/btif/co/bta_dm_co.c b/btif/co/bta_dm_co.c
index abf52bf..f7ecb13 100644
--- a/btif/co/bta_dm_co.c
+++ b/btif/co/bta_dm_co.c
@@ -76,10 +76,10 @@
btif_dm_set_oob_for_io_req(p_oob_data);
#endif
btif_dm_proc_io_req(bd_addr, p_io_cap, p_oob_data, p_auth_req, is_orig);
- BTIF_TRACE_DEBUG1("bta_dm_co_io_req *p_oob_data = %d", *p_oob_data);
- BTIF_TRACE_DEBUG1("bta_dm_co_io_req *p_io_cap = %d", *p_io_cap);
- BTIF_TRACE_DEBUG1("bta_dm_co_io_req *p_auth_req = %d", *p_auth_req);
- BTIF_TRACE_DEBUG1("bta_dm_co_io_req is_orig = %d", is_orig);
+ BTIF_TRACE_DEBUG("bta_dm_co_io_req *p_oob_data = %d", *p_oob_data);
+ BTIF_TRACE_DEBUG("bta_dm_co_io_req *p_io_cap = %d", *p_io_cap);
+ BTIF_TRACE_DEBUG("bta_dm_co_io_req *p_auth_req = %d", *p_auth_req);
+ BTIF_TRACE_DEBUG("bta_dm_co_io_req is_orig = %d", is_orig);
}
/*******************************************************************************
@@ -139,7 +139,7 @@
*******************************************************************************/
void bta_dm_co_loc_oob(BOOLEAN valid, BT_OCTET16 c, BT_OCTET16 r)
{
- BTIF_TRACE_DEBUG1("bta_dm_co_loc_oob, valid = %d", valid);
+ BTIF_TRACE_DEBUG("bta_dm_co_loc_oob, valid = %d", valid);
#ifdef BTIF_DM_OOB_TEST
btif_dm_proc_loc_oob(valid, c, r);
#endif
@@ -168,7 +168,7 @@
result = btif_dm_proc_rmt_oob(bd_addr, p_c, p_r);
#endif
- BTIF_TRACE_DEBUG1("bta_dm_co_rmt_oob: result=%d",result);
+ BTIF_TRACE_DEBUG("bta_dm_co_rmt_oob: result=%d",result);
bta_dm_ci_rmt_oob(result, bd_addr, p_c, p_r);
}
@@ -210,7 +210,7 @@
{
tBTM_SCO_ROUTE_TYPE route = BTA_DM_SCO_ROUTE_PCM;
- BTIF_TRACE_DEBUG0("bta_dm_sco_co_init");
+ BTIF_TRACE_DEBUG("bta_dm_sco_co_init");
/* set up SCO routing configuration if SCO over HCI app ID is used and run time
configuration is set to SCO over HCI */
@@ -230,7 +230,7 @@
/* initialize SCO codec */
if (!btui_sco_codec_init(rx_bw, tx_bw))
{
- BTIF_TRACE_ERROR0("codec initialization exception!");
+ BTIF_TRACE_ERROR("codec initialization exception!");
}
}
@@ -255,7 +255,7 @@
if (btui_cb.sco_hci)
{
- BTIF_TRACE_DEBUG2("bta_dm_sco_co_open handle:%d pkt_size:%d", handle, pkt_size);
+ BTIF_TRACE_DEBUG("bta_dm_sco_co_open handle:%d pkt_size:%d", handle, pkt_size);
/* use dedicated SCO buffer pool for SCO TX data */
cfg.pool_id = HCI_SCO_POOL_ID;
cfg.p_cback = btui_sco_codec_callback;
@@ -281,7 +281,7 @@
{
if (btui_cb.sco_hci)
{
- BTIF_TRACE_DEBUG0("bta_dm_sco_co_close close codec");
+ BTIF_TRACE_DEBUG("bta_dm_sco_co_close close codec");
/* close sco codec */
btui_sco_codec_close();
@@ -344,9 +344,9 @@
tBTA_LE_KEY_TYPE *p_resp_key )
{
UNUSED(bd_addr);
- BTIF_TRACE_ERROR0("##################################");
- BTIF_TRACE_ERROR0("bta_dm_co_le_io_key_req: only setting max size to 16");
- BTIF_TRACE_ERROR0("##################################");
+ BTIF_TRACE_ERROR("##################################");
+ BTIF_TRACE_ERROR("bta_dm_co_le_io_key_req: only setting max size to 16");
+ BTIF_TRACE_ERROR("##################################");
*p_max_key_size = 16;
*p_init_key = *p_resp_key =
(BTA_LE_KEY_PENC|BTA_LE_KEY_PID|BTA_LE_KEY_PCSRK|BTA_LE_KEY_LENC|BTA_LE_KEY_LID|BTA_LE_KEY_LCSRK);
@@ -368,9 +368,9 @@
void bta_dm_co_ble_load_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK *p_key_mask, BT_OCTET16 er,
tBTA_BLE_LOCAL_ID_KEYS *p_id_keys)
{
- BTIF_TRACE_DEBUG0("##################################");
- BTIF_TRACE_DEBUG0("bta_dm_co_ble_load_local_keys: Load local keys if any are persisted");
- BTIF_TRACE_DEBUG0("##################################");
+ BTIF_TRACE_DEBUG("##################################");
+ BTIF_TRACE_DEBUG("bta_dm_co_ble_load_local_keys: Load local keys if any are persisted");
+ BTIF_TRACE_DEBUG("##################################");
btif_dm_get_ble_local_keys( p_key_mask, er, p_id_keys);
}
diff --git a/btif/co/bta_fs_co.c b/btif/co/bta_fs_co.c
index 958fef5..54bb87e 100644
--- a/btif/co/bta_fs_co.c
+++ b/btif/co/bta_fs_co.c
@@ -63,11 +63,11 @@
int ret = 0;
char nameBuffer[PATH_MAX] = {0};
struct stat statBuffer;
- BTIF_TRACE_DEBUG1("in del_path for path:%s", path);
+ BTIF_TRACE_DEBUG("in del_path for path:%s", path);
dir = opendir(path);
if (dir == NULL) {
- BTIF_TRACE_DEBUG1("opendir failed on path:%s", path);
+ BTIF_TRACE_DEBUG("opendir failed on path:%s", path);
return -1;
}
@@ -82,7 +82,7 @@
de = readdir(dir);
if (de == NULL) {
- BTIF_TRACE_DEBUG1("readdir failed for path:%s", path);
+ BTIF_TRACE_DEBUG("readdir failed for path:%s", path);
//ret = -1;
break;
}
@@ -91,7 +91,7 @@
continue;
if((int)strlen(de->d_name) > PATH_MAX - nameLen) {
- BTIF_TRACE_DEBUG1("d_name len:%d is too big", strlen(de->d_name));
+ BTIF_TRACE_DEBUG("d_name len:%d is too big", strlen(de->d_name));
ret = -1;
break;
}
@@ -101,7 +101,7 @@
ret = lstat (nameBuffer, &statBuffer);
if (ret != 0) {
- BTIF_TRACE_DEBUG1("lstat failed for path:%s", nameBuffer);
+ BTIF_TRACE_DEBUG("lstat failed for path:%s", nameBuffer);
break;
}
@@ -113,7 +113,7 @@
} else {
ret = unlink(nameBuffer);
if (ret != 0) {
- BTIF_TRACE_DEBUG1("unlink failed for path:%s", nameBuffer);
+ BTIF_TRACE_DEBUG("unlink failed for path:%s", nameBuffer);
break;
}
}
@@ -122,7 +122,7 @@
closedir(dir);
if(ret == 0) {
ret = rmdir(path);
- BTIF_TRACE_DEBUG2("rmdir return:%d for path:%s", ret, path);
+ BTIF_TRACE_DEBUG("rmdir return:%d for path:%s", ret, path);
}
return ret;
@@ -191,7 +191,7 @@
default:
return BTA_FS_CO_OK;
}
- BTIF_TRACE_DEBUG0("*************FTP- Access Failed **********");
+ BTIF_TRACE_DEBUG("*************FTP- Access Failed **********");
return BTA_FS_CO_EACCES;
}
@@ -274,7 +274,7 @@
max_space = fs_buffer.f_bavail * fs_buffer.f_bsize;
#if (BTA_FS_DEBUG==TRUE)
- BTIF_TRACE_DEBUG2("btapp_fs_enough_space(file size: %d): (uint)max_size: %u", size, (UINT32)max_space);
+ BTIF_TRACE_DEBUG("btapp_fs_enough_space(file size: %d): (uint)max_size: %u", size, (UINT32)max_space);
#endif
if (max_space < size)
err = EFBIG;
@@ -282,7 +282,7 @@
else
{
err = errno;
- BTIF_TRACE_WARNING1("btapp_fs_enough_space(): statfs() failed with err: %d", err);
+ BTIF_TRACE_WARNING("btapp_fs_enough_space(): statfs() failed with err: %d", err);
}
}
else
@@ -353,7 +353,7 @@
if (oflags & O_CREAT)
{
fchown(fd, BT_UID, BT_GID);
- BTIF_TRACE_DEBUG0("\n ******CHANGED OWNERSHIP SUCCESSFULLY**********");
+ BTIF_TRACE_DEBUG("\n ******CHANGED OWNERSHIP SUCCESSFULLY**********");
}
}
}
@@ -364,9 +364,9 @@
}
}
- BTIF_TRACE_DEBUG4("[CO] bta_fs_co_open: handle:%d err:%d, flags:%x, app id:%d",
+ BTIF_TRACE_DEBUG("[CO] bta_fs_co_open: handle:%d err:%d, flags:%x, app id:%d",
fd, err, oflags, app_id);
- BTIF_TRACE_DEBUG1("file=%s", p_path);
+ BTIF_TRACE_DEBUG("file=%s", p_path);
/* convert fs error into bta_fs err. erro is set by first call to enough space to a valid value
* and needs only updating in case of error. This reports correct failure to remote obex! */
@@ -412,13 +412,13 @@
tBTA_FS_CO_STATUS status = BTA_FS_CO_OK;
int err;
- BTIF_TRACE_DEBUG2("[CO] bta_fs_co_close: handle:%d, app id:%d",
+ BTIF_TRACE_DEBUG("[CO] bta_fs_co_close: handle:%d, app id:%d",
fd, app_id);
if (close (fd) < 0)
{
err = errno;
status = BTA_FS_CO_FAIL;
- BTIF_TRACE_WARNING3("[CO] bta_fs_co_close: handle:%d error=%d app_id:%d", fd, err, app_id);
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_close: handle:%d error=%d app_id:%d", fd, err, app_id);
}
return (status);
@@ -462,7 +462,7 @@
{
err = errno;
status = BTA_FS_CO_FAIL;
- BTIF_TRACE_WARNING3("[CO] bta_fs_co_read: handle:%d error=%d app_id:%d",
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_read: handle:%d error=%d app_id:%d",
fd, err, app_id);
}
else if (num_read < nbytes)
@@ -510,7 +510,7 @@
err = errno;
status = BTA_FS_CO_FAIL;
}
-/* BTIF_TRACE_DEBUG3("[CO] bta_fs_co_write: handle:%d error=%d, num_written:%d", fd, err, num_written);*/
+/* BTIF_TRACE_DEBUG("[CO] bta_fs_co_write: handle:%d error=%d, num_written:%d", fd, err, num_written);*/
bta_fs_ci_write(fd, status, evt);
}
@@ -610,7 +610,7 @@
}
else
{
- BTIF_TRACE_DEBUG0("stat() failed! ");
+ BTIF_TRACE_DEBUG("stat() failed! ");
return BTA_FS_CO_FAIL;
}
@@ -645,7 +645,7 @@
{
err = errno;
status = BTA_FS_CO_FAIL;
- BTIF_TRACE_WARNING3("[CO] bta_fs_co_mkdir: error=%d, path [%s] app_id:%d",
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_mkdir: error=%d, path [%s] app_id:%d",
err, p_path, app_id);
}
return (status);
@@ -678,10 +678,10 @@
char *dirName, *tmp = NULL;
path_len = strlen( p_path )+1;
- BTIF_TRACE_DEBUG2( "bta_fs_co_rmdir( app_id: %d ): path_len: %d", app_id, path_len );
+ BTIF_TRACE_DEBUG( "bta_fs_co_rmdir( app_id: %d ): path_len: %d", app_id, path_len );
#if (TRUE==BTA_FS_DEBUG)
- BTIF_TRACE_DEBUG1( "bta_fs_co_rmdir():path_len: %d, p_path", app_id );
- BTIF_TRACE_DEBUG0( p_path );
+ BTIF_TRACE_DEBUG( "bta_fs_co_rmdir():path_len: %d, p_path", app_id );
+ BTIF_TRACE_DEBUG( p_path );
#endif
/* allocate a temp buffer for path with 0 char. make sure not to crash if path is too big! */
@@ -692,7 +692,7 @@
}
else
{
- BTIF_TRACE_WARNING2( "bta_fs_co_rmdir( app_id: %d ) for path_len: %d::out of memory",
+ BTIF_TRACE_WARNING( "bta_fs_co_rmdir( app_id: %d ) for path_len: %d::out of memory",
app_id, path_len );
return BTA_FS_CO_FAIL;
}
@@ -709,7 +709,7 @@
{
free(dirName);
#if (TRUE==BTA_FS_DEBUG)
- BTIF_TRACE_WARNING0( "bta_fs_co_rmdir()::stat(dirName) failed" );
+ BTIF_TRACE_WARNING( "bta_fs_co_rmdir()::stat(dirName) failed" );
#endif
return BTA_FS_CO_FAIL;
}
@@ -718,7 +718,7 @@
if (status != BTA_FS_CO_OK)
{
#if (TRUE==BTA_FS_DEBUG)
- BTIF_TRACE_WARNING0( "bta_fs_co_rmdir()::getAccess(dirName) FAILED");
+ BTIF_TRACE_WARNING( "bta_fs_co_rmdir()::getAccess(dirName) FAILED");
#endif
return status;
}
@@ -730,7 +730,7 @@
else
{
#if (TRUE==BTA_FS_DEBUG)
- BTIF_TRACE_WARNING0( "bta_fs_co_rmdir()::stat(p_path) FAILED");
+ BTIF_TRACE_WARNING( "bta_fs_co_rmdir()::stat(p_path) FAILED");
#endif
return BTA_FS_CO_FAIL;
}
@@ -738,7 +738,7 @@
if (status != BTA_FS_CO_OK)
{
#if (TRUE==BTA_FS_DEBUG)
- BTIF_TRACE_DEBUG0( "bta_fs_co_rmdir()::getAccess(p_path) FAILED");
+ BTIF_TRACE_DEBUG( "bta_fs_co_rmdir()::getAccess(p_path) FAILED");
#endif
return status;
}
@@ -746,7 +746,7 @@
if (del_path(p_path) != 0)
{
err = errno;
- BTIF_TRACE_WARNING1( "bta_fs_co_rmdir():rmdir/del_path FAILED with err: %d", err );
+ BTIF_TRACE_WARNING( "bta_fs_co_rmdir():rmdir/del_path FAILED with err: %d", err );
if (err == EACCES)
status = BTA_FS_CO_EACCES;
else if (err == ENOTEMPTY)
@@ -777,7 +777,7 @@
*******************************************************************************/
tBTA_FS_CO_STATUS bta_fs_co_unlink(const char *p_path, UINT8 app_id)
{
- BTIF_TRACE_DEBUG0("bta_fs_co_unlink");
+ BTIF_TRACE_DEBUG("bta_fs_co_unlink");
int err;
tBTA_FS_CO_STATUS status = BTA_FS_CO_OK;
char *dirName, *tmp=NULL;
@@ -806,7 +806,7 @@
}
else
{
- BTIF_TRACE_DEBUG0("stat() failed! ");
+ BTIF_TRACE_DEBUG("stat() failed! ");
free(dirName);
return BTA_FS_CO_FAIL;
}
@@ -865,32 +865,32 @@
char fullname[500];
UNUSED(app_id);
- BTIF_TRACE_DEBUG0("Entered bta_fs_co_getdirentry");
+ BTIF_TRACE_DEBUG("Entered bta_fs_co_getdirentry");
/* First item is to be retrieved */
if (first_item)
{
- BTIF_TRACE_DEBUG1("bta_fs_co_getdirentry: path = %s", p_path);
+ BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: path = %s", p_path);
dir = opendir(p_path);
if(dir == NULL)
{
- BTIF_TRACE_DEBUG1("bta_fs_co_getdirentry: dir is NULL so error out with errno=%d", errno);
+ BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: dir is NULL so error out with errno=%d", errno);
co_status = BTA_FS_CO_EODIR;
bta_fs_ci_direntry(co_status, evt);
return;
}
- BTIF_TRACE_DEBUG1("bta_fs_co_getdirentry: dir = %p", dir);
+ BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: dir = %p", dir);
if((dirent = readdir(dir)) != NULL)
{
p_entry->refdata = (UINT32) dir; /* Save this for future searches */
status = 0;
- BTIF_TRACE_DEBUG1("bta_fs_co_getdirentry: dirent = %p", dirent);
+ BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: dirent = %p", dirent);
}
else
{
- BTIF_TRACE_DEBUG1("bta_fs_co_getdirentry: dirent = %p", dirent);
+ BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: dirent = %p", dirent);
/* Close the search if there are no more items */
closedir( (DIR*) p_entry->refdata);
co_status = BTA_FS_CO_EODIR;
@@ -903,18 +903,18 @@
/* Close the search if there are no more items */
closedir( (DIR*) p_entry->refdata);
co_status = BTA_FS_CO_EODIR;
- BTIF_TRACE_DEBUG1("bta_fs_co_getdirentry: dirent = %p", dirent);
+ BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: dirent = %p", dirent);
}
else
{
- BTIF_TRACE_DEBUG1("bta_fs_co_getdirentry: dirent = %p", dirent);
+ BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: dirent = %p", dirent);
status = 0;
}
}
if (status == 0)
{
- BTIF_TRACE_DEBUG0("bta_fs_co_getdirentry: status = 0");
+ BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: status = 0");
sprintf(fullname, "%s/%s", p_path, dirent->d_name);
@@ -957,11 +957,11 @@
#endif
co_status = BTA_FS_CO_OK;
} else {
- BTIF_TRACE_WARNING0("stat() failed! ");
+ BTIF_TRACE_WARNING("stat() failed! ");
co_status = BTA_FS_CO_EACCES;
}
}
- BTIF_TRACE_DEBUG0("bta_fs_co_getdirentry: calling bta_fs_ci_getdirentry");
+ BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: calling bta_fs_ci_getdirentry");
bta_fs_ci_direntry(co_status, evt);
}
@@ -989,7 +989,7 @@
UNUSED(p_path);
UNUSED(app_id);
- BTIF_TRACE_DEBUG2("Entered %s. New path: %s", __FUNCTION__, p_path);
+ BTIF_TRACE_DEBUG("Entered %s. New path: %s", __FUNCTION__, p_path);
}
/*******************************************************************************
@@ -1020,7 +1020,7 @@
UNUSED(evt);
UNUSED(app_id);
- BTIF_TRACE_WARNING0("[CO] bta_fs_co_resume - NOT implemented");
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_resume - NOT implemented");
}
/*******************************************************************************
@@ -1050,7 +1050,7 @@
UNUSED(evt);
UNUSED(app_id);
- BTIF_TRACE_WARNING0("[CO] bta_fs_co_set_perms - NOT implemented");
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_set_perms - NOT implemented");
}
/*******************************************************************************
@@ -1082,7 +1082,7 @@
UNUSED(evt);
UNUSED(app_id);
- BTIF_TRACE_WARNING0("[CO] bta_fs_co_rename - NOT implemented");
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_rename - NOT implemented");
}
/*******************************************************************************
@@ -1116,7 +1116,7 @@
UNUSED(evt);
UNUSED(app_id);
- BTIF_TRACE_WARNING0("[CO] bta_fs_co_copy - NOT implemented");
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_copy - NOT implemented");
}
/*******************************************************************************
@@ -1141,7 +1141,7 @@
UNUSED(evt);
UNUSED(app_id);
- BTIF_TRACE_WARNING0("[CO] bta_fs_co_resume_op - NOT implemented");
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_resume_op - NOT implemented");
}
@@ -1172,7 +1172,7 @@
UNUSED(p_info);
UNUSED(app_id);
- BTIF_TRACE_WARNING0("[CO] bta_fs_co_session_info - NOT implemented");
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_session_info - NOT implemented");
}
@@ -1205,7 +1205,7 @@
UNUSED(info);
UNUSED(app_id);
- BTIF_TRACE_WARNING0("[CO] bta_fs_co_suspend - NOT implemented");
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_suspend - NOT implemented");
}
/*******************************************************************************
@@ -1231,6 +1231,6 @@
UNUSED(ssn);
UNUSED(app_id);
- BTIF_TRACE_WARNING0("[CO] bta_fs_co_suspend - NOT implemented");
+ BTIF_TRACE_WARNING("[CO] bta_fs_co_suspend - NOT implemented");
}
diff --git a/btif/co/bta_hh_co.c b/btif/co/bta_hh_co.c
index cf8569d..0701955 100644
--- a/btif/co/bta_hh_co.c
+++ b/btif/co/bta_hh_co.c
@@ -43,10 +43,10 @@
ret = write(fd, ev, sizeof(*ev));
if (ret < 0){
int rtn = -errno;
- APPL_TRACE_ERROR2("%s: Cannot write to uhid:%s", __FUNCTION__, strerror(errno));
+ APPL_TRACE_ERROR("%s: Cannot write to uhid:%s", __FUNCTION__, strerror(errno));
return rtn;
} else if (ret != sizeof(*ev)) {
- APPL_TRACE_ERROR3("%s: Wrong size written to uhid: %ld != %lu",
+ APPL_TRACE_ERROR("%s: Wrong size written to uhid: %ld != %lu",
__FUNCTION__, ret, sizeof(*ev));
return -EFAULT;
} else {
@@ -62,39 +62,39 @@
memset(&ev, 0, sizeof(ev));
if(!p_dev)
{
- APPL_TRACE_ERROR1("%s: Device not found",__FUNCTION__)
+ APPL_TRACE_ERROR("%s: Device not found",__FUNCTION__)
return -1;
}
ret = read(p_dev->fd, &ev, sizeof(ev));
if (ret == 0) {
- APPL_TRACE_ERROR2("%s: Read HUP on uhid-cdev %s", __FUNCTION__,
+ APPL_TRACE_ERROR("%s: Read HUP on uhid-cdev %s", __FUNCTION__,
strerror(errno));
return -EFAULT;
} else if (ret < 0) {
- APPL_TRACE_ERROR2("%s:Cannot read uhid-cdev: %s", __FUNCTION__,
+ APPL_TRACE_ERROR("%s:Cannot read uhid-cdev: %s", __FUNCTION__,
strerror(errno));
return -errno;
} else if (ret != sizeof(ev)) {
- APPL_TRACE_ERROR3("%s:Invalid size read from uhid-dev: %ld != %lu",
+ APPL_TRACE_ERROR("%s:Invalid size read from uhid-dev: %ld != %lu",
__FUNCTION__, ret, sizeof(ev));
return -EFAULT;
}
switch (ev.type) {
case UHID_START:
- APPL_TRACE_DEBUG0("UHID_START from uhid-dev\n");
+ APPL_TRACE_DEBUG("UHID_START from uhid-dev\n");
break;
case UHID_STOP:
- APPL_TRACE_DEBUG0("UHID_STOP from uhid-dev\n");
+ APPL_TRACE_DEBUG("UHID_STOP from uhid-dev\n");
break;
case UHID_OPEN:
- APPL_TRACE_DEBUG0("UHID_OPEN from uhid-dev\n");
+ APPL_TRACE_DEBUG("UHID_OPEN from uhid-dev\n");
break;
case UHID_CLOSE:
- APPL_TRACE_DEBUG0("UHID_CLOSE from uhid-dev\n");
+ APPL_TRACE_DEBUG("UHID_CLOSE from uhid-dev\n");
break;
case UHID_OUTPUT:
- APPL_TRACE_DEBUG2("UHID_OUTPUT: Report type = %d, report_size = %d"
+ APPL_TRACE_DEBUG("UHID_OUTPUT: Report type = %d, report_size = %d"
,ev.u.output.rtype, ev.u.output.size);
//Send SET_REPORT with feature report if the report type in output event is FEATURE
if(ev.u.output.rtype == UHID_FEATURE_REPORT)
@@ -105,17 +105,17 @@
btif_hh_setreport(p_dev,BTHH_INPUT_REPORT,ev.u.output.size,ev.u.output.data);
break;
case UHID_OUTPUT_EV:
- APPL_TRACE_DEBUG0("UHID_OUTPUT_EV from uhid-dev\n");
+ APPL_TRACE_DEBUG("UHID_OUTPUT_EV from uhid-dev\n");
break;
case UHID_FEATURE:
- APPL_TRACE_DEBUG0("UHID_FEATURE from uhid-dev\n");
+ APPL_TRACE_DEBUG("UHID_FEATURE from uhid-dev\n");
break;
case UHID_FEATURE_ANSWER:
- APPL_TRACE_DEBUG0("UHID_FEATURE_ANSWER from uhid-dev\n");
+ APPL_TRACE_DEBUG("UHID_FEATURE_ANSWER from uhid-dev\n");
break;
default:
- APPL_TRACE_DEBUG1("Invalid event from uhid-dev: %u\n", ev.type);
+ APPL_TRACE_DEBUG("Invalid event from uhid-dev: %u\n", ev.type);
}
return 0;
@@ -131,7 +131,7 @@
**
*******************************************************************************/
static inline pthread_t create_thread(void *(*start_routine)(void *), void * arg){
- APPL_TRACE_DEBUG0("create_thread: entered");
+ APPL_TRACE_DEBUG("create_thread: entered");
pthread_attr_t thread_attr;
pthread_attr_init(&thread_attr);
@@ -139,10 +139,10 @@
pthread_t thread_id = -1;
if ( pthread_create(&thread_id, &thread_attr, start_routine, arg)!=0 )
{
- APPL_TRACE_ERROR1("pthread_create : %s", strerror(errno));
+ APPL_TRACE_ERROR("pthread_create : %s", strerror(errno));
return -1;
}
- APPL_TRACE_DEBUG0("create_thread: thread created successfully");
+ APPL_TRACE_DEBUG("create_thread: thread created successfully");
return thread_id;
}
@@ -159,7 +159,7 @@
{
btif_hh_device_t *p_dev = arg;
- APPL_TRACE_DEBUG2("%s: Thread created fd = %d", __FUNCTION__, p_dev->fd);
+ APPL_TRACE_DEBUG("%s: Thread created fd = %d", __FUNCTION__, p_dev->fd);
struct pollfd pfds[1];
int ret;
pfds[0].fd = p_dev->fd;
@@ -168,11 +168,11 @@
while(p_dev->hh_keep_polling){
ret = poll(pfds, 1, 50);
if (ret < 0) {
- APPL_TRACE_ERROR2("%s: Cannot poll for fds: %s\n", __FUNCTION__, strerror(errno));
+ APPL_TRACE_ERROR("%s: Cannot poll for fds: %s\n", __FUNCTION__, strerror(errno));
break;
}
if (pfds[0].revents & POLLIN) {
- APPL_TRACE_DEBUG0("btif_hh_poll_event_thread: POLLIN");
+ APPL_TRACE_DEBUG("btif_hh_poll_event_thread: POLLIN");
ret = uhid_event(p_dev);
if (ret){
break;
@@ -186,7 +186,7 @@
static inline void btif_hh_close_poll_thread(btif_hh_device_t *p_dev)
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
p_dev->hh_keep_polling = 0;
if(p_dev->hh_poll_thread_id > 0)
pthread_join(p_dev->hh_poll_thread_id,NULL);
@@ -205,13 +205,13 @@
int bta_hh_co_write(int fd, UINT8* rpt, UINT16 len)
{
- APPL_TRACE_DEBUG0("bta_hh_co_data: UHID write");
+ APPL_TRACE_DEBUG("bta_hh_co_data: UHID write");
struct uhid_event ev;
memset(&ev, 0, sizeof(ev));
ev.type = UHID_INPUT;
ev.u.input.size = len;
if(len > sizeof(ev.u.input.data)){
- APPL_TRACE_WARNING1("%s:report size greater than allowed size",__FUNCTION__);
+ APPL_TRACE_WARNING("%s:report size greater than allowed size",__FUNCTION__);
return -1;
}
memcpy(ev.u.input.data, rpt, len);
@@ -236,7 +236,7 @@
btif_hh_device_t *p_dev = NULL;
if (dev_handle == BTA_HH_INVALID_HANDLE) {
- APPL_TRACE_WARNING2("%s: Oops, dev_handle (%d) is invalid...", __FUNCTION__, dev_handle);
+ APPL_TRACE_WARNING("%s: Oops, dev_handle (%d) is invalid...", __FUNCTION__, dev_handle);
return;
}
@@ -244,22 +244,22 @@
p_dev = &btif_hh_cb.devices[i];
if (p_dev->dev_status != BTHH_CONN_STATE_UNKNOWN && p_dev->dev_handle == dev_handle) {
// We found a device with the same handle. Must be a device reconnected.
- APPL_TRACE_WARNING2("%s: Found an existing device with the same handle "
+ APPL_TRACE_WARNING("%s: Found an existing device with the same handle "
"dev_status = %d",__FUNCTION__,
p_dev->dev_status);
- APPL_TRACE_WARNING6("%s: bd_addr = [%02X:%02X:%02X:%02X:%02X:]", __FUNCTION__,
+ APPL_TRACE_WARNING("%s: bd_addr = [%02X:%02X:%02X:%02X:%02X:]", __FUNCTION__,
p_dev->bd_addr.address[0], p_dev->bd_addr.address[1], p_dev->bd_addr.address[2],
p_dev->bd_addr.address[3], p_dev->bd_addr.address[4]);
- APPL_TRACE_WARNING4("%s: attr_mask = 0x%04x, sub_class = 0x%02x, app_id = %d",
+ APPL_TRACE_WARNING("%s: attr_mask = 0x%04x, sub_class = 0x%02x, app_id = %d",
__FUNCTION__, p_dev->attr_mask, p_dev->sub_class, p_dev->app_id);
if(p_dev->fd<0) {
p_dev->fd = open(dev_path, O_RDWR | O_CLOEXEC);
if (p_dev->fd < 0){
- APPL_TRACE_ERROR2("%s: Error: failed to open uhid, err:%s",
+ APPL_TRACE_ERROR("%s: Error: failed to open uhid, err:%s",
__FUNCTION__,strerror(errno));
}else
- APPL_TRACE_DEBUG2("%s: uhid fd = %d", __FUNCTION__, p_dev->fd);
+ APPL_TRACE_DEBUG("%s: uhid fd = %d", __FUNCTION__, p_dev->fd);
}
p_dev->hh_keep_polling = 1;
p_dev->hh_poll_thread_id = create_thread(btif_hh_poll_event_thread, p_dev);
@@ -283,10 +283,10 @@
// This is a new device,open the uhid driver now.
p_dev->fd = open(dev_path, O_RDWR | O_CLOEXEC);
if (p_dev->fd < 0){
- APPL_TRACE_ERROR2("%s: Error: failed to open uhid, err:%s",
+ APPL_TRACE_ERROR("%s: Error: failed to open uhid, err:%s",
__FUNCTION__,strerror(errno));
}else{
- APPL_TRACE_DEBUG2("%s: uhid fd = %d", __FUNCTION__, p_dev->fd);
+ APPL_TRACE_DEBUG("%s: uhid fd = %d", __FUNCTION__, p_dev->fd);
p_dev->hh_keep_polling = 1;
p_dev->hh_poll_thread_id = create_thread(btif_hh_poll_event_thread, p_dev);
}
@@ -298,12 +298,12 @@
}
if (p_dev == NULL) {
- APPL_TRACE_ERROR1("%s: Error: too many HID devices are connected", __FUNCTION__);
+ APPL_TRACE_ERROR("%s: Error: too many HID devices are connected", __FUNCTION__);
return;
}
p_dev->dev_status = BTHH_CONN_STATE_CONNECTED;
- APPL_TRACE_DEBUG2("%s: Return device status %d", __FUNCTION__, p_dev->dev_status);
+ APPL_TRACE_DEBUG("%s: Return device status %d", __FUNCTION__, p_dev->dev_status);
}
@@ -324,16 +324,16 @@
UINT32 i;
btif_hh_device_t *p_dev = NULL;
- APPL_TRACE_WARNING3("%s: dev_handle = %d, app_id = %d", __FUNCTION__, dev_handle, app_id);
+ APPL_TRACE_WARNING("%s: dev_handle = %d, app_id = %d", __FUNCTION__, dev_handle, app_id);
if (dev_handle == BTA_HH_INVALID_HANDLE) {
- APPL_TRACE_WARNING2("%s: Oops, dev_handle (%d) is invalid...", __FUNCTION__, dev_handle);
+ APPL_TRACE_WARNING("%s: Oops, dev_handle (%d) is invalid...", __FUNCTION__, dev_handle);
return;
}
for (i = 0; i < BTIF_HH_MAX_HID; i++) {
p_dev = &btif_hh_cb.devices[i];
if (p_dev->dev_status != BTHH_CONN_STATE_UNKNOWN && p_dev->dev_handle == dev_handle) {
- APPL_TRACE_WARNING3("%s: Found an existing device with the same handle "
+ APPL_TRACE_WARNING("%s: Found an existing device with the same handle "
"dev_status = %d, dev_handle =%d"
,__FUNCTION__,p_dev->dev_status
,p_dev->dev_handle);
@@ -367,20 +367,20 @@
btif_hh_device_t *p_dev;
UNUSED(peer_addr);
- APPL_TRACE_DEBUG6("%s: dev_handle = %d, subclass = 0x%02X, mode = %d, "
+ APPL_TRACE_DEBUG("%s: dev_handle = %d, subclass = 0x%02X, mode = %d, "
"ctry_code = %d, app_id = %d",
__FUNCTION__, dev_handle, sub_class, mode, ctry_code, app_id);
p_dev = btif_hh_find_connected_dev_by_handle(dev_handle);
if (p_dev == NULL) {
- APPL_TRACE_WARNING2("%s: Error: unknown HID device handle %d", __FUNCTION__, dev_handle);
+ APPL_TRACE_WARNING("%s: Error: unknown HID device handle %d", __FUNCTION__, dev_handle);
return;
}
// Send the HID report to the kernel.
if (p_dev->fd >= 0) {
bta_hh_co_write(p_dev->fd, p_rpt, len);
}else {
- APPL_TRACE_WARNING3("%s: Error: fd = %d, len = %d", __FUNCTION__, p_dev->fd, len);
+ APPL_TRACE_WARNING("%s: Error: fd = %d, len = %d", __FUNCTION__, p_dev->fd, len);
}
}
@@ -405,13 +405,13 @@
struct uhid_event ev;
if (p_dev->fd < 0) {
- APPL_TRACE_WARNING3("%s: Error: fd = %d, dscp_len = %d", __FUNCTION__, p_dev->fd, dscp_len);
+ APPL_TRACE_WARNING("%s: Error: fd = %d, dscp_len = %d", __FUNCTION__, p_dev->fd, dscp_len);
return;
}
- APPL_TRACE_WARNING4("%s: fd = %d, name = [%s], dscp_len = %d", __FUNCTION__,
+ APPL_TRACE_WARNING("%s: fd = %d, name = [%s], dscp_len = %d", __FUNCTION__,
p_dev->fd, dev_name, dscp_len);
- APPL_TRACE_WARNING5("%s: vendor_id = 0x%04x, product_id = 0x%04x, version= 0x%04x,"
+ APPL_TRACE_WARNING("%s: vendor_id = 0x%04x, product_id = 0x%04x, version= 0x%04x,"
"ctry_code=0x%02x",__FUNCTION__,
vendor_id, product_id,
version, ctry_code);
@@ -434,11 +434,11 @@
ev.u.create.country = ctry_code;
result = uhid_write(p_dev->fd, &ev);
- APPL_TRACE_WARNING4("%s: fd = %d, dscp_len = %d, result = %d", __FUNCTION__,
+ APPL_TRACE_WARNING("%s: fd = %d, dscp_len = %d, result = %d", __FUNCTION__,
p_dev->fd, dscp_len, result);
if (result) {
- APPL_TRACE_WARNING2("%s: Error: failed to send DSCP, result = %d", __FUNCTION__, result);
+ APPL_TRACE_WARNING("%s: Error: failed to send DSCP, result = %d", __FUNCTION__, result);
/* The HID report descriptor is corrupted. Close the driver. */
close(p_dev->fd);
diff --git a/btif/co/bta_hl_co.c b/btif/co/bta_hl_co.c
index 1432974..22b7c89 100644
--- a/btif/co/bta_hl_co.c
+++ b/btif/co/bta_hl_co.c
@@ -81,7 +81,7 @@
}
- BTIF_TRACE_DEBUG3("%s success=%d num_mdeps=%d",
+ BTIF_TRACE_DEBUG("%s success=%d num_mdeps=%d",
__FUNCTION__, success, *p_num_of_mdep );
return success;
}
@@ -110,7 +110,7 @@
}
- BTIF_TRACE_DEBUG2("%s advertize_flag=%d", __FUNCTION__, advertize_source_sdp );
+ BTIF_TRACE_DEBUG("%s advertize_flag=%d", __FUNCTION__, advertize_source_sdp );
return advertize_source_sdp;
}
@@ -141,7 +141,7 @@
UINT8 app_idx;
BOOLEAN success = FALSE;
- BTIF_TRACE_DEBUG5("%s app_id=%d mdep_idx=%d mdep_id=%d mdep_counter=%d",
+ BTIF_TRACE_DEBUG("%s app_id=%d mdep_idx=%d mdep_id=%d mdep_counter=%d",
__FUNCTION__, app_id,mdep_idx,mdep_id,mdep_counter);
if (btif_hl_find_app_idx(app_id, &app_idx))
@@ -155,7 +155,7 @@
success = TRUE;
}
- BTIF_TRACE_DEBUG4("%s success=%d mdep_idx=%d mdep_id=%d",
+ BTIF_TRACE_DEBUG("%s success=%d mdep_idx=%d mdep_id=%d",
__FUNCTION__, success, mdep_idx, mdep_id );
return success;
@@ -183,7 +183,7 @@
btif_hl_app_cb_t *p_acb;
tBTA_HL_SUP_FEATURE *p_sup;
- BTIF_TRACE_DEBUG2("%s app_id=%d",__FUNCTION__, app_id );
+ BTIF_TRACE_DEBUG("%s app_id=%d",__FUNCTION__, app_id );
if (btif_hl_find_app_idx(app_id, &app_idx))
{
@@ -194,7 +194,7 @@
success = TRUE;
}
- BTIF_TRACE_DEBUG4("%s success=%d max tx_size=%d rx_size=%d",
+ BTIF_TRACE_DEBUG("%s success=%d max tx_size=%d rx_size=%d",
__FUNCTION__, success, p_echo_cfg->max_tx_apdu_size,
p_echo_cfg->max_rx_apdu_size );
@@ -219,7 +219,7 @@
void bta_hl_co_save_mdl(UINT8 mdep_id, UINT8 item_idx, tBTA_HL_MDL_CFG *p_mdl_cfg )
{
- BTIF_TRACE_DEBUG6("%s mdep_id =%d, item_idx=%d active=%d mdl_id=%d time=%d",
+ BTIF_TRACE_DEBUG("%s mdep_id =%d, item_idx=%d active=%d mdl_id=%d time=%d",
__FUNCTION__, mdep_id, item_idx,
p_mdl_cfg->active,
p_mdl_cfg->mdl_id,
@@ -246,7 +246,7 @@
{
- BTIF_TRACE_DEBUG3("%s mdep_id=%d, item_idx=%d", __FUNCTION__, mdep_id, item_idx);
+ BTIF_TRACE_DEBUG("%s mdep_id=%d, item_idx=%d", __FUNCTION__, mdep_id, item_idx);
btif_hl_delete_mdl_cfg(mdep_id, item_idx);
@@ -276,7 +276,7 @@
UINT8 i;
tBTA_HL_MDL_CFG *p;
- BTIF_TRACE_DEBUG3("%s app_id=%d, num_items=%d",
+ BTIF_TRACE_DEBUG("%s app_id=%d, num_items=%d",
__FUNCTION__, app_id, buffer_size);
if (buffer_size > BTA_HL_NUM_MDL_CFGS)
@@ -292,13 +292,13 @@
{
if (p->active)
{
- BTIF_TRACE_DEBUG6("i=%d mdl_id=0x%x dch_mode=%d local mdep_role=%d mdep_id=%d mtu=%d",
+ BTIF_TRACE_DEBUG("i=%d mdl_id=0x%x dch_mode=%d local mdep_role=%d mdep_id=%d mtu=%d",
i, p->mdl_id, p->dch_mode, p->local_mdep_role, p->local_mdep_role, p->mtu);
}
}
}
- BTIF_TRACE_DEBUG3("%s success=%d num_items=%d", __FUNCTION__, result, buffer_size);
+ BTIF_TRACE_DEBUG("%s success=%d num_items=%d", __FUNCTION__, result, buffer_size);
return result;
}
@@ -326,7 +326,7 @@
btif_hl_mdl_cb_t *p_dcb;
tBTA_HL_STATUS status = BTA_HL_STATUS_FAIL;
- BTIF_TRACE_DEBUG4("%s app_id=%d mdl_handle=0x%x buf_size=%d",
+ BTIF_TRACE_DEBUG("%s app_id=%d mdl_handle=0x%x buf_size=%d",
__FUNCTION__, app_id, mdl_handle, buf_size);
if (btif_hl_find_mdl_idx_using_handle(mdl_handle, &app_idx, &mcl_idx, &mdl_idx))
@@ -371,7 +371,7 @@
btif_hl_mdl_cb_t *p_dcb;
tBTA_HL_STATUS status = BTA_HL_STATUS_FAIL;
int r;
- BTIF_TRACE_DEBUG4("%s app_id=%d mdl_handle=0x%x data_size=%d",
+ BTIF_TRACE_DEBUG("%s app_id=%d mdl_handle=0x%x data_size=%d",
__FUNCTION__,app_id, mdl_handle, data_size);
if (btif_hl_find_mdl_idx_using_handle(mdl_handle, &app_idx, &mcl_idx, &mdl_idx))
@@ -383,18 +383,18 @@
memcpy(p_dcb->p_rx_pkt, p_data, data_size);
if (p_dcb->p_scb)
{
- BTIF_TRACE_DEBUG4("app_idx=%d mcl_idx=0x%x mdl_idx=0x%x data_size=%d",
+ BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=0x%x mdl_idx=0x%x data_size=%d",
app_idx, mcl_idx, mdl_idx, data_size);
r = send(p_dcb->p_scb->socket_id[1], p_dcb->p_rx_pkt, data_size, 0);
if (r == data_size)
{
- BTIF_TRACE_DEBUG1("socket send success data_size=%d", data_size);
+ BTIF_TRACE_DEBUG("socket send success data_size=%d", data_size);
status = BTA_HL_STATUS_OK;
}
else
{
- BTIF_TRACE_ERROR2("socket send failed r=%d data_size=%d",r, data_size);
+ BTIF_TRACE_ERROR("socket send failed r=%d data_size=%d",r, data_size);
}
@@ -431,7 +431,7 @@
UNUSED(buf_size);
UNUSED(p_buf);
- BTIF_TRACE_ERROR1("%s not supported",__FUNCTION__);
+ BTIF_TRACE_ERROR("%s not supported",__FUNCTION__);
bta_hl_ci_get_echo_data(mcl_handle, status, evt);
}
@@ -460,7 +460,7 @@
UNUSED(data_size);
UNUSED(p_data);
- BTIF_TRACE_ERROR1("%s not supported",__FUNCTION__);
+ BTIF_TRACE_ERROR("%s not supported",__FUNCTION__);
bta_hl_ci_put_echo_data(mcl_handle, status, evt);
}
diff --git a/btif/co/bta_pan_co.c b/btif/co/bta_pan_co.c
index b0f2945..ad0c796 100644
--- a/btif/co/bta_pan_co.c
+++ b/btif/co/bta_pan_co.c
@@ -50,7 +50,7 @@
*******************************************************************************/
UINT8 bta_pan_co_init(UINT8 *q_level)
{
- BTIF_TRACE_API0("bta_pan_co_init");
+ BTIF_TRACE_API("bta_pan_co_init");
/* set the q_level to 30 buffers */
*q_level = 30;
@@ -75,14 +75,14 @@
void bta_pan_co_open(UINT16 handle, UINT8 app_id, tBTA_PAN_ROLE local_role,
tBTA_PAN_ROLE peer_role, BD_ADDR peer_addr)
{
- BTIF_TRACE_API4("bta_pan_co_open:app_id:%d, local_role:%d, peer_role:%d, "
+ BTIF_TRACE_API("bta_pan_co_open:app_id:%d, local_role:%d, peer_role:%d, "
"handle:%d", app_id, local_role, peer_role, handle);
btpan_conn_t* conn = btpan_find_conn_addr(peer_addr);
if(conn == NULL)
conn = btpan_new_conn(handle, peer_addr, local_role, peer_role);
if(conn)
{
- BTIF_TRACE_DEBUG6("bta_pan_co_open:tap_fd:%d, open_count:%d, "
+ BTIF_TRACE_DEBUG("bta_pan_co_open:tap_fd:%d, open_count:%d, "
"conn->handle:%d should = handle:%d, local_role:%d, remote_role:%d",
btpan_cb.tap_fd, btpan_cb.open_count, conn->handle, handle,
conn->local_role, conn->remote_role);
@@ -119,11 +119,11 @@
*******************************************************************************/
void bta_pan_co_close(UINT16 handle, UINT8 app_id)
{
- BTIF_TRACE_API2("bta_pan_co_close:app_id:%d, handle:%d", app_id, handle);
+ BTIF_TRACE_API("bta_pan_co_close:app_id:%d, handle:%d", app_id, handle);
btpan_conn_t* conn = btpan_find_conn_handle(handle);
if(conn && conn->state == PAN_STATE_OPEN)
{
- BTIF_TRACE_DEBUG0("bta_pan_co_close");
+ BTIF_TRACE_DEBUG("bta_pan_co_close");
// let bta close event reset this handle as it needs
// the handle to find the connection upon CLOSE
@@ -166,12 +166,12 @@
BOOLEAN ext;
BOOLEAN forward;
- BTIF_TRACE_API2("bta_pan_co_tx_path, handle:%d, app_id:%d", handle, app_id);
+ BTIF_TRACE_API("bta_pan_co_tx_path, handle:%d, app_id:%d", handle, app_id);
btpan_conn_t* conn = btpan_find_conn_handle(handle);
if(!conn || conn->state != PAN_STATE_OPEN)
{
- BTIF_TRACE_ERROR2("bta_pan_co_tx_path: cannot find pan connction or conn"
+ BTIF_TRACE_ERROR("bta_pan_co_tx_path: cannot find pan connction or conn"
"is not opened, conn:%p, conn->state:%d", conn, conn->state);
return;
}
@@ -181,14 +181,14 @@
if ((p_buf = bta_pan_ci_readbuf(handle, src, dst, &protocol,
&ext, &forward)))
{
- BTIF_TRACE_DEBUG2("bta_pan_co_tx_path, calling btapp_tap_send, "
+ BTIF_TRACE_DEBUG("bta_pan_co_tx_path, calling btapp_tap_send, "
"p_buf->len:%d, offset:%d", p_buf->len, p_buf->offset);
if(is_empty_eth_addr(conn->eth_addr) && is_valid_bt_eth_addr(src))
{
- BTIF_TRACE_DEBUG6("pan bt peer addr: %02x:%02x:%02x:%02x:%02x:%02x",
+ BTIF_TRACE_DEBUG("pan bt peer addr: %02x:%02x:%02x:%02x:%02x:%02x",
conn->peer[0], conn->peer[1], conn->peer[2],
conn->peer[3],conn->peer[4], conn->peer[5]);
- BTIF_TRACE_DEBUG6(" update its ethernet addr: "
+ BTIF_TRACE_DEBUG(" update its ethernet addr: "
"%02x:%02x:%02x:%02x:%02x:%02x", src[0], src[1], src[2],
src[3],src[4], src[5]);
memcpy(conn->eth_addr, src, sizeof(conn->eth_addr));
@@ -219,7 +219,7 @@
UNUSED(handle);
UNUSED(app_id);
- BTIF_TRACE_API0("bta_pan_co_rx_path not used");
+ BTIF_TRACE_API("bta_pan_co_rx_path not used");
}
/*******************************************************************************
@@ -249,7 +249,7 @@
UNUSED(ext);
UNUSED(forward);
- BTIF_TRACE_API0("bta_pan_co_tx_write not used");
+ BTIF_TRACE_API("bta_pan_co_tx_write not used");
}
/*******************************************************************************
@@ -278,7 +278,7 @@
UNUSED(ext);
UNUSED(forward);
- BTIF_TRACE_API0("bta_pan_co_tx_writebuf not used");
+ BTIF_TRACE_API("bta_pan_co_tx_writebuf not used");
}
/*******************************************************************************
@@ -301,7 +301,7 @@
UNUSED(app_id);
UNUSED(enable);
- BTIF_TRACE_API1("bta_pan_co_rx_flow, enabled:%d, not used", enable);
+ BTIF_TRACE_API("bta_pan_co_rx_flow, enabled:%d, not used", enable);
btpan_conn_t* conn = btpan_find_conn_handle(handle);
if(!conn || conn->state != PAN_STATE_OPEN)
return;
@@ -326,7 +326,7 @@
UNUSED(len);
UNUSED(p_filters);
- BTIF_TRACE_API0("bta_pan_co_pfilt_ind");
+ BTIF_TRACE_API("bta_pan_co_pfilt_ind");
}
/*******************************************************************************
@@ -347,6 +347,6 @@
UNUSED(len);
UNUSED(p_filters);
- BTIF_TRACE_API0("bta_pan_co_mfilt_ind");
+ BTIF_TRACE_API("bta_pan_co_mfilt_ind");
}
diff --git a/btif/include/btif_common.h b/btif/include/btif_common.h
index 111b90c..f6361e1 100644
--- a/btif/include/btif_common.h
+++ b/btif/include/btif_common.h
@@ -56,7 +56,7 @@
#define HAL_CBACK(P_CB, P_CBACK, ...)\
if (P_CB && P_CB->P_CBACK) { \
- BTIF_TRACE_API2("HAL %s->%s", #P_CB, #P_CBACK); \
+ BTIF_TRACE_API("HAL %s->%s", #P_CB, #P_CBACK); \
P_CB->P_CBACK(__VA_ARGS__); \
} \
else { \
diff --git a/btif/src/btif_av.c b/btif/src/btif_av.c
index d191d2e..731c0dc 100644
--- a/btif/src/btif_av.c
+++ b/btif/src/btif_av.c
@@ -105,12 +105,12 @@
#define CHECK_BTAV_INIT() if (((bt_av_src_callbacks == NULL) &&(bt_av_sink_callbacks == NULL)) \
|| (btif_av_cb.sm_handle == NULL))\
{\
- BTIF_TRACE_WARNING1("%s: BTAV not initialized", __FUNCTION__);\
+ BTIF_TRACE_WARNING("%s: BTAV not initialized", __FUNCTION__);\
return BT_STATUS_NOT_READY;\
}\
else\
{\
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);\
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);\
}
/* Helper macro to avoid code duplication in the state machine handlers */
@@ -223,7 +223,7 @@
UNUSED(tle);
/* is there at least one RC connection - There should be */
if (btif_rc_get_connected_peer(peer_addr)) {
- BTIF_TRACE_DEBUG1("%s Issuing connect to the remote RC peer", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s Issuing connect to the remote RC peer", __FUNCTION__);
/* In case of AVRCP connection request, we will initiate SRC connection */
connect_req.target_bda = (bt_bdaddr_t*)&peer_addr;
connect_req.uuid = UUID_SERVCLASS_AUDIO_SOURCE;
@@ -231,7 +231,7 @@
}
else
{
- BTIF_TRACE_ERROR1("%s No connected RC peers", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s No connected RC peers", __FUNCTION__);
}
}
@@ -269,7 +269,7 @@
static BOOLEAN btif_av_state_idle_handler(btif_sm_event_t event, void *p_data)
{
- BTIF_TRACE_DEBUG3("%s event:%s flags %x", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s event:%s flags %x", __FUNCTION__,
dump_av_sm_event_name(event), btif_av_cb.flags);
switch (event)
@@ -322,7 +322,7 @@
* TODO: We may need to do this only on an AVRCP Play. FixMe
*/
- BTIF_TRACE_DEBUG0("BTA_AV_RC_OPEN_EVT received w/o AV");
+ BTIF_TRACE_DEBUG("BTA_AV_RC_OPEN_EVT received w/o AV");
memset(&tle_av_open_on_rc, 0, sizeof(tle_av_open_on_rc));
tle_av_open_on_rc.param = (UINT32)btif_initiate_av_open_tmr_hdlr;
btu_start_timer(&tle_av_open_on_rc, BTU_TTYPE_USER_FUNC,
@@ -340,14 +340,14 @@
case BTA_AV_RC_CLOSE_EVT:
if (tle_av_open_on_rc.in_use) {
- BTIF_TRACE_DEBUG0("BTA_AV_RC_CLOSE_EVT: Stopping AV timer.");
+ BTIF_TRACE_DEBUG("BTA_AV_RC_CLOSE_EVT: Stopping AV timer.");
btu_stop_timer(&tle_av_open_on_rc);
}
btif_rc_handler(event, p_data);
break;
default:
- BTIF_TRACE_WARNING2("%s : unhandled event:%s", __FUNCTION__,
+ BTIF_TRACE_WARNING("%s : unhandled event:%s", __FUNCTION__,
dump_av_sm_event_name(event));
return FALSE;
@@ -367,7 +367,7 @@
static BOOLEAN btif_av_state_opening_handler(btif_sm_event_t event, void *p_data)
{
- BTIF_TRACE_DEBUG3("%s event:%s flags %x", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s event:%s flags %x", __FUNCTION__,
dump_av_sm_event_name(event), btif_av_cb.flags);
switch (event)
@@ -381,7 +381,7 @@
break;
case BTA_AV_REJECT_EVT:
- BTIF_TRACE_DEBUG0(" Received BTA_AV_REJECT_EVT ");
+ BTIF_TRACE_DEBUG(" Received BTA_AV_REJECT_EVT ");
btif_report_connection_state(BTAV_CONNECTION_STATE_DISCONNECTED, &(btif_av_cb.peer_bda));
btif_sm_change_state(btif_av_cb.sm_handle, BTIF_AV_STATE_IDLE);
break;
@@ -391,7 +391,7 @@
tBTA_AV *p_bta_data = (tBTA_AV*)p_data;
btav_connection_state_t state;
btif_sm_state_t av_state;
- BTIF_TRACE_DEBUG2("status:%d, edr 0x%x",p_bta_data->open.status,
+ BTIF_TRACE_DEBUG("status:%d, edr 0x%x",p_bta_data->open.status,
p_bta_data->open.edr);
if (p_bta_data->open.status == BTA_AV_SUCCESS)
@@ -405,7 +405,7 @@
}
else
{
- BTIF_TRACE_WARNING1("BTA_AV_OPEN_EVT::FAILED status: %d",
+ BTIF_TRACE_WARNING("BTA_AV_OPEN_EVT::FAILED status: %d",
p_bta_data->open.status );
state = BTAV_CONNECTION_STATE_DISCONNECTED;
av_state = BTIF_AV_STATE_IDLE;
@@ -437,7 +437,7 @@
// copy to avoid alignment problems
memcpy(&req, p_data, sizeof(req));
- BTIF_TRACE_WARNING2("BTIF_AV_SINK_CONFIG_REQ_EVT %d %d", req.sample_rate,
+ BTIF_TRACE_WARNING("BTIF_AV_SINK_CONFIG_REQ_EVT %d %d", req.sample_rate,
req.channel_count);
if (btif_av_cb.peer_sep == AVDT_TSEP_SRC && bt_av_sink_callbacks != NULL) {
HAL_CBACK(bt_av_sink_callbacks, audio_config_cb, &(btif_av_cb.peer_bda),
@@ -448,7 +448,7 @@
CHECK_RC_EVENT(event, p_data);
default:
- BTIF_TRACE_WARNING2("%s : unhandled event:%s", __FUNCTION__,
+ BTIF_TRACE_WARNING("%s : unhandled event:%s", __FUNCTION__,
dump_av_sm_event_name(event));
return FALSE;
@@ -470,7 +470,7 @@
static BOOLEAN btif_av_state_closing_handler(btif_sm_event_t event, void *p_data)
{
- BTIF_TRACE_DEBUG3("%s event:%s flags %x", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s event:%s flags %x", __FUNCTION__,
dump_av_sm_event_name(event), btif_av_cb.flags);
switch (event)
@@ -520,7 +520,7 @@
break;
default:
- BTIF_TRACE_WARNING2("%s : unhandled event:%s", __FUNCTION__,
+ BTIF_TRACE_WARNING("%s : unhandled event:%s", __FUNCTION__,
dump_av_sm_event_name(event));
return FALSE;
}
@@ -542,13 +542,13 @@
{
tBTA_AV *p_av = (tBTA_AV*)p_data;
- BTIF_TRACE_DEBUG3("%s event:%s flags %x", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s event:%s flags %x", __FUNCTION__,
dump_av_sm_event_name(event), btif_av_cb.flags);
if ( (event == BTA_AV_REMOTE_CMD_EVT) && (btif_av_cb.flags & BTIF_AV_FLAG_REMOTE_SUSPEND) &&
(p_av->remote_cmd.rc_id == BTA_AV_RC_PLAY) )
{
- BTIF_TRACE_EVENT1("%s: Resetting remote suspend flag on RC PLAY", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s: Resetting remote suspend flag on RC PLAY", __FUNCTION__);
btif_av_cb.flags &= ~BTIF_AV_FLAG_REMOTE_SUSPEND;
}
@@ -577,7 +577,7 @@
case BTA_AV_START_EVT:
{
- BTIF_TRACE_EVENT3("BTA_AV_START_EVT status %d, suspending %d, init %d",
+ BTIF_TRACE_EVENT("BTA_AV_START_EVT status %d, suspending %d, init %d",
p_av->start.status, p_av->start.suspending, p_av->start.initiator);
if ((p_av->start.status == BTA_SUCCESS) && (p_av->start.suspending == TRUE))
@@ -642,7 +642,7 @@
if((btif_av_cb.flags & BTIF_AV_FLAG_PENDING_START) &&
(p_av->reconfig.status == BTA_AV_SUCCESS))
{
- APPL_TRACE_WARNING0("reconfig done BTA_AVstart()");
+ APPL_TRACE_WARNING("reconfig done BTA_AVstart()");
BTA_AvStart();
}
else if(btif_av_cb.flags & BTIF_AV_FLAG_PENDING_START)
@@ -655,7 +655,7 @@
CHECK_RC_EVENT(event, p_data);
default:
- BTIF_TRACE_WARNING2("%s : unhandled event:%s", __FUNCTION__,
+ BTIF_TRACE_WARNING("%s : unhandled event:%s", __FUNCTION__,
dump_av_sm_event_name(event));
return FALSE;
@@ -677,7 +677,7 @@
{
tBTA_AV *p_av = (tBTA_AV*)p_data;
- BTIF_TRACE_DEBUG3("%s event:%s flags %x", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s event:%s flags %x", __FUNCTION__,
dump_av_sm_event_name(event), btif_av_cb.flags);
switch (event)
@@ -750,7 +750,7 @@
case BTA_AV_SUSPEND_EVT:
- BTIF_TRACE_EVENT2("BTA_AV_SUSPEND_EVT status %d, init %d",
+ BTIF_TRACE_EVENT("BTA_AV_SUSPEND_EVT status %d, init %d",
p_av->suspend.status, p_av->suspend.initiator);
/* a2dp suspended, stop media task until resumed */
@@ -821,7 +821,7 @@
CHECK_RC_EVENT(event, p_data);
default:
- BTIF_TRACE_WARNING2("%s : unhandled event:%s", __FUNCTION__,
+ BTIF_TRACE_WARNING("%s : unhandled event:%s", __FUNCTION__,
dump_av_sm_event_name(event));
return FALSE;
@@ -860,7 +860,7 @@
(state == BTIF_AV_STATE_OPENED) )
{
que_len = btif_media_sink_enque_buf((BT_HDR *)p_data);
- BTIF_TRACE_DEBUG1(" Packets in Que %d",que_len);
+ BTIF_TRACE_DEBUG(" Packets in Que %d",que_len);
}
else
return;
@@ -878,7 +878,7 @@
btif_transfer_context(btif_av_handle_event, BTIF_AV_SINK_CONFIG_REQ_EVT,
(char*)&config_req, sizeof(config_req), NULL);
} else {
- APPL_TRACE_ERROR1("ERROR dump_codec_info A2D_ParsSbcInfo fail:%d", a2d_status);
+ APPL_TRACE_ERROR("ERROR dump_codec_info A2D_ParsSbcInfo fail:%d", a2d_status);
}
}
}
@@ -928,7 +928,7 @@
{
bt_status_t status;
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
if (bt_av_sink_callbacks != NULL) {
// already did btif_av_init()
@@ -958,7 +958,7 @@
{
bt_status_t status;
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
if (bt_av_src_callbacks != NULL) {
// already did btif_av_init()
@@ -990,7 +990,7 @@
btif_av_connect_req_t connect_req;
connect_req.target_bda = bd_addr;
connect_req.uuid = uuid;
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
btif_sm_dispatch(btif_av_cb.sm_handle, BTIF_AV_CONNECT_REQ_EVT, (char*)&connect_req);
@@ -999,7 +999,7 @@
static bt_status_t connect_src(bt_bdaddr_t *bd_addr)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
CHECK_BTAV_INIT();
return btif_queue_connect(UUID_SERVCLASS_AUDIO_SINK, bd_addr, connect_int);
@@ -1007,7 +1007,7 @@
static bt_status_t connect_sink(bt_bdaddr_t *bd_addr)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
CHECK_BTAV_INIT();
return btif_queue_connect(UUID_SERVCLASS_AUDIO_SOURCE, bd_addr, connect_int);
@@ -1024,7 +1024,7 @@
*******************************************************************************/
static bt_status_t disconnect(bt_bdaddr_t *bd_addr)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
CHECK_BTAV_INIT();
@@ -1044,7 +1044,7 @@
*******************************************************************************/
static void cleanup(void)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
btif_a2dp_stop_media_task();
@@ -1056,7 +1056,7 @@
}
static void cleanup_src(void) {
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
if (bt_av_src_callbacks)
{
@@ -1067,7 +1067,7 @@
}
static void cleanup_sink(void) {
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
if (bt_av_sink_callbacks)
{
@@ -1122,13 +1122,13 @@
{
btif_sm_state_t state = btif_sm_get_state(btif_av_cb.sm_handle);
- BTIF_TRACE_DEBUG3("btif_av_stream_ready : sm hdl %d, state %d, flags %x",
+ BTIF_TRACE_DEBUG("btif_av_stream_ready : sm hdl %d, state %d, flags %x",
btif_av_cb.sm_handle, state, btif_av_cb.flags);
/* also make sure main adapter is enabled */
if (btif_is_enabled() == 0)
{
- BTIF_TRACE_EVENT0("main adapter not enabled");
+ BTIF_TRACE_EVENT("main adapter not enabled");
return FALSE;
}
@@ -1153,7 +1153,7 @@
{
btif_sm_state_t state = btif_sm_get_state(btif_av_cb.sm_handle);
- BTIF_TRACE_DEBUG3("btif_av_stream_started : sm hdl %d, state %d, flags %x",
+ BTIF_TRACE_DEBUG("btif_av_stream_started : sm hdl %d, state %d, flags %x",
btif_av_cb.sm_handle, state, btif_av_cb.flags);
/* disallow media task to start if we have pending actions */
@@ -1234,7 +1234,7 @@
*******************************************************************************/
const btav_interface_t *btif_av_get_src_interface(void)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
return &bt_av_src_interface;
}
@@ -1249,7 +1249,7 @@
*******************************************************************************/
const btav_interface_t *btif_av_get_sink_interface(void)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
return &bt_av_sink_interface;
}
diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c
index 9b432cd..0247f1a 100644
--- a/btif/src/btif_core.c
+++ b/btif/src/btif_core.c
@@ -171,7 +171,7 @@
{
tBTIF_CONTEXT_SWITCH_CBACK *p;
- BTIF_TRACE_VERBOSE0("btif_context_switched");
+ BTIF_TRACE_VERBOSE("btif_context_switched");
p = (tBTIF_CONTEXT_SWITCH_CBACK *) p_msg;
@@ -201,7 +201,7 @@
{
tBTIF_CONTEXT_SWITCH_CBACK *p_msg;
- BTIF_TRACE_VERBOSE2("btif_transfer_context event %d, len %d", event, param_len);
+ BTIF_TRACE_VERBOSE("btif_transfer_context event %d, len %d", event, param_len);
/* allocate and send message that will be executed in btif context */
if ((p_msg = (tBTIF_CONTEXT_SWITCH_CBACK *) GKI_getbuf(sizeof(tBTIF_CONTEXT_SWITCH_CBACK) + param_len)) != NULL)
@@ -278,7 +278,7 @@
BT_HDR *p_msg;
UNUSED(params);
- BTIF_TRACE_DEBUG0("btif task starting");
+ BTIF_TRACE_DEBUG("btif task starting");
btif_associate_evt();
@@ -293,7 +293,7 @@
*/
if (event == BT_EVT_TRIGGER_STACK_INIT)
{
- BTIF_TRACE_DEBUG0("btif_task: received trigger stack init event");
+ BTIF_TRACE_DEBUG("btif_task: received trigger stack init event");
#if (BLE_INCLUDED == TRUE)
btif_dm_load_ble_local_keys();
#endif
@@ -306,7 +306,7 @@
*/
if (event == BT_EVT_HARDWARE_INIT_FAIL)
{
- BTIF_TRACE_DEBUG0("btif_task: hardware init failed");
+ BTIF_TRACE_DEBUG("btif_task: hardware init failed");
bte_main_disable();
btif_queue_release();
GKI_task_self_cleanup(BTIF_TASK);
@@ -324,7 +324,7 @@
{
while((p_msg = GKI_read_mbox(BTU_BTIF_MBOX)) != NULL)
{
- BTIF_TRACE_VERBOSE1("btif task fetched event %x", p_msg->event);
+ BTIF_TRACE_VERBOSE("btif task fetched event %x", p_msg->event);
switch (p_msg->event)
{
@@ -332,7 +332,7 @@
btif_context_switched(p_msg);
break;
default:
- BTIF_TRACE_ERROR1("unhandled btif event (%d)", p_msg->event & BT_EVT_MASK);
+ BTIF_TRACE_ERROR("unhandled btif event (%d)", p_msg->event & BT_EVT_MASK);
break;
}
@@ -343,7 +343,7 @@
btif_disassociate_evt();
- BTIF_TRACE_DEBUG0("btif task exiting");
+ BTIF_TRACE_DEBUG("btif task exiting");
}
@@ -374,7 +374,7 @@
{
int addr_fd;
- BTIF_TRACE_DEBUG1("local bdaddr is stored in %s", val);
+ BTIF_TRACE_DEBUG("local bdaddr is stored in %s", val);
if ((addr_fd = open(val, O_RDONLY)) != -1)
{
@@ -385,7 +385,7 @@
if (memcmp(local_addr->address, null_bdaddr, BD_ADDR_LEN) != 0)
{
valid_bda = TRUE;
- BTIF_TRACE_DEBUG6("Got Factory BDA %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_DEBUG("Got Factory BDA %02X:%02X:%02X:%02X:%02X:%02X",
local_addr->address[0], local_addr->address[1], local_addr->address[2],
local_addr->address[3], local_addr->address[4], local_addr->address[5]);
}
@@ -400,7 +400,7 @@
if(btif_config_get_str("Local", "Adapter", "Address", val, &val_size))
{
str2bd(val, local_addr);
- BTIF_TRACE_DEBUG1("local bdaddr from bt_config.xml is %s", val);
+ BTIF_TRACE_DEBUG("local bdaddr from bt_config.xml is %s", val);
return;
}
}
@@ -411,7 +411,7 @@
{
str2bd(val, local_addr);
valid_bda = TRUE;
- BTIF_TRACE_DEBUG6("Got prior random BDA %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_DEBUG("Got prior random BDA %02X:%02X:%02X:%02X:%02X:%02X",
local_addr->address[0], local_addr->address[1], local_addr->address[2],
local_addr->address[3], local_addr->address[4], local_addr->address[5]);
}
@@ -434,11 +434,11 @@
/* Convert to ascii, and store as a persistent property */
bd2str(local_addr, &bdstr);
- BTIF_TRACE_DEBUG2("No preset BDA. Generating BDA: %s for prop %s",
+ BTIF_TRACE_DEBUG("No preset BDA. Generating BDA: %s for prop %s",
(char*)bdstr, PERSIST_BDADDR_PROPERTY);
if (property_set(PERSIST_BDADDR_PROPERTY, (char*)bdstr) < 0)
- BTIF_TRACE_ERROR1("Failed to set random BDA in prop %s",PERSIST_BDADDR_PROPERTY);
+ BTIF_TRACE_ERROR("Failed to set random BDA in prop %s",PERSIST_BDADDR_PROPERTY);
}
//save the bd address to config file
@@ -507,7 +507,7 @@
static bt_status_t btif_associate_evt(void)
{
- BTIF_TRACE_DEBUG1("%s: notify ASSOCIATE_JVM", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: notify ASSOCIATE_JVM", __FUNCTION__);
HAL_CBACK(bt_hal_cbacks, thread_evt_cb, ASSOCIATE_JVM);
return BT_STATUS_SUCCESS;
@@ -526,7 +526,7 @@
bt_status_t btif_enable_bluetooth(void)
{
- BTIF_TRACE_DEBUG0("BTIF ENABLE BLUETOOTH");
+ BTIF_TRACE_DEBUG("BTIF ENABLE BLUETOOTH");
if (btif_core_state != BTIF_CORE_STATE_DISABLED)
{
@@ -560,7 +560,7 @@
bdstr_t bdstr;
bdcpy(bd_addr.address, local_bd);
- BTIF_TRACE_DEBUG3("%s: status %d, local bd [%s]", __FUNCTION__, status,
+ BTIF_TRACE_DEBUG("%s: status %d, local bd [%s]", __FUNCTION__, status,
bd2str(&bd_addr, &bdstr));
if (bdcmp(btif_local_bd_addr.address,local_bd))
@@ -574,15 +574,15 @@
* the Controller's non-volatile memory rather than in device's file
* system.
**/
- BTIF_TRACE_WARNING0("***********************************************");
- BTIF_TRACE_WARNING6("BTIF init BDA was %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_WARNING("***********************************************");
+ BTIF_TRACE_WARNING("BTIF init BDA was %02X:%02X:%02X:%02X:%02X:%02X",
btif_local_bd_addr.address[0], btif_local_bd_addr.address[1],
btif_local_bd_addr.address[2], btif_local_bd_addr.address[3],
btif_local_bd_addr.address[4], btif_local_bd_addr.address[5]);
- BTIF_TRACE_WARNING6("Controller BDA is %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_WARNING("Controller BDA is %02X:%02X:%02X:%02X:%02X:%02X",
local_bd[0], local_bd[1], local_bd[2],
local_bd[3], local_bd[4], local_bd[5]);
- BTIF_TRACE_WARNING0("***********************************************");
+ BTIF_TRACE_WARNING("***********************************************");
bdcpy(btif_local_bd_addr.address, local_bd);
@@ -660,11 +660,11 @@
if (!btif_is_enabled())
{
- BTIF_TRACE_ERROR0("btif_disable_bluetooth : not yet enabled");
+ BTIF_TRACE_ERROR("btif_disable_bluetooth : not yet enabled");
return BT_STATUS_NOT_READY;
}
- BTIF_TRACE_DEBUG0("BTIF DISABLE BLUETOOTH");
+ BTIF_TRACE_DEBUG("BTIF DISABLE BLUETOOTH");
btif_dm_on_disable();
btif_core_state = BTIF_CORE_STATE_DISABLING;
@@ -680,7 +680,7 @@
if (status != BTA_SUCCESS)
{
- BTIF_TRACE_ERROR1("disable bt failed (%d)", status);
+ BTIF_TRACE_ERROR("disable bt failed (%d)", status);
/* reset the original state to allow attempting disable again */
btif_core_state = BTIF_CORE_STATE_ENABLED;
@@ -704,7 +704,7 @@
void btif_disable_bluetooth_evt(void)
{
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
#if (defined(HCILP_INCLUDED) && HCILP_INCLUDED == TRUE)
bte_main_enable_lpm(FALSE);
@@ -720,7 +720,7 @@
if (btif_shutdown_pending)
{
- BTIF_TRACE_DEBUG1("%s: calling btif_shutdown_bluetooth", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: calling btif_shutdown_bluetooth", __FUNCTION__);
btif_shutdown_bluetooth();
}
}
@@ -739,11 +739,11 @@
bt_status_t btif_shutdown_bluetooth(void)
{
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (btif_core_state == BTIF_CORE_STATE_DISABLING)
{
- BTIF_TRACE_WARNING0("shutdown during disabling");
+ BTIF_TRACE_WARNING("shutdown during disabling");
/* shutdown called before disabling is done */
btif_shutdown_pending = 1;
return BT_STATUS_NOT_READY;
@@ -751,7 +751,7 @@
if (btif_is_enabled())
{
- BTIF_TRACE_WARNING0("shutdown while still enabled, initiate disable");
+ BTIF_TRACE_WARNING("shutdown while still enabled, initiate disable");
/* shutdown called prior to disabling, initiate disable */
btif_disable_bluetooth();
@@ -779,7 +779,7 @@
bt_utils_cleanup();
- BTIF_TRACE_DEBUG1("%s done", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s done", __FUNCTION__);
return BT_STATUS_SUCCESS;
}
@@ -798,7 +798,7 @@
static bt_status_t btif_disassociate_evt(void)
{
- BTIF_TRACE_DEBUG1("%s: notify DISASSOCIATE_JVM", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: notify DISASSOCIATE_JVM", __FUNCTION__);
HAL_CBACK(bt_hal_cbacks, thread_evt_cb, DISASSOCIATE_JVM);
@@ -840,10 +840,10 @@
*******************************************************************************/
bt_status_t btif_dut_mode_configure(uint8_t enable)
{
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (btif_core_state != BTIF_CORE_STATE_ENABLED) {
- BTIF_TRACE_ERROR0("btif_dut_mode_configure : Bluetooth not enabled");
+ BTIF_TRACE_ERROR("btif_dut_mode_configure : Bluetooth not enabled");
return BT_STATUS_NOT_READY;
}
@@ -868,9 +868,9 @@
bt_status_t btif_dut_mode_send(uint16_t opcode, uint8_t *buf, uint8_t len)
{
/* TODO: Check that opcode is a vendor command group */
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (!btif_is_dut_mode()) {
- BTIF_TRACE_ERROR0("Bluedroid HAL needs to be init with test_mode set to 1.");
+ BTIF_TRACE_ERROR("Bluedroid HAL needs to be init with test_mode set to 1.");
return BT_STATUS_FAIL;
}
BTM_VendorSpecificCommand(opcode, len, buf, btif_dut_mode_cback);
@@ -1001,7 +1001,7 @@
int num_entries = 0;
bt_status_t status = BT_STATUS_SUCCESS;
- BTIF_TRACE_EVENT1("execute storage request event : %d", event);
+ BTIF_TRACE_EVENT("execute storage request event : %d", event);
switch(event)
{
@@ -1009,7 +1009,7 @@
{
btif_storage_req_t *p_req = (btif_storage_req_t*)p_param;
bt_property_t *p_prop = &(p_req->write_req.prop);
- BTIF_TRACE_EVENT3("type: %d, len %d, 0x%x", p_prop->type,
+ BTIF_TRACE_EVENT("type: %d, len %d, 0x%x", p_prop->type,
p_prop->len, p_prop->val);
status = btif_storage_set_adapter_property(p_prop);
@@ -1064,7 +1064,7 @@
} break;
default:
- BTIF_TRACE_ERROR2("%s invalid event id (%d)", __FUNCTION__, event);
+ BTIF_TRACE_ERROR("%s invalid event id (%d)", __FUNCTION__, event);
break;
}
}
@@ -1074,7 +1074,7 @@
bt_status_t status = BT_STATUS_FAIL;
bt_property_t prop;
- BTIF_TRACE_EVENT1("execute storage remote request event : %d", event);
+ BTIF_TRACE_EVENT("execute storage remote request event : %d", event);
switch (event)
{
@@ -1135,7 +1135,7 @@
btif_storage_req_t *new_req = (btif_storage_req_t*)p_new_buf;
btif_storage_req_t *old_req = (btif_storage_req_t*)p_old_buf;
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
switch (event)
{
case BTIF_CORE_STORAGE_REMOTE_WRITE:
@@ -1165,7 +1165,7 @@
bt_status_t btif_get_adapter_properties(void)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
if (!btif_is_enabled())
return BT_STATUS_NOT_READY;
@@ -1189,7 +1189,7 @@
{
btif_storage_req_t req;
- BTIF_TRACE_EVENT2("%s %d", __FUNCTION__, type);
+ BTIF_TRACE_EVENT("%s %d", __FUNCTION__, type);
/* Allow get_adapter_property only for BDADDR and BDNAME if BT is disabled */
if (!btif_is_enabled() && (type != BT_PROPERTY_BDADDR) && (type != BT_PROPERTY_BDNAME))
@@ -1222,7 +1222,7 @@
char bd_name[BTM_MAX_LOC_BD_NAME_LEN +1];
UINT16 name_len = 0;
- BTIF_TRACE_EVENT3("btif_set_adapter_property type: %d, len %d, 0x%x",
+ BTIF_TRACE_EVENT("btif_set_adapter_property type: %d, len %d, 0x%x",
property->type, property->len, property->val);
if (!btif_is_enabled())
@@ -1237,7 +1237,7 @@
memcpy(bd_name,property->val, name_len);
bd_name[name_len] = '\0';
- BTIF_TRACE_EVENT1("set property name : %s", (char *)bd_name);
+ BTIF_TRACE_EVENT("set property name : %s", (char *)bd_name);
BTA_DmSetDeviceName((char *)bd_name);
@@ -1269,11 +1269,11 @@
break;
default:
- BTIF_TRACE_ERROR1("invalid scan mode (0x%x)", mode);
+ BTIF_TRACE_ERROR("invalid scan mode (0x%x)", mode);
return BT_STATUS_PARM_INVALID;
}
- BTIF_TRACE_EVENT1("set property scan mode : %x", mode);
+ BTIF_TRACE_EVENT("set property scan mode : %x", mode);
BTA_DmSetVisibility(disc_mode, conn_mode, BTA_DM_IGNORE, BTA_DM_IGNORE);
@@ -1296,7 +1296,7 @@
status = BT_STATUS_FAIL;
break;
default:
- BTIF_TRACE_ERROR1("btif_get_adapter_property : invalid type %d",
+ BTIF_TRACE_ERROR("btif_get_adapter_property : invalid type %d",
property->type);
status = BT_STATUS_FAIL;
break;
@@ -1457,7 +1457,7 @@
btif_enabled_services |= (1 << service_id);
- BTIF_TRACE_DEBUG2("%s: current services:0x%x", __FUNCTION__, btif_enabled_services);
+ BTIF_TRACE_DEBUG("%s: current services:0x%x", __FUNCTION__, btif_enabled_services);
if (btif_is_enabled())
{
@@ -1490,7 +1490,7 @@
btif_enabled_services &= (tBTA_SERVICE_MASK)(~(1<<service_id));
- BTIF_TRACE_DEBUG2("%s: Current Services:0x%x", __FUNCTION__, btif_enabled_services);
+ BTIF_TRACE_DEBUG("%s: Current Services:0x%x", __FUNCTION__, btif_enabled_services);
if (btif_is_enabled())
{
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index 8a06e18..fe1ee88 100644
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -191,7 +191,7 @@
btif_hf_client_execute_service(b_enable);
}break;
default:
- BTIF_TRACE_ERROR1("%s: Unknown service being enabled", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s: Unknown service being enabled", __FUNCTION__);
return BT_STATUS_FAIL;
}
return BT_STATUS_SUCCESS;
@@ -289,7 +289,7 @@
sizeof(uint32_t), &remote_cod);
if (btif_storage_get_remote_device_property((bt_bdaddr_t *)remote_bdaddr, &prop_name) == BT_STATUS_SUCCESS)
{
- BTIF_TRACE_ERROR2("%s: remote_cod = 0x%06x", __FUNCTION__, remote_cod);
+ BTIF_TRACE_ERROR("%s: remote_cod = 0x%06x", __FUNCTION__, remote_cod);
if ((remote_cod & 0x7ff) == cod)
return TRUE;
}
@@ -308,7 +308,7 @@
if (btif_storage_get_remote_device_property((bt_bdaddr_t *)remote_bdaddr,
&prop_name) == BT_STATUS_SUCCESS)
{
- BTIF_TRACE_DEBUG2("%s: remote_cod = 0x%06x", __FUNCTION__, remote_cod);
+ BTIF_TRACE_DEBUG("%s: remote_cod = 0x%06x", __FUNCTION__, remote_cod);
if ((remote_cod & 0x700) == cod)
return TRUE;
}
@@ -347,7 +347,7 @@
{
state = BT_BOND_STATE_NONE;
}
- BTIF_TRACE_DEBUG3("%s: state=%d prev_state=%d", __FUNCTION__, state, pairing_cb.state);
+ BTIF_TRACE_DEBUG("%s: state=%d prev_state=%d", __FUNCTION__, state, pairing_cb.state);
HAL_CBACK(bt_hal_cbacks, bond_state_changed_cb, status, bd_addr, state);
@@ -423,16 +423,16 @@
/* class of device */
cod = devclass2uint(dev_class);
- BTIF_TRACE_DEBUG2("%s():cod is 0x%06x", __FUNCTION__, cod);
+ BTIF_TRACE_DEBUG("%s():cod is 0x%06x", __FUNCTION__, cod);
if ( cod == 0) {
/* Try to retrieve cod from storage */
- BTIF_TRACE_DEBUG1("%s():cod is 0, checking cod from storage", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s():cod is 0, checking cod from storage", __FUNCTION__);
BTIF_STORAGE_FILL_PROPERTY(&properties[num_properties],
BT_PROPERTY_CLASS_OF_DEVICE, sizeof(cod), &cod);
status = btif_storage_get_remote_device_property(&bdaddr, &properties[num_properties]);
- BTIF_TRACE_DEBUG2("%s():cod retreived from storage is 0x%06x", __FUNCTION__, cod);
+ BTIF_TRACE_DEBUG("%s():cod retreived from storage is 0x%06x", __FUNCTION__, cod);
if ( cod == 0) {
- BTIF_TRACE_DEBUG1("%s():cod is again 0, set as unclassified", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s():cod is again 0, set as unclassified", __FUNCTION__);
cod = COD_UNCLASSIFIED;
}
}
@@ -467,7 +467,7 @@
*******************************************************************************/
static void btif_dm_cb_hid_remote_name(tBTM_REMOTE_DEV_NAME *p_remote_name)
{
- BTIF_TRACE_DEBUG3("%s: status=%d pairing_cb.state=%d", __FUNCTION__, p_remote_name->status, pairing_cb.state);
+ BTIF_TRACE_DEBUG("%s: status=%d pairing_cb.state=%d", __FUNCTION__, p_remote_name->status, pairing_cb.state);
if (pairing_cb.state == BT_BOND_STATE_BONDING)
{
bt_bdaddr_t remote_bd;
@@ -569,7 +569,7 @@
if (!p_src)
return;
- BTIF_TRACE_DEBUG2("%s: event=%s", __FUNCTION__, dump_dm_search_event(event));
+ BTIF_TRACE_DEBUG("%s: event=%s", __FUNCTION__, dump_dm_search_event(event));
memcpy(p_dest_data, p_src_data, sizeof(tBTA_DM_SEARCH));
switch (event)
{
@@ -660,7 +660,7 @@
cod = devclass2uint(p_pin_req->dev_class);
if ( cod == 0) {
- BTIF_TRACE_DEBUG1("%s():cod is 0, set as unclassified", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s():cod is 0, set as unclassified", __FUNCTION__);
cod = COD_UNCLASSIFIED;
}
@@ -674,12 +674,12 @@
check_cod(&bd_addr, COD_AV_HIFI_AUDIO) ||
check_cod(&bd_addr, COD_HID_POINTING))
{
- BTIF_TRACE_DEBUG1("%s()cod matches for auto pair", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s()cod matches for auto pair", __FUNCTION__);
/* Check if this device can be auto paired */
if ((btif_storage_is_device_autopair_blacklisted(&bd_addr) == FALSE) &&
(pairing_cb.autopair_attempts == 0))
{
- BTIF_TRACE_DEBUG1("%s() Attempting auto pair", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s() Attempting auto pair", __FUNCTION__);
pin_code.pin[0] = 0x30;
pin_code.pin[1] = 0x30;
pin_code.pin[2] = 0x30;
@@ -696,7 +696,7 @@
if(( btif_storage_is_fixed_pin_zeros_keyboard (&bd_addr) == TRUE) &&
(pairing_cb.autopair_attempts == 0))
{
- BTIF_TRACE_DEBUG1("%s() Attempting auto pair", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s() Attempting auto pair", __FUNCTION__);
pin_code.pin[0] = 0x30;
pin_code.pin[1] = 0x30;
pin_code.pin[2] = 0x30;
@@ -728,7 +728,7 @@
UINT32 cod;
BOOLEAN is_incoming = !(pairing_cb.state == BT_BOND_STATE_BONDING);
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
/* Remote properties update */
btif_update_remote_properties(p_ssp_cfm_req->bd_addr, p_ssp_cfm_req->bd_name,
@@ -761,12 +761,12 @@
if ((is_incoming) && ((p_ssp_cfm_req->loc_io_caps == 0x01) &&
(p_ssp_cfm_req->rmt_io_caps == 0x00 || p_ssp_cfm_req->rmt_io_caps == 0x03)))
{
- BTIF_TRACE_EVENT3("%s: User consent needed for incoming pairing request. loc_io_caps: %d, rmt_io_caps: %d",
+ BTIF_TRACE_EVENT("%s: User consent needed for incoming pairing request. loc_io_caps: %d, rmt_io_caps: %d",
__FUNCTION__, p_ssp_cfm_req->loc_io_caps, p_ssp_cfm_req->rmt_io_caps);
}
else
{
- BTIF_TRACE_EVENT1("%s: Auto-accept JustWorks pairing", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s: Auto-accept JustWorks pairing", __FUNCTION__);
btif_dm_ssp_reply(&bd_addr, BT_SSP_VARIANT_CONSENT, TRUE, 0);
return;
}
@@ -791,7 +791,7 @@
bt_bdname_t bd_name;
UINT32 cod;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
/* Remote properties update */
btif_update_remote_properties(p_ssp_key_notif->bd_addr, p_ssp_key_notif->bd_name,
@@ -836,7 +836,7 @@
(p_auth_cmpl->key_type == HCI_LKEY_TYPE_CHANGED_COMB) || (!pairing_cb.is_temp))
{
bt_status_t ret;
- BTIF_TRACE_DEBUG3("%s: Storing link key. key_type=0x%x, is_temp=%d",
+ BTIF_TRACE_DEBUG("%s: Storing link key. key_type=0x%x, is_temp=%d",
__FUNCTION__, p_auth_cmpl->key_type, pairing_cb.is_temp);
ret = btif_storage_add_bonded_device(&bd_addr,
p_auth_cmpl->key, p_auth_cmpl->key_type,
@@ -845,11 +845,11 @@
}
else
{
- BTIF_TRACE_DEBUG3("%s: Temporary key. Not storing. key_type=0x%x, is_temp=%d",
+ BTIF_TRACE_DEBUG("%s: Temporary key. Not storing. key_type=0x%x, is_temp=%d",
__FUNCTION__, p_auth_cmpl->key_type, pairing_cb.is_temp);
if(pairing_cb.is_temp)
{
- BTIF_TRACE_DEBUG1("%s: sending BT_BOND_STATE_NONE for Temp pairing",
+ BTIF_TRACE_DEBUG("%s: sending BT_BOND_STATE_NONE for Temp pairing",
__FUNCTION__);
bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_NONE);
return;
@@ -890,11 +890,11 @@
case HCI_ERR_INSUFFCIENT_SECURITY:
case HCI_ERR_PEER_USER:
case HCI_ERR_UNSPECIFIED:
- BTIF_TRACE_DEBUG2(" %s() Authentication fail reason %d",
+ BTIF_TRACE_DEBUG(" %s() Authentication fail reason %d",
__FUNCTION__, p_auth_cmpl->fail_reason);
if (pairing_cb.autopair_attempts == 1)
{
- BTIF_TRACE_DEBUG1("%s(): Adding device to blacklist ", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s(): Adding device to blacklist ", __FUNCTION__);
/* Add the device to dynamic black list only if this device belongs to Audio/pointing dev class */
if (check_cod(&bd_addr, COD_AV_HEADSETS) ||
@@ -909,7 +909,7 @@
pairing_cb.autopair_attempts++;
/* Create the Bond once again */
- BTIF_TRACE_DEBUG1("%s() auto pair failed. Reinitiate Bond", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s() auto pair failed. Reinitiate Bond", __FUNCTION__);
btif_dm_cb_create_bond (&bd_addr);
return;
}
@@ -926,7 +926,7 @@
/* Special Handling for HID Devices */
if (check_cod(&bd_addr, COD_HID_POINTING)) {
/* Remove Device as bonded in nvram as authentication failed */
- BTIF_TRACE_DEBUG1("%s(): removing hid pointing device from nvram", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s(): removing hid pointing device from nvram", __FUNCTION__);
btif_storage_remove_bonded_device(&bd_addr);
}
bond_state_changed(status, &bd_addr, state);
@@ -945,7 +945,7 @@
static void btif_dm_search_devices_evt (UINT16 event, char *p_param)
{
tBTA_DM_SEARCH *p_search_data;
- BTIF_TRACE_EVENT2("%s event=%s", __FUNCTION__, dump_dm_search_event(event));
+ BTIF_TRACE_EVENT("%s event=%s", __FUNCTION__, dump_dm_search_event(event));
switch (event)
{
@@ -988,7 +988,7 @@
p_search_data = (tBTA_DM_SEARCH *)p_param;
bdcpy(bdaddr.address, p_search_data->inq_res.bd_addr);
- BTIF_TRACE_DEBUG3("%s() %s device_type = 0x%x\n", __FUNCTION__, bd2str(&bdaddr, &bdstr),
+ BTIF_TRACE_DEBUG("%s() %s device_type = 0x%x\n", __FUNCTION__, bd2str(&bdaddr, &bdstr),
#if (BLE_INCLUDED == TRUE)
p_search_data->inq_res.device_type);
#else
@@ -1010,7 +1010,7 @@
if (p_search_data->inq_res.p_eir)
{
BTA_GetEirService(p_search_data->inq_res.p_eir, &services);
- BTIF_TRACE_DEBUG2("%s()EIR BTA services = %08X", __FUNCTION__, (UINT32)services);
+ BTIF_TRACE_DEBUG("%s()EIR BTA services = %08X", __FUNCTION__, (UINT32)services);
/* TODO: Get the service list and check to see which uuids we got and send it back to the client. */
}
@@ -1118,7 +1118,7 @@
{
tBTA_DM_SEARCH *p_data = (tBTA_DM_SEARCH*)p_param;
- BTIF_TRACE_EVENT2("%s: event = %d", __FUNCTION__, event);
+ BTIF_TRACE_EVENT("%s: event = %d", __FUNCTION__, event);
switch (event)
{
case BTA_DM_DISC_RES_EVT:
@@ -1131,13 +1131,13 @@
bdcpy(bd_addr.address, p_data->disc_res.bd_addr);
- BTIF_TRACE_DEBUG3("%s:(result=0x%x, services 0x%x)", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s:(result=0x%x, services 0x%x)", __FUNCTION__,
p_data->disc_res.result, p_data->disc_res.services);
if ((p_data->disc_res.result != BTA_SUCCESS) &&
(pairing_cb.state == BT_BOND_STATE_BONDING ) &&
(pairing_cb.sdp_attempts < BTIF_DM_MAX_SDP_ATTEMPTS_AFTER_PAIRING))
{
- BTIF_TRACE_WARNING1("%s:SDP failed after bonding re-attempting", __FUNCTION__);
+ BTIF_TRACE_WARNING("%s:SDP failed after bonding re-attempting", __FUNCTION__);
pairing_cb.sdp_attempts++;
btif_dm_get_remote_services(&bd_addr);
return;
@@ -1152,7 +1152,7 @@
{
char temp[256];
uuid_to_string((bt_uuid_t*)(p_data->disc_res.p_uuid_list + (i*MAX_UUID_SIZE)), temp);
- BTIF_TRACE_ERROR2("Index: %d uuid:%s", i, temp);
+ BTIF_TRACE_ERROR("Index: %d uuid:%s", i, temp);
}
}
@@ -1163,7 +1163,7 @@
(bdcmp(p_data->disc_res.bd_addr, pairing_cb.bd_addr) == 0)&&
pairing_cb.sdp_attempts > 0)
{
- BTIF_TRACE_DEBUG1("%s Remote Service SDP done. Call bond_state_changed_cb BONDED",
+ BTIF_TRACE_DEBUG("%s Remote Service SDP done. Call bond_state_changed_cb BONDED",
__FUNCTION__);
pairing_cb.sdp_attempts = 0;
bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_BONDED);
@@ -1187,14 +1187,14 @@
#if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
case BTA_DM_DISC_BLE_RES_EVT:
- BTIF_TRACE_DEBUG2("%s:, services 0x%x)", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s:, services 0x%x)", __FUNCTION__,
p_data->disc_ble_res.service.uu.uuid16);
bt_uuid_t uuid;
int i = 0;
int j = 15;
if (p_data->disc_ble_res.service.uu.uuid16 == UUID_SERVCLASS_LE_HID)
{
- BTIF_TRACE_DEBUG1("%s: Found HOGP UUID",__FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: Found HOGP UUID",__FUNCTION__);
bt_property_t prop;
bt_bdaddr_t bd_addr;
char temp[256];
@@ -1212,7 +1212,7 @@
}
uuid_to_string(&uuid, temp);
- BTIF_TRACE_ERROR1(" uuid:%s", temp);
+ BTIF_TRACE_ERROR(" uuid:%s", temp);
bdcpy(bd_addr.address, p_data->disc_ble_res.bd_addr);
prop.type = BT_PROPERTY_UUIDS;
@@ -1252,7 +1252,7 @@
{
tBTA_DM_SEARCH *p_data = (tBTA_DM_SEARCH*)p_param;
- BTIF_TRACE_EVENT2("%s: event = %d", __FUNCTION__, event);
+ BTIF_TRACE_EVENT("%s: event = %d", __FUNCTION__, event);
switch (event)
{
case BTA_DM_DISC_RES_EVT:
@@ -1265,7 +1265,7 @@
memset(&rec, 0, sizeof(bt_service_record_t));
bdcpy(bd_addr.address, p_data->disc_res.bd_addr);
- BTIF_TRACE_DEBUG3("%s:(result=0x%x, services 0x%x)", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s:(result=0x%x, services 0x%x)", __FUNCTION__,
p_data->disc_res.result, p_data->disc_res.services);
prop.type = BT_PROPERTY_SERVICE_RECORD;
prop.val = (void*)&rec;
@@ -1308,7 +1308,7 @@
uint32_t i;
bt_bdaddr_t bd_addr;
- BTIF_TRACE_EVENT1("btif_dm_upstreams_cback ev: %s", dump_dm_event(event));
+ BTIF_TRACE_EVENT("btif_dm_upstreams_cback ev: %s", dump_dm_event(event));
switch (event)
{
@@ -1444,7 +1444,7 @@
case BTA_DM_LINK_UP_EVT:
bdcpy(bd_addr.address, p_data->link_up.bd_addr);
- BTIF_TRACE_DEBUG0("BTA_DM_LINK_UP_EVT. Sending BT_ACL_STATE_CONNECTED");
+ BTIF_TRACE_DEBUG("BTA_DM_LINK_UP_EVT. Sending BT_ACL_STATE_CONNECTED");
btif_update_remote_version_property(&bd_addr);
@@ -1454,13 +1454,13 @@
case BTA_DM_LINK_DOWN_EVT:
bdcpy(bd_addr.address, p_data->link_down.bd_addr);
- BTIF_TRACE_DEBUG0("BTA_DM_LINK_DOWN_EVT. Sending BT_ACL_STATE_DISCONNECTED");
+ BTIF_TRACE_DEBUG("BTA_DM_LINK_DOWN_EVT. Sending BT_ACL_STATE_DISCONNECTED");
HAL_CBACK(bt_hal_cbacks, acl_state_changed_cb, BT_STATUS_SUCCESS,
&bd_addr, BT_ACL_STATE_DISCONNECTED);
break;
case BTA_DM_HW_ERROR_EVT:
- BTIF_TRACE_ERROR0("Received H/W Error. ");
+ BTIF_TRACE_ERROR("Received H/W Error. ");
/* Flush storage data */
btif_config_flush();
usleep(100000); /* 100milliseconds */
@@ -1470,27 +1470,27 @@
#if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
case BTA_DM_BLE_KEY_EVT:
- BTIF_TRACE_DEBUG1("BTA_DM_BLE_KEY_EVT key_type=0x%02x ", p_data->ble_key.key_type);
+ BTIF_TRACE_DEBUG("BTA_DM_BLE_KEY_EVT key_type=0x%02x ", p_data->ble_key.key_type);
/* If this pairing is by-product of local initiated GATT client Read or Write,
BTA would not have sent BTA_DM_BLE_SEC_REQ_EVT event and Bond state would not
have setup properly. Setup pairing_cb and notify App about Bonding state now*/
if (pairing_cb.state != BT_BOND_STATE_BONDING)
{
- BTIF_TRACE_DEBUG0("Bond state not sent to App so far.Notify the app now");
+ BTIF_TRACE_DEBUG("Bond state not sent to App so far.Notify the app now");
bond_state_changed(BT_STATUS_SUCCESS, (bt_bdaddr_t*)p_data->ble_key.bd_addr,
BT_BOND_STATE_BONDING);
}
else if (memcmp (pairing_cb.bd_addr, p_data->ble_key.bd_addr, BD_ADDR_LEN)!=0)
{
- BTIF_TRACE_ERROR1("BD mismatch discard BLE key_type=%d ",p_data->ble_key.key_type);
+ BTIF_TRACE_ERROR("BD mismatch discard BLE key_type=%d ",p_data->ble_key.key_type);
break;
}
switch (p_data->ble_key.key_type)
{
case BTA_LE_KEY_PENC:
- BTIF_TRACE_DEBUG0("Rcv BTA_LE_KEY_PENC");
+ BTIF_TRACE_DEBUG("Rcv BTA_LE_KEY_PENC");
pairing_cb.ble.is_penc_key_rcvd = TRUE;
memcpy(pairing_cb.ble.penc_key.ltk,p_data->ble_key.key_value.penc_key.ltk, 16);
memcpy(pairing_cb.ble.penc_key.rand, p_data->ble_key.key_value.penc_key.rand,8);
@@ -1499,29 +1499,29 @@
for (i=0; i<16; i++)
{
- BTIF_TRACE_DEBUG2("pairing_cb.ble.penc_key.ltk[%d]=0x%02x",i,pairing_cb.ble.penc_key.ltk[i]);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.penc_key.ltk[%d]=0x%02x",i,pairing_cb.ble.penc_key.ltk[i]);
}
for (i=0; i<8; i++)
{
- BTIF_TRACE_DEBUG2("pairing_cb.ble.penc_key.rand[%d]=0x%02x",i,pairing_cb.ble.penc_key.rand[i]);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.penc_key.rand[%d]=0x%02x",i,pairing_cb.ble.penc_key.rand[i]);
}
- BTIF_TRACE_DEBUG1("pairing_cb.ble.penc_key.ediv=0x%04x",pairing_cb.ble.penc_key.ediv);
- BTIF_TRACE_DEBUG1("pairing_cb.ble.penc_key.sec_level=0x%02x",pairing_cb.ble.penc_key.sec_level);
- BTIF_TRACE_DEBUG1("pairing_cb.ble.penc_key.key_size=0x%02x",pairing_cb.ble.penc_key.key_size);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.penc_key.ediv=0x%04x",pairing_cb.ble.penc_key.ediv);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.penc_key.sec_level=0x%02x",pairing_cb.ble.penc_key.sec_level);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.penc_key.key_size=0x%02x",pairing_cb.ble.penc_key.key_size);
break;
case BTA_LE_KEY_PID:
- BTIF_TRACE_DEBUG0("Rcv BTA_LE_KEY_PID");
+ BTIF_TRACE_DEBUG("Rcv BTA_LE_KEY_PID");
pairing_cb.ble.is_pid_key_rcvd = TRUE;
memcpy(pairing_cb.ble.pid_key, p_data->ble_key.key_value.pid_key.irk, 16);
for (i=0; i<16; i++)
{
- BTIF_TRACE_DEBUG2("pairing_cb.ble.pid_key[%d]=0x%02x",i,pairing_cb.ble.pid_key[i]);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.pid_key[%d]=0x%02x",i,pairing_cb.ble.pid_key[i]);
}
break;
case BTA_LE_KEY_PCSRK:
- BTIF_TRACE_DEBUG0("Rcv BTA_LE_KEY_PCSRK");
+ BTIF_TRACE_DEBUG("Rcv BTA_LE_KEY_PCSRK");
pairing_cb.ble.is_pcsrk_key_rcvd = TRUE;
pairing_cb.ble.pcsrk_key.counter = p_data->ble_key.key_value.pcsrk_key.counter;
pairing_cb.ble.pcsrk_key.sec_level = p_data->ble_key.key_value.pcsrk_key.sec_level;
@@ -1529,62 +1529,62 @@
for (i=0; i<16; i++)
{
- BTIF_TRACE_DEBUG2("pairing_cb.ble.pcsrk_key.csrk[%d]=0x%02x",i,pairing_cb.ble.pcsrk_key.csrk[i]);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.pcsrk_key.csrk[%d]=0x%02x",i,pairing_cb.ble.pcsrk_key.csrk[i]);
}
- BTIF_TRACE_DEBUG1("pairing_cb.ble.pcsrk_key.counter=0x%08x",pairing_cb.ble.pcsrk_key.counter);
- BTIF_TRACE_DEBUG1("pairing_cb.ble.pcsrk_key.sec_level=0x%02x",pairing_cb.ble.pcsrk_key.sec_level);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.pcsrk_key.counter=0x%08x",pairing_cb.ble.pcsrk_key.counter);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.pcsrk_key.sec_level=0x%02x",pairing_cb.ble.pcsrk_key.sec_level);
break;
case BTA_LE_KEY_LENC:
- BTIF_TRACE_DEBUG0("Rcv BTA_LE_KEY_LENC");
+ BTIF_TRACE_DEBUG("Rcv BTA_LE_KEY_LENC");
pairing_cb.ble.is_lenc_key_rcvd = TRUE;
pairing_cb.ble.lenc_key.div = p_data->ble_key.key_value.lenc_key.div;
pairing_cb.ble.lenc_key.key_size = p_data->ble_key.key_value.lenc_key.key_size;
pairing_cb.ble.lenc_key.sec_level = p_data->ble_key.key_value.lenc_key.sec_level;
- BTIF_TRACE_DEBUG1("pairing_cb.ble.lenc_key.div=0x%04x",pairing_cb.ble.lenc_key.div);
- BTIF_TRACE_DEBUG1("pairing_cb.ble.lenc_key.key_size=0x%02x",pairing_cb.ble.lenc_key.key_size);
- BTIF_TRACE_DEBUG1("pairing_cb.ble.lenc_key.sec_level=0x%02x",pairing_cb.ble.lenc_key.sec_level);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.lenc_key.div=0x%04x",pairing_cb.ble.lenc_key.div);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.lenc_key.key_size=0x%02x",pairing_cb.ble.lenc_key.key_size);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.lenc_key.sec_level=0x%02x",pairing_cb.ble.lenc_key.sec_level);
break;
case BTA_LE_KEY_LCSRK:
- BTIF_TRACE_DEBUG0("Rcv BTA_LE_KEY_LCSRK");
+ BTIF_TRACE_DEBUG("Rcv BTA_LE_KEY_LCSRK");
pairing_cb.ble.is_lcsrk_key_rcvd = TRUE;
pairing_cb.ble.lcsrk_key.counter = p_data->ble_key.key_value.lcsrk_key.counter;
pairing_cb.ble.lcsrk_key.div = p_data->ble_key.key_value.lcsrk_key.div;
pairing_cb.ble.lcsrk_key.sec_level = p_data->ble_key.key_value.lcsrk_key.sec_level;
- BTIF_TRACE_DEBUG1("pairing_cb.ble.lcsrk_key.div=0x%04x",pairing_cb.ble.lcsrk_key.div);
- BTIF_TRACE_DEBUG1("pairing_cb.ble.lcsrk_key.counter=0x%08x",pairing_cb.ble.lcsrk_key.counter);
- BTIF_TRACE_DEBUG1("pairing_cb.ble.lcsrk_key.sec_level=0x%02x",pairing_cb.ble.lcsrk_key.sec_level);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.lcsrk_key.div=0x%04x",pairing_cb.ble.lcsrk_key.div);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.lcsrk_key.counter=0x%08x",pairing_cb.ble.lcsrk_key.counter);
+ BTIF_TRACE_DEBUG("pairing_cb.ble.lcsrk_key.sec_level=0x%02x",pairing_cb.ble.lcsrk_key.sec_level);
break;
default:
- BTIF_TRACE_ERROR1("unknown BLE key type (0x%02x)", p_data->ble_key.key_type);
+ BTIF_TRACE_ERROR("unknown BLE key type (0x%02x)", p_data->ble_key.key_type);
break;
}
break;
case BTA_DM_BLE_SEC_REQ_EVT:
- BTIF_TRACE_DEBUG0("BTA_DM_BLE_SEC_REQ_EVT. ");
+ BTIF_TRACE_DEBUG("BTA_DM_BLE_SEC_REQ_EVT. ");
btif_dm_ble_sec_req_evt(&p_data->ble_req);
break;
case BTA_DM_BLE_PASSKEY_NOTIF_EVT:
- BTIF_TRACE_DEBUG0("BTA_DM_BLE_PASSKEY_NOTIF_EVT. ");
+ BTIF_TRACE_DEBUG("BTA_DM_BLE_PASSKEY_NOTIF_EVT. ");
btif_dm_ble_key_notif_evt(&p_data->key_notif);
break;
case BTA_DM_BLE_PASSKEY_REQ_EVT:
- BTIF_TRACE_DEBUG0("BTA_DM_BLE_PASSKEY_REQ_EVT. ");
+ BTIF_TRACE_DEBUG("BTA_DM_BLE_PASSKEY_REQ_EVT. ");
btif_dm_ble_passkey_req_evt(&p_data->pin_req);
break;
case BTA_DM_BLE_OOB_REQ_EVT:
- BTIF_TRACE_DEBUG0("BTA_DM_BLE_OOB_REQ_EVT. ");
+ BTIF_TRACE_DEBUG("BTA_DM_BLE_OOB_REQ_EVT. ");
break;
case BTA_DM_BLE_LOCAL_IR_EVT:
- BTIF_TRACE_DEBUG0("BTA_DM_BLE_LOCAL_IR_EVT. ");
+ BTIF_TRACE_DEBUG("BTA_DM_BLE_LOCAL_IR_EVT. ");
ble_local_key_cb.is_id_keys_rcvd = TRUE;
memcpy(&ble_local_key_cb.id_keys.irk[0], &p_data->ble_id_keys.irk[0], sizeof(BT_OCTET16));
memcpy(&ble_local_key_cb.id_keys.ir[0], &p_data->ble_id_keys.ir[0], sizeof(BT_OCTET16));
@@ -1600,7 +1600,7 @@
BT_OCTET16_LEN);
break;
case BTA_DM_BLE_LOCAL_ER_EVT:
- BTIF_TRACE_DEBUG0("BTA_DM_BLE_LOCAL_ER_EVT. ");
+ BTIF_TRACE_DEBUG("BTA_DM_BLE_LOCAL_ER_EVT. ");
ble_local_key_cb.is_er_rcvd = TRUE;
memcpy(&ble_local_key_cb.er[0], &p_data->ble_er[0], sizeof(BT_OCTET16));
btif_storage_add_ble_local_key( (char *)&ble_local_key_cb.er[0],
@@ -1609,7 +1609,7 @@
break;
case BTA_DM_BLE_AUTH_CMPL_EVT:
- BTIF_TRACE_DEBUG0("BTA_DM_BLE_KEY_EVT. ");
+ BTIF_TRACE_DEBUG("BTA_DM_BLE_KEY_EVT. ");
btif_dm_ble_auth_cmpl_evt(&p_data->auth_cmpl);
break;
@@ -1649,7 +1649,7 @@
case BTA_DM_ROLE_CHG_EVT:
default:
- BTIF_TRACE_WARNING1( "btif_dm_cback : unhandled event (%d)", event );
+ BTIF_TRACE_WARNING( "btif_dm_cback : unhandled event (%d)", event );
break;
}
} /* btui_security_cback() */
@@ -1666,7 +1666,7 @@
*******************************************************************************/
static void btif_dm_generic_evt(UINT16 event, char* p_param)
{
- BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event);
+ BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
switch(event)
{
case BTIF_DM_CB_DISCOVERY_STARTED:
@@ -1720,7 +1720,7 @@
break;
default:
{
- BTIF_TRACE_WARNING2("%s : Unknown event 0x%x", __FUNCTION__, event);
+ BTIF_TRACE_WARNING("%s : Unknown event 0x%x", __FUNCTION__, event);
}
break;
}
@@ -1779,7 +1779,7 @@
}
break;
}
- BTIF_TRACE_DEBUG3("%s event=%s param_len=%d", __FUNCTION__, dump_dm_search_event(event), param_len);
+ BTIF_TRACE_DEBUG("%s event=%s param_len=%d", __FUNCTION__, dump_dm_search_event(event), param_len);
/* if remote name is available in EIR, set teh flag so that stack doesnt trigger RNR */
if (event == BTA_DM_INQ_RES_EVT)
@@ -1855,7 +1855,7 @@
tBTA_DM_INQ inq_params;
tBTA_SERVICE_MASK services = 0;
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
/* TODO: Do we need to handle multiple inquiries at the same time? */
/* Set inquiry params and call API */
@@ -1897,7 +1897,7 @@
*******************************************************************************/
bt_status_t btif_dm_cancel_discovery(void)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
BTA_DmSearchCancel();
return BT_STATUS_SUCCESS;
}
@@ -1915,7 +1915,7 @@
{
bdstr_t bdstr;
- BTIF_TRACE_EVENT2("%s: bd_addr=%s", __FUNCTION__, bd2str((bt_bdaddr_t *) bd_addr, &bdstr));
+ BTIF_TRACE_EVENT("%s: bd_addr=%s", __FUNCTION__, bd2str((bt_bdaddr_t *) bd_addr, &bdstr));
if (pairing_cb.state != BT_BOND_STATE_NONE)
return BT_STATUS_BUSY;
@@ -1939,7 +1939,7 @@
{
bdstr_t bdstr;
- BTIF_TRACE_EVENT2("%s: bd_addr=%s", __FUNCTION__, bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
+ BTIF_TRACE_EVENT("%s: bd_addr=%s", __FUNCTION__, bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
/* TODO:
** 1. Restore scan modes
@@ -2024,7 +2024,7 @@
{
bdstr_t bdstr;
- BTIF_TRACE_EVENT2("%s: bd_addr=%s", __FUNCTION__, bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
+ BTIF_TRACE_EVENT("%s: bd_addr=%s", __FUNCTION__, bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
btif_transfer_context(btif_dm_generic_evt, BTIF_DM_CB_REMOVE_BOND,
(char *)bd_addr, sizeof(bt_bdaddr_t), NULL);
@@ -2044,7 +2044,7 @@
bt_status_t btif_dm_pin_reply( const bt_bdaddr_t *bd_addr, uint8_t accept,
uint8_t pin_len, bt_pin_code_t *pin_code)
{
- BTIF_TRACE_EVENT2("%s: accept=%d", __FUNCTION__, accept);
+ BTIF_TRACE_EVENT("%s: accept=%d", __FUNCTION__, accept);
#if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
if (pairing_cb.is_le_only)
@@ -2058,7 +2058,7 @@
{
passkey += (multi[i] * (pin_code->pin[i] - '0'));
}
- BTIF_TRACE_DEBUG1("btif_dm_pin_reply: passkey: %d", passkey);
+ BTIF_TRACE_DEBUG("btif_dm_pin_reply: passkey: %d", passkey);
BTA_DmBlePasskeyReply(remote_bd_addr, accept, passkey);
}
@@ -2097,11 +2097,11 @@
/* This is not implemented in the stack.
* For devices with display, this is not needed
*/
- BTIF_TRACE_WARNING1("%s: Not implemented", __FUNCTION__);
+ BTIF_TRACE_WARNING("%s: Not implemented", __FUNCTION__);
return BT_STATUS_FAIL;
}
/* BT_SSP_VARIANT_CONSENT & BT_SSP_VARIANT_PASSKEY_CONFIRMATION supported */
- BTIF_TRACE_EVENT2("%s: accept=%d", __FUNCTION__, accept);
+ BTIF_TRACE_EVENT("%s: accept=%d", __FUNCTION__, accept);
#if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
if (pairing_cb.is_le_only)
{
@@ -2132,7 +2132,7 @@
{
bt_status_t status;
- BTIF_TRACE_EVENT2("%s: type=0x%x", __FUNCTION__, prop->type);
+ BTIF_TRACE_EVENT("%s: type=0x%x", __FUNCTION__, prop->type);
switch (prop->type)
{
case BT_PROPERTY_BDNAME:
@@ -2180,7 +2180,7 @@
{
bdstr_t bdstr;
- BTIF_TRACE_EVENT2("%s: remote_addr=%s", __FUNCTION__, bd2str(remote_addr, &bdstr));
+ BTIF_TRACE_EVENT("%s: remote_addr=%s", __FUNCTION__, bd2str(remote_addr, &bdstr));
BTA_DmDiscover(remote_addr->address, BTA_ALL_SERVICE_MASK,
bte_dm_search_services_evt, TRUE);
@@ -2203,7 +2203,7 @@
tSDP_UUID sdp_uuid;
bdstr_t bdstr;
- BTIF_TRACE_EVENT2("%s: remote_addr=%s", __FUNCTION__, bd2str(remote_addr, &bdstr));
+ BTIF_TRACE_EVENT("%s: remote_addr=%s", __FUNCTION__, bd2str(remote_addr, &bdstr));
sdp_uuid.len = MAX_UUID_SIZE;
memcpy(sdp_uuid.uu.uuid128, uuid->uu, MAX_UUID_SIZE);
@@ -2254,7 +2254,7 @@
UNUSED (p_oob_data);
- BTIF_TRACE_DEBUG2("+%s: p_auth_req=%d", __FUNCTION__, *p_auth_req);
+ BTIF_TRACE_DEBUG("+%s: p_auth_req=%d", __FUNCTION__, *p_auth_req);
if(pairing_cb.is_local_initiated)
{
/* if initing/responding to a dedicated bonding, use dedicate bonding bit */
@@ -2265,7 +2265,7 @@
/* peer initiated paring. They probably know what they want.
** Copy the mitm from peer device.
*/
- BTIF_TRACE_DEBUG2("%s: setting p_auth_req to peer's: %d",
+ BTIF_TRACE_DEBUG("%s: setting p_auth_req to peer's: %d",
__FUNCTION__, pairing_cb.auth_req);
*p_auth_req = (pairing_cb.auth_req & BTA_AUTH_BONDS);
@@ -2278,7 +2278,7 @@
/* set the general bonding bit for stored device */
*p_auth_req = BTA_AUTH_GEN_BOND | yes_no_bit;
}
- BTIF_TRACE_DEBUG2("-%s: p_auth_req=%d", __FUNCTION__, *p_auth_req);
+ BTIF_TRACE_DEBUG("-%s: p_auth_req=%d", __FUNCTION__, *p_auth_req);
}
void btif_dm_proc_io_rsp(BD_ADDR bd_addr, tBTA_IO_CAP io_cap,
@@ -2289,7 +2289,7 @@
if(auth_req & BTA_AUTH_BONDS)
{
- BTIF_TRACE_DEBUG2("%s auth_req:%d", __FUNCTION__, auth_req);
+ BTIF_TRACE_DEBUG("%s auth_req:%d", __FUNCTION__, auth_req);
pairing_cb.auth_req = auth_req;
pairing_cb.io_cap = io_cap;
}
@@ -2307,7 +2307,7 @@
{
*p_oob_data = TRUE;
}
- BTIF_TRACE_DEBUG1("btif_dm_set_oob_for_io_req *p_oob_data=%d", *p_oob_data);
+ BTIF_TRACE_DEBUG("btif_dm_set_oob_for_io_req *p_oob_data=%d", *p_oob_data);
}
#endif /* BTM_OOB_INCLUDED */
@@ -2316,18 +2316,18 @@
{
char prop_oob[PROPERTY_VALUE_MAX];
property_get("service.brcm.bt.oob", prop_oob, "3");
- BTIF_TRACE_DEBUG1("btif_dm_load_local_oob prop_oob = %s",prop_oob);
+ BTIF_TRACE_DEBUG("btif_dm_load_local_oob prop_oob = %s",prop_oob);
if (prop_oob[0] != '3')
{
#if (BTM_OOB_INCLUDED == TRUE)
if (oob_cb.sp_c[0] == 0 && oob_cb.sp_c[1] == 0 &&
oob_cb.sp_c[2] == 0 && oob_cb.sp_c[3] == 0 )
{
- BTIF_TRACE_DEBUG0("btif_dm_load_local_oob: read OOB, call BTA_DmLocalOob()");
+ BTIF_TRACE_DEBUG("btif_dm_load_local_oob: read OOB, call BTA_DmLocalOob()");
BTA_DmLocalOob();
}
#else
- BTIF_TRACE_ERROR0("BTM_OOB_INCLUDED is FALSE!!(btif_dm_load_local_oob)");
+ BTIF_TRACE_ERROR("BTM_OOB_INCLUDED is FALSE!!(btif_dm_load_local_oob)");
#endif
}
}
@@ -2339,16 +2339,16 @@
char *path_b = "/data/misc/bluedroid/LOCAL/b.key";
char *path = NULL;
char prop_oob[PROPERTY_VALUE_MAX];
- BTIF_TRACE_DEBUG1("btif_dm_proc_loc_oob: valid=%d", valid);
+ BTIF_TRACE_DEBUG("btif_dm_proc_loc_oob: valid=%d", valid);
if (oob_cb.sp_c[0] == 0 && oob_cb.sp_c[1] == 0 &&
oob_cb.sp_c[2] == 0 && oob_cb.sp_c[3] == 0 &&
valid)
{
- BTIF_TRACE_DEBUG0("save local OOB data in memory");
+ BTIF_TRACE_DEBUG("save local OOB data in memory");
memcpy(oob_cb.sp_c, c, BT_OCTET16_LEN);
memcpy(oob_cb.sp_r, r, BT_OCTET16_LEN);
property_get("service.brcm.bt.oob", prop_oob, "3");
- BTIF_TRACE_DEBUG1("btif_dm_proc_loc_oob prop_oob = %s",prop_oob);
+ BTIF_TRACE_DEBUG("btif_dm_proc_loc_oob prop_oob = %s",prop_oob);
if (prop_oob[0] == '1')
path = path_a;
else if (prop_oob[0] == '2')
@@ -2358,11 +2358,11 @@
fp = fopen(path, "wb+");
if (fp == NULL)
{
- BTIF_TRACE_DEBUG1("btif_dm_proc_loc_oob: failed to save local OOB data to %s", path);
+ BTIF_TRACE_DEBUG("btif_dm_proc_loc_oob: failed to save local OOB data to %s", path);
}
else
{
- BTIF_TRACE_DEBUG1("btif_dm_proc_loc_oob: save local OOB data into file %s",path);
+ BTIF_TRACE_DEBUG("btif_dm_proc_loc_oob: save local OOB data into file %s",path);
fwrite (c , 1 , BT_OCTET16_LEN , fp );
fwrite (r , 1 , BT_OCTET16_LEN , fp );
fclose(fp);
@@ -2382,7 +2382,7 @@
bt_bdaddr_t bt_bd_addr;
bdcpy(oob_cb.oob_bdaddr, bd_addr);
property_get("service.brcm.bt.oob", prop_oob, "3");
- BTIF_TRACE_DEBUG1("btif_dm_proc_rmt_oob prop_oob = %s",prop_oob);
+ BTIF_TRACE_DEBUG("btif_dm_proc_rmt_oob prop_oob = %s",prop_oob);
if (prop_oob[0] == '1')
path = path_b;
else if (prop_oob[0] == '2')
@@ -2392,35 +2392,35 @@
fp = fopen(path, "rb");
if (fp == NULL)
{
- BTIF_TRACE_DEBUG1("btapp_dm_rmt_oob_reply: failed to read OOB keys from %s",path);
+ BTIF_TRACE_DEBUG("btapp_dm_rmt_oob_reply: failed to read OOB keys from %s",path);
return FALSE;
}
else
{
- BTIF_TRACE_DEBUG1("btif_dm_proc_rmt_oob: read OOB data from %s",path);
+ BTIF_TRACE_DEBUG("btif_dm_proc_rmt_oob: read OOB data from %s",path);
fread (p_c , 1 , BT_OCTET16_LEN , fp );
fread (p_r , 1 , BT_OCTET16_LEN , fp );
fclose(fp);
}
- BTIF_TRACE_DEBUG0("----btif_dm_proc_rmt_oob: TRUE");
+ BTIF_TRACE_DEBUG("----btif_dm_proc_rmt_oob: TRUE");
sprintf(t, "%02x:%02x:%02x:%02x:%02x:%02x",
oob_cb.oob_bdaddr[0], oob_cb.oob_bdaddr[1], oob_cb.oob_bdaddr[2],
oob_cb.oob_bdaddr[3], oob_cb.oob_bdaddr[4], oob_cb.oob_bdaddr[5]);
- BTIF_TRACE_DEBUG1("----btif_dm_proc_rmt_oob: peer_bdaddr = %s", t);
+ BTIF_TRACE_DEBUG("----btif_dm_proc_rmt_oob: peer_bdaddr = %s", t);
sprintf(t, "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x",
p_c[0], p_c[1], p_c[2], p_c[3], p_c[4], p_c[5], p_c[6], p_c[7],
p_c[8], p_c[9], p_c[10], p_c[11], p_c[12], p_c[13], p_c[14], p_c[15]);
- BTIF_TRACE_DEBUG1("----btif_dm_proc_rmt_oob: c = %s",t);
+ BTIF_TRACE_DEBUG("----btif_dm_proc_rmt_oob: c = %s",t);
sprintf(t, "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x",
p_r[0], p_r[1], p_r[2], p_r[3], p_r[4], p_r[5], p_r[6], p_r[7],
p_r[8], p_r[9], p_r[10], p_r[11], p_r[12], p_r[13], p_r[14], p_r[15]);
- BTIF_TRACE_DEBUG1("----btif_dm_proc_rmt_oob: r = %s",t);
+ BTIF_TRACE_DEBUG("----btif_dm_proc_rmt_oob: r = %s",t);
bdcpy(bt_bd_addr.address, bd_addr);
btif_transfer_context(btif_dm_generic_evt, BTIF_DM_CB_BOND_STATE_BONDING,
(char *)&bt_bd_addr, sizeof(bt_bdaddr_t), NULL);
result = TRUE;
}
- BTIF_TRACE_DEBUG1("btif_dm_proc_rmt_oob result=%d",result);
+ BTIF_TRACE_DEBUG("btif_dm_proc_rmt_oob result=%d",result);
return result;
}
#endif /* BTIF_DM_OOB_TEST */
@@ -2432,7 +2432,7 @@
bt_bdname_t bd_name;
UINT32 cod;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
/* Remote name update */
btif_update_remote_properties(p_ssp_key_notif->bd_addr , p_ssp_key_notif->bd_name,
@@ -2505,7 +2505,7 @@
BT_OCTET16_LEN)== BT_STATUS_SUCCESS)
{
ble_local_key_cb.is_er_rcvd = TRUE;
- BTIF_TRACE_DEBUG1("%s BLE ER key loaded",__FUNCTION__ );
+ BTIF_TRACE_DEBUG("%s BLE ER key loaded",__FUNCTION__ );
}
if ((btif_storage_get_ble_local_key(BTIF_DM_LE_LOCAL_KEY_IR,(char*)&ble_local_key_cb.id_keys.ir[0],
@@ -2516,7 +2516,7 @@
BT_OCTET16_LEN)== BT_STATUS_SUCCESS))
{
ble_local_key_cb.is_id_keys_rcvd = TRUE;
- BTIF_TRACE_DEBUG1("%s BLE ID keys loaded",__FUNCTION__ );
+ BTIF_TRACE_DEBUG("%s BLE ID keys loaded",__FUNCTION__ );
}
}
@@ -2536,7 +2536,7 @@
memcpy(&p_id_keys->dhk[0], &ble_local_key_cb.id_keys.dhk[0], sizeof(BT_OCTET16));
*p_key_mask |= BTA_BLE_LOCAL_KEY_TYPE_ID;
}
- BTIF_TRACE_DEBUG2("%s *p_key_mask=0x%02x",__FUNCTION__, *p_key_mask);
+ BTIF_TRACE_DEBUG("%s *p_key_mask=0x%02x",__FUNCTION__, *p_key_mask);
}
void btif_dm_save_ble_bonding_keys(void)
@@ -2544,7 +2544,7 @@
bt_bdaddr_t bd_addr;
- BTIF_TRACE_DEBUG1("%s",__FUNCTION__ );
+ BTIF_TRACE_DEBUG("%s",__FUNCTION__ );
bdcpy(bd_addr.address, pairing_cb.bd_addr);
@@ -2597,7 +2597,7 @@
{
bt_bdaddr_t bd_addr;
- BTIF_TRACE_DEBUG1("%s",__FUNCTION__ );
+ BTIF_TRACE_DEBUG("%s",__FUNCTION__ );
bdcpy(bd_addr.address, pairing_cb.bd_addr);
btif_storage_remove_ble_bonding_keys(&bd_addr);
@@ -2618,11 +2618,11 @@
bt_bdaddr_t bd_addr;
bt_bdname_t bd_name;
UINT32 cod;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (pairing_cb.state == BT_BOND_STATE_BONDING)
{
- BTIF_TRACE_DEBUG1("%s Discard security request", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s Discard security request", __FUNCTION__);
return;
}
@@ -2724,7 +2724,7 @@
BTM_BleTestEnd((tBTM_CMPL_CB*) btif_dm_ble_test_end_cback);
break;
default:
- BTIF_TRACE_ERROR2("%s: Unknown LE Test Mode Command 0x%x", __FUNCTION__, opcode);
+ BTIF_TRACE_ERROR("%s: Unknown LE Test Mode Command 0x%x", __FUNCTION__, opcode);
return BT_STATUS_UNSUPPORTED;
}
return BT_STATUS_SUCCESS;
@@ -2739,7 +2739,7 @@
{
bt_bdaddr_t bd_addr;
- BTIF_TRACE_DEBUG1("%s: Cancel pending pairing request", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: Cancel pending pairing request", __FUNCTION__);
bdcpy(bd_addr.address, pairing_cb.bd_addr);
btif_dm_cancel_bond(&bd_addr);
}
diff --git a/btif/src/btif_gatt_client.c b/btif/src/btif_gatt_client.c
index 2202e99..6d43e58 100644
--- a/btif/src/btif_gatt_client.c
+++ b/btif/src/btif_gatt_client.c
@@ -215,7 +215,7 @@
}
else
{
- BTIF_TRACE_WARNING2("%s :Src read.p_value ptr is NULL for event 0x%x",
+ BTIF_TRACE_WARNING("%s :Src read.p_value ptr is NULL for event 0x%x",
__FUNCTION__, event);
p_dest_data->read.p_value = NULL;
@@ -632,12 +632,12 @@
if(NULL == p_ref)
{
- BTIF_TRACE_ERROR1("%s Invalid p_ref received",__FUNCTION__);
+ BTIF_TRACE_ERROR("%s Invalid p_ref received",__FUNCTION__);
return;
}
client_if = *(UINT8 *)p_ref;
- BTIF_TRACE_DEBUG4("%s -Inst ID %d, Status:%x, client_if:%d",__FUNCTION__,inst_id, call_status,
+ BTIF_TRACE_DEBUG("%s -Inst ID %d, Status:%x, client_if:%d",__FUNCTION__,inst_id, call_status,
client_if);
btif_cb.status = call_status;
@@ -711,13 +711,13 @@
case BTA_DM_INQ_CMPL_EVT:
{
- BTIF_TRACE_DEBUG2("%s BLE observe complete. Num Resp %d",
+ BTIF_TRACE_DEBUG("%s BLE observe complete. Num Resp %d",
__FUNCTION__,p_data->inq_cmpl.num_resps);
return;
}
default:
- BTIF_TRACE_WARNING2("%s : Unknown event 0x%x", __FUNCTION__, event);
+ BTIF_TRACE_WARNING("%s : Unknown event 0x%x", __FUNCTION__, event);
return;
}
btif_transfer_context(btif_gattc_upstreams_evt, BTIF_GATT_OBSERVE_EVT,
@@ -838,7 +838,7 @@
}
// Connect!
- BTIF_TRACE_DEBUG2 ("BTA_GATTC_Open Transport = %d, dev type = %d",
+ BTIF_TRACE_DEBUG ("BTA_GATTC_Open Transport = %d, dev type = %d",
transport, device_type);
BTA_GATTC_Open(p_cb->client_if, p_cb->bd_addr.address, p_cb->is_direct, transport);
break;
@@ -1190,7 +1190,7 @@
&(p_multi_adv_data_cb->clntif_map[arrindex][CLNT_IF_IDX]));
}
else
- BTIF_TRACE_ERROR1("%s invalid index in BTIF_GATTC_ENABLE_ADV",__FUNCTION__);
+ BTIF_TRACE_ERROR("%s invalid index in BTIF_GATTC_ENABLE_ADV",__FUNCTION__);
break;
}
@@ -1210,7 +1210,7 @@
&(p_multi_adv_data_cb->inst_cb[cbindex].param));
}
else
- BTIF_TRACE_ERROR1("%s invalid index in BTIF_GATTC_UPDATE_ADV", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s invalid index in BTIF_GATTC_UPDATE_ADV", __FUNCTION__);
break;
}
@@ -1223,7 +1223,7 @@
int inst_id = btif_multi_adv_instid_for_clientif(p_adv_data->client_if);
if(inst_id < 0 || cbindex < 0)
{
- BTIF_TRACE_ERROR1("%s invalid index in BTIF_GATTC_SETADV_INST_DATA", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s invalid index in BTIF_GATTC_SETADV_INST_DATA", __FUNCTION__);
return;
}
@@ -1246,7 +1246,7 @@
if(inst_id >=0)
BTA_BleDisableAdvInstance((UINT8)inst_id);
else
- BTIF_TRACE_ERROR1("%s invalid instance ID in BTIF_GATTC_DISABLE_ADV",__FUNCTION__);
+ BTIF_TRACE_ERROR("%s invalid instance ID in BTIF_GATTC_DISABLE_ADV",__FUNCTION__);
break;
}
diff --git a/btif/src/btif_gatt_multi_adv_util.c b/btif/src/btif_gatt_multi_adv_util.c
index 58d067f..d5cf7c3 100644
--- a/btif/src/btif_gatt_multi_adv_util.c
+++ b/btif/src/btif_gatt_multi_adv_util.c
@@ -100,7 +100,7 @@
{
// Write the final inst_id value obtained from stack layer
p_multi_adv_data_cb->clntif_map[i][INST_ID_IDX] = inst_id;
- BTIF_TRACE_DEBUG3("%s -Index: %d, Found client_if: %d", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s -Index: %d, Found client_if: %d", __FUNCTION__,
i, p_multi_adv_data_cb->clntif_map[i][CLNT_IF_IDX]);
break;
}
@@ -111,7 +111,7 @@
p_multi_adv_data_cb->clntif_map[i][INST_ID_IDX] = inst_id;
else
p_multi_adv_data_cb->clntif_map[i][INST_ID_IDX] = (i + 1);
- BTIF_TRACE_DEBUG3("%s - Index:%d,Found client_if: %d", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s - Index:%d,Found client_if: %d", __FUNCTION__,
i, p_multi_adv_data_cb->clntif_map[i][CLNT_IF_IDX]);
break;
}
@@ -131,7 +131,7 @@
p_multi_adv_data_cb->clntif_map[i][INST_ID_IDX] = inst_id;
else
p_multi_adv_data_cb->clntif_map[i][INST_ID_IDX] = (i + 1);
- BTIF_TRACE_DEBUG4("%s -Not found - Index:%d, client_if: %d, Inst ID: %d",
+ BTIF_TRACE_DEBUG("%s -Not found - Index:%d, client_if: %d, Inst ID: %d",
__FUNCTION__,i,
p_multi_adv_data_cb->clntif_map[i][CLNT_IF_IDX],
p_multi_adv_data_cb->clntif_map[i][INST_ID_IDX]);
@@ -185,11 +185,11 @@
if(i < BTM_BLE_MULTI_ADV_MAX)
{
- BTIF_TRACE_DEBUG2("%s, %d",__FUNCTION__,i+1);
+ BTIF_TRACE_DEBUG("%s, %d",__FUNCTION__,i+1);
return (i + 1);
}
- BTIF_TRACE_DEBUG1("%s Invalid instance",__FUNCTION__);
+ BTIF_TRACE_DEBUG("%s Invalid instance",__FUNCTION__);
return INVALID_ADV_INST;
}
@@ -239,7 +239,7 @@
if(NULL == p_multi_adv_data_cb || cbindex < 0)
return false;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
memset(&p_multi_adv_data_cb->inst_cb[cbindex],0, sizeof(btgatt_multi_adv_inst_cb));
memset(&p_multi_adv_data_cb->inst_cb[cbindex].data, 0, sizeof(tBTA_BLE_ADV_DATA));
@@ -316,7 +316,7 @@
if (p_adv_data->service_data_len > 0 && p_adv_data->p_service_data != NULL)
{
- BTIF_TRACE_DEBUG1("%s - In service_data", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s - In service_data", __FUNCTION__);
p_elem_service_data = GKI_getbuf(sizeof(tBTA_BLE_PROP_ELEM));
if (p_elem_service_data != NULL)
{
@@ -434,7 +434,7 @@
{
p_multi_adv_data_cb->clntif_map[i][INST_ID_IDX] = INVALID_ADV_INST;
p_multi_adv_data_cb->clntif_map[i][CLNT_IF_IDX] = INVALID_ADV_INST;
- BTIF_TRACE_DEBUG2("Cleaning up index %d for clnt_if :%d,", i, client_if);
+ BTIF_TRACE_DEBUG("Cleaning up index %d for clnt_if :%d,", i, client_if);
break;
}
}
@@ -462,7 +462,7 @@
if(STD_ADV_INSTID == inst_id)
cbindex = STD_ADV_INSTID;
- BTIF_TRACE_DEBUG2("Cleaning up multi_inst_cb for inst_id %d, cbindex %d", inst_id, cbindex);
+ BTIF_TRACE_DEBUG("Cleaning up multi_inst_cb for inst_id %d, cbindex %d", inst_id, cbindex);
btif_gattc_cleanup_multi_inst_cb(&p_multi_adv_data_cb->inst_cb[cbindex]);
}
diff --git a/btif/src/btif_gatt_server.c b/btif/src/btif_gatt_server.c
index f5ad0f5..c05a272 100644
--- a/btif/src/btif_gatt_server.c
+++ b/btif/src/btif_gatt_server.c
@@ -399,7 +399,7 @@
break;
default:
- BTIF_TRACE_ERROR1 (" GATT Open :Invalid device type %d",device_type);
+ BTIF_TRACE_ERROR (" GATT Open :Invalid device type %d",device_type);
return;
}
diff --git a/btif/src/btif_gatt_util.c b/btif/src/btif_gatt_util.c
index 4facdef..c0a670c 100644
--- a/btif/src/btif_gatt_util.c
+++ b/btif/src/btif_gatt_util.c
@@ -340,7 +340,7 @@
break;
default:
- BTIF_TRACE_ERROR1 (" GATT Encrypt :Invalid device type %d",device_type);
+ BTIF_TRACE_ERROR (" GATT Encrypt :Invalid device type %d",device_type);
return;
}
BTA_DmSetEncryption(bd_addr,transport,
diff --git a/btif/src/btif_hf.c b/btif/src/btif_hf.c
index 1b826ae..bd9f8ff 100644
--- a/btif/src/btif_hf.c
+++ b/btif/src/btif_hf.c
@@ -108,27 +108,27 @@
#define CHECK_BTHF_INIT() if (bt_hf_callbacks == NULL)\
{\
- BTIF_TRACE_WARNING1("BTHF: %s: BTHF not initialized", __FUNCTION__);\
+ BTIF_TRACE_WARNING("BTHF: %s: BTHF not initialized", __FUNCTION__);\
return BT_STATUS_NOT_READY;\
}\
else\
{\
- BTIF_TRACE_EVENT1("BTHF: %s", __FUNCTION__);\
+ BTIF_TRACE_EVENT("BTHF: %s", __FUNCTION__);\
}
#define CHECK_BTHF_SLC_CONNECTED() if (bt_hf_callbacks == NULL)\
{\
- BTIF_TRACE_WARNING1("BTHF: %s: BTHF not initialized", __FUNCTION__);\
+ BTIF_TRACE_WARNING("BTHF: %s: BTHF not initialized", __FUNCTION__);\
return BT_STATUS_NOT_READY;\
}\
else if (btif_hf_cb.state != BTHF_CONNECTION_STATE_SLC_CONNECTED)\
{\
- BTIF_TRACE_WARNING2("BTHF: %s: SLC connection not up. state=%s", __FUNCTION__, dump_hf_conn_state(btif_hf_cb.state));\
+ BTIF_TRACE_WARNING("BTHF: %s: SLC connection not up. state=%s", __FUNCTION__, dump_hf_conn_state(btif_hf_cb.state));\
return BT_STATUS_NOT_READY;\
}\
else\
{\
- BTIF_TRACE_EVENT1("BTHF: %s", __FUNCTION__);\
+ BTIF_TRACE_EVENT("BTHF: %s", __FUNCTION__);\
}
/* BTIF-HF control block to map bdaddr to BTA handle */
@@ -322,7 +322,7 @@
{
if (bt_hf_callbacks == NULL)
{
- BTIF_TRACE_WARNING1("BTHF: %s: BTHF not initialized", __FUNCTION__);
+ BTIF_TRACE_WARNING("BTHF: %s: BTHF not initialized", __FUNCTION__);
return BT_STATUS_NOT_READY;
}
else
@@ -332,12 +332,12 @@
{
if ((btif_hf_cb[i].state == BTHF_CONNECTION_STATE_SLC_CONNECTED))
{
- BTIF_TRACE_EVENT2("BTHF: %s: slc connected for idx = %d",
+ BTIF_TRACE_EVENT("BTHF: %s: slc connected for idx = %d",
__FUNCTION__, i);
return BT_STATUS_SUCCESS;
}
}
- BTIF_TRACE_WARNING1("BTHF: %s: No SLC connection up", __FUNCTION__);
+ BTIF_TRACE_WARNING("BTHF: %s: No SLC connection up", __FUNCTION__);
return BT_STATUS_NOT_READY;
}
}
@@ -369,7 +369,7 @@
bt_bdaddr_t addr;
int idx = p_data->hdr.handle - 1;
- BTIF_TRACE_DEBUG2("%s: event=%s", __FUNCTION__, dump_hf_event(event));
+ BTIF_TRACE_DEBUG("%s: event=%s", __FUNCTION__, dump_hf_event(event));
switch (event)
{
@@ -379,7 +379,7 @@
case BTA_AG_REGISTER_EVT:
btif_hf_cb[idx].handle = p_data->reg.hdr.handle;
- BTIF_TRACE_DEBUG2("%s: BTA_AG_REGISTER_EVT,"
+ BTIF_TRACE_DEBUG("%s: BTA_AG_REGISTER_EVT,"
"btif_hf_cb.handle = %d", __FUNCTION__, btif_hf_cb[idx].handle);
break;
@@ -398,7 +398,7 @@
}
else
{
- BTIF_TRACE_WARNING4("%s: AG open failed, but another device connected. status=%d state=%d connected device=%s",
+ BTIF_TRACE_WARNING("%s: AG open failed, but another device connected. status=%d state=%d connected device=%s",
__FUNCTION__, p_data->open.status, btif_hf_cb[idx].state,
bd2str(&btif_hf_cb[idx].connected_bda, &bdstr));
break;
@@ -417,7 +417,7 @@
case BTA_AG_CLOSE_EVT:
btif_hf_cb[idx].connected_timestamp.tv_sec = 0;
btif_hf_cb[idx].state = BTHF_CONNECTION_STATE_DISCONNECTED;
- BTIF_TRACE_DEBUG3("%s: BTA_AG_CLOSE_EVT,"
+ BTIF_TRACE_DEBUG("%s: BTA_AG_CLOSE_EVT,"
"idx = %d, btif_hf_cb.handle = %d", __FUNCTION__, idx,
btif_hf_cb[idx].handle);
HAL_CBACK(bt_hf_callbacks, connection_state_cb, btif_hf_cb[idx].state,
@@ -435,7 +435,7 @@
case BTA_AG_CONN_EVT:
clock_gettime(CLOCK_MONOTONIC,
&btif_hf_cb[idx].connected_timestamp);
- BTIF_TRACE_DEBUG2("%s: BTA_AG_CONN_EVT, idx = %d ",
+ BTIF_TRACE_DEBUG("%s: BTA_AG_CONN_EVT, idx = %d ",
__FUNCTION__, idx);
btif_hf_cb[idx].peer_feat = p_data->conn.peer_feat;
btif_hf_cb[idx].state = BTHF_CONNECTION_STATE_SLC_CONNECTED;
@@ -470,7 +470,7 @@
if ((btif_hf_cb[0].num_held + btif_hf_cb[0].num_active) == 0)
hf_idx = idx;
else
- BTIF_TRACE_DEBUG0("Donot set hf_idx for ATA since already in a call");
+ BTIF_TRACE_DEBUG("Donot set hf_idx for ATA since already in a call");
HAL_CBACK(bt_hf_callbacks, answer_call_cmd_cb,
&btif_hf_cb[idx].connected_bda);
@@ -482,7 +482,7 @@
if ((btif_hf_cb[0].num_held + btif_hf_cb[0].num_active) == 0)
hf_idx = idx;
else
- BTIF_TRACE_DEBUG0("Donot set hf_idx for BLDN/D since already in a call");
+ BTIF_TRACE_DEBUG("Donot set hf_idx for BLDN/D since already in a call");
HAL_CBACK(bt_hf_callbacks, dial_call_cmd_cb,
(event == BTA_AG_AT_D_EVT) ? p_data->val.str : NULL,
@@ -559,7 +559,7 @@
default:
- BTIF_TRACE_WARNING2("%s: Unhandled event: %d", __FUNCTION__, event);
+ BTIF_TRACE_WARNING("%s: Unhandled event: %d", __FUNCTION__, event);
break;
}
}
@@ -613,7 +613,7 @@
{
int idx = btif_hf_idx_by_bdaddr((bt_bdaddr_t *)p_param);
- BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event);
+ BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
switch (event) {
case BTIF_HFP_CB_AUDIO_CONNECTING:
{
@@ -622,7 +622,7 @@
} break;
default:
{
- BTIF_TRACE_WARNING2("%s : Unknown event 0x%x", __FUNCTION__, event);
+ BTIF_TRACE_WARNING("%s : Unknown event 0x%x", __FUNCTION__, event);
}
break;
}
@@ -640,7 +640,7 @@
*******************************************************************************/
static bt_status_t init( bthf_callbacks_t* callbacks, int max_hf_clients)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
int i;
bt_hf_callbacks = callbacks;
@@ -657,7 +657,7 @@
memset(&btif_hf_cb, 0, sizeof(btif_hf_cb));
btif_max_hf_clients = max_hf_clients;
- BTIF_TRACE_DEBUG1("btif_max_hf_clients = %d", btif_max_hf_clients);
+ BTIF_TRACE_DEBUG("btif_max_hf_clients = %d", btif_max_hf_clients);
for (i = 0; i < btif_max_hf_clients; i++)
{
clear_phone_state_multihf(i);
@@ -1078,7 +1078,7 @@
}
else
{
- BTIF_TRACE_EVENT6("clcc_response: [%d] dir %d state %d mode %d number = %s type = %d",
+ BTIF_TRACE_EVENT("clcc_response: [%d] dir %d state %d mode %d number = %s type = %d",
index, dir, state, mode, number, type);
xx = sprintf (ag_res.str, "%d,%d,%d,%d,%d",
index, dir, state, mode, mpty);
@@ -1126,13 +1126,13 @@
else
idx = btif_hf_latest_connected_idx();
- BTIF_TRACE_DEBUG1("phone_state_change: idx = %d", idx);
+ BTIF_TRACE_DEBUG("phone_state_change: idx = %d", idx);
/* Check if SLC is connected */
if (btif_hf_check_if_slc_connected() != BT_STATUS_SUCCESS)
return BT_STATUS_NOT_READY;
- BTIF_TRACE_DEBUG6("phone_state_change: num_active=%d [prev: %d] num_held=%d[prev: %d]"
+ BTIF_TRACE_DEBUG("phone_state_change: num_active=%d [prev: %d] num_held=%d[prev: %d]"
" call_setup=%s [prev: %s]", num_active, btif_hf_cb[idx].num_active,
num_held, btif_hf_cb[idx].num_held, dump_hf_call_state(call_setup_state),
dump_hf_call_state(btif_hf_cb[idx].call_setup_state));
@@ -1140,14 +1140,14 @@
/* if all indicators are 0, send end call and return */
if (num_active == 0 && num_held == 0 && call_setup_state == BTHF_CALL_STATE_IDLE)
{
- BTIF_TRACE_DEBUG1("%s: Phone on hook", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: Phone on hook", __FUNCTION__);
/* record call termination timestamp if there was an active/held call or
callsetup state > BTHF_CALL_STATE_IDLE */
if ((btif_hf_cb[idx].call_setup_state != BTHF_CALL_STATE_IDLE ) ||
(btif_hf_cb[idx].num_active) ||(btif_hf_cb[idx].num_held))
{
- BTIF_TRACE_DEBUG1("%s: Record call termination timestamp", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: Record call termination timestamp", __FUNCTION__);
clock_gettime(CLOCK_MONOTONIC, &btif_hf_cb[0].call_end_timestamp);
}
BTA_AgResult (BTA_AG_HANDLE_ALL, BTA_AG_END_CALL_RES, NULL);
@@ -1174,7 +1174,7 @@
if ( (num_active == 1) && (btif_hf_cb[idx].num_active == 0) && (btif_hf_cb[idx].num_held == 0)
&& (btif_hf_cb[idx].call_setup_state == BTHF_CALL_STATE_IDLE) )
{
- BTIF_TRACE_DEBUG1("%s: Active call notification received without call setup update",
+ BTIF_TRACE_DEBUG("%s: Active call notification received without call setup update",
__FUNCTION__);
memset(&ag_res, 0, sizeof(tBTA_AG_RES_DATA));
@@ -1187,7 +1187,7 @@
/* Ringing call changed? */
if (call_setup_state != btif_hf_cb[idx].call_setup_state)
{
- BTIF_TRACE_DEBUG3("%s: Call setup states changed. old: %s new: %s",
+ BTIF_TRACE_DEBUG("%s: Call setup states changed. old: %s new: %s",
__FUNCTION__, dump_hf_call_state(btif_hf_cb[idx].call_setup_state),
dump_hf_call_state(call_setup_state));
memset(&ag_res, 0, sizeof(tBTA_AG_RES_DATA));
@@ -1220,7 +1220,7 @@
res = BTA_AG_CALL_CANCEL_RES;
break;
default:
- BTIF_TRACE_ERROR1("%s: Incorrect Call setup state transition", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s: Incorrect Call setup state transition", __FUNCTION__);
status = BT_STATUS_PARM_INVALID;
break;
}
@@ -1255,11 +1255,11 @@
res = BTA_AG_OUT_CALL_ALERT_RES;
break;
default:
- BTIF_TRACE_ERROR1("%s: Incorrect new ringing call state", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s: Incorrect new ringing call state", __FUNCTION__);
status = BT_STATUS_PARM_INVALID;
break;
}
- BTIF_TRACE_DEBUG3("%s: Call setup state changed. res=%d, audio_handle=%d", __FUNCTION__, res, ag_res.audio_handle);
+ BTIF_TRACE_DEBUG("%s: Call setup state changed. res=%d, audio_handle=%d", __FUNCTION__, res, ag_res.audio_handle);
if (res)
BTA_AgResult(BTA_AG_HANDLE_ALL, res, &ag_res);
@@ -1283,14 +1283,14 @@
if (!activeCallUpdated && ((num_active + num_held) !=
(btif_hf_cb[idx].num_active + btif_hf_cb[idx].num_held)) )
{
- BTIF_TRACE_DEBUG3("%s: Active call states changed. old: %d new: %d", __FUNCTION__, btif_hf_cb[idx].num_active, num_active);
+ BTIF_TRACE_DEBUG("%s: Active call states changed. old: %d new: %d", __FUNCTION__, btif_hf_cb[idx].num_active, num_active);
send_indicator_update(BTA_AG_IND_CALL, ((num_active + num_held) > 0) ? 1 : 0);
}
/* Held Changed? */
if (num_held != btif_hf_cb[idx].num_held)
{
- BTIF_TRACE_DEBUG3("%s: Held call states changed. old: %d new: %d",
+ BTIF_TRACE_DEBUG("%s: Held call states changed. old: %d new: %d",
__FUNCTION__, btif_hf_cb[idx].num_held, num_held);
send_indicator_update(BTA_AG_IND_CALLHELD, ((num_held == 0) ? 0 : ((num_active == 0) ? 2 : 1)));
}
@@ -1301,7 +1301,7 @@
(num_active == btif_hf_cb[idx].num_active) &&
(num_held == btif_hf_cb[idx].num_held) )
{
- BTIF_TRACE_DEBUG1("%s: Calls swapped", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: Calls swapped", __FUNCTION__);
send_indicator_update(BTA_AG_IND_CALLHELD, 1);
}
@@ -1353,7 +1353,7 @@
*******************************************************************************/
static void cleanup( void )
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
if (bt_hf_callbacks)
{
@@ -1428,6 +1428,6 @@
*******************************************************************************/
const bthf_interface_t *btif_hf_get_interface()
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
return &bthfInterface;
}
diff --git a/btif/src/btif_hf_client.c b/btif/src/btif_hf_client.c
index 98a73d8..22d5ba2 100644
--- a/btif/src/btif_hf_client.c
+++ b/btif/src/btif_hf_client.c
@@ -76,29 +76,29 @@
#define CHECK_BTHF_CLIENT_INIT() if (bt_hf_client_callbacks == NULL)\
{\
- BTIF_TRACE_WARNING1("BTHF CLIENT: %s: not initialized", __FUNCTION__);\
+ BTIF_TRACE_WARNING("BTHF CLIENT: %s: not initialized", __FUNCTION__);\
return BT_STATUS_NOT_READY;\
}\
else\
{\
- BTIF_TRACE_EVENT1("BTHF CLIENT: %s", __FUNCTION__);\
+ BTIF_TRACE_EVENT("BTHF CLIENT: %s", __FUNCTION__);\
}
#define CHECK_BTHF_CLIENT_SLC_CONNECTED() if (bt_hf_client_callbacks == NULL)\
{\
- BTIF_TRACE_WARNING1("BTHF CLIENT: %s: not initialized", __FUNCTION__);\
+ BTIF_TRACE_WARNING("BTHF CLIENT: %s: not initialized", __FUNCTION__);\
return BT_STATUS_NOT_READY;\
}\
else if (btif_hf_client_cb.state != BTHF_CLIENT_CONNECTION_STATE_SLC_CONNECTED)\
{\
- BTIF_TRACE_WARNING2("BTHF CLIENT: %s: SLC connection not up. state=%s",\
+ BTIF_TRACE_WARNING("BTHF CLIENT: %s: SLC connection not up. state=%s",\
__FUNCTION__, \
dump_hf_conn_state(btif_hf_client_cb.state));\
return BT_STATUS_NOT_READY;\
}\
else\
{\
- BTIF_TRACE_EVENT1("BTHF CLIENT: %s", __FUNCTION__);\
+ BTIF_TRACE_EVENT("BTHF CLIENT: %s", __FUNCTION__);\
}
/* BTIF-HF control block to map bdaddr to BTA handle */
@@ -133,7 +133,7 @@
{
UNUSED(p_param);
- BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event);
+ BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
switch (event) {
case BTIF_HF_CLIENT_CB_AUDIO_CONNECTING:
{
@@ -142,7 +142,7 @@
} break;
default:
{
- BTIF_TRACE_WARNING2("%s : Unknown event 0x%x", __FUNCTION__, event);
+ BTIF_TRACE_WARNING("%s : Unknown event 0x%x", __FUNCTION__, event);
}
break;
}
@@ -191,7 +191,7 @@
*******************************************************************************/
static bt_status_t init( bthf_client_callbacks_t* callbacks )
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
bt_hf_client_callbacks = callbacks;
@@ -227,7 +227,7 @@
static bt_status_t connect( bt_bdaddr_t *bd_addr )
{
- BTIF_TRACE_EVENT1("HFP Client version is %s", btif_hf_client_version);
+ BTIF_TRACE_EVENT("HFP Client version is %s", btif_hf_client_version);
CHECK_BTHF_CLIENT_INIT();
return btif_queue_connect(UUID_SERVCLASS_HF_HANDSFREE, bd_addr, connect_int);
@@ -637,7 +637,7 @@
*******************************************************************************/
static void cleanup( void )
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
if (bt_hf_client_callbacks)
{
@@ -658,7 +658,7 @@
static bt_status_t send_at_cmd(int cmd,int val1,int val2,const char *arg)
{
CHECK_BTHF_CLIENT_SLC_CONNECTED();
- BTIF_TRACE_EVENT5("%s Cmd %d val1 %d val2 %d arg %s",
+ BTIF_TRACE_EVENT("%s Cmd %d val1 %d val2 %d arg %s",
__FUNCTION__,cmd,val1,val2,arg);
BTA_HfClientSendAT(btif_hf_client_cb.handle, cmd, val1, val2, arg);
@@ -737,7 +737,7 @@
tBTA_HF_CLIENT *p_data = (tBTA_HF_CLIENT *)p_param;
bdstr_t bdstr;
- BTIF_TRACE_DEBUG3("%s: event=%s (%u)", __FUNCTION__, dump_hf_client_event(event), event);
+ BTIF_TRACE_DEBUG("%s: event=%s (%u)", __FUNCTION__, dump_hf_client_event(event), event);
switch (event)
{
@@ -764,7 +764,7 @@
}
else
{
- BTIF_TRACE_WARNING4("%s: HF CLient open failed, but another device connected. status=%d state=%d connected device=%s",
+ BTIF_TRACE_WARNING("%s: HF CLient open failed, but another device connected. status=%d state=%d connected device=%s",
__FUNCTION__, p_data->open.status, btif_hf_client_cb.state, bd2str(&btif_hf_client_cb.connected_bda, &bdstr));
break;
}
@@ -899,7 +899,7 @@
HAL_CBACK(bt_hf_client_callbacks, ring_indication_cb);
break;
default:
- BTIF_TRACE_WARNING2("%s: Unhandled event: %d", __FUNCTION__, event);
+ BTIF_TRACE_WARNING("%s: Unhandled event: %d", __FUNCTION__, event);
break;
}
}
@@ -936,7 +936,7 @@
*******************************************************************************/
bt_status_t btif_hf_client_execute_service(BOOLEAN b_enable)
{
- BTIF_TRACE_EVENT2("%s enable:%d", __FUNCTION__, b_enable);
+ BTIF_TRACE_EVENT("%s enable:%d", __FUNCTION__, b_enable);
property_get("ro.bluetooth.hfp.ver", btif_hf_client_version, "1.5");
@@ -946,16 +946,16 @@
BTA_HfClientEnable(bte_hf_client_evt);
if (strcmp(btif_hf_client_version, "1.6") == 0)
{
- BTIF_TRACE_EVENT1("Support Codec Nego. %d ", BTIF_HF_CLIENT_FEATURES);
+ BTIF_TRACE_EVENT("Support Codec Nego. %d ", BTIF_HF_CLIENT_FEATURES);
BTA_HfClientRegister(BTIF_HF_CLIENT_SECURITY, BTIF_HF_CLIENT_FEATURES,
BTIF_HF_CLIENT_SERVICE_NAME);
}
else
{
- BTIF_TRACE_EVENT0("No Codec Nego Supported");
+ BTIF_TRACE_EVENT("No Codec Nego Supported");
btif_hf_client_features = BTIF_HF_CLIENT_FEATURES;
btif_hf_client_features = btif_hf_client_features & (~BTA_HF_CLIENT_FEAT_CODEC);
- BTIF_TRACE_EVENT1("btif_hf_client_features is %d", btif_hf_client_features);
+ BTIF_TRACE_EVENT("btif_hf_client_features is %d", btif_hf_client_features);
BTA_HfClientRegister(BTIF_HF_CLIENT_SECURITY, btif_hf_client_features,
BTIF_HF_CLIENT_SERVICE_NAME);
}
@@ -980,6 +980,6 @@
*******************************************************************************/
const bthf_client_interface_t *btif_hf_client_get_interface(void)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
return &bthfClientInterface;
}
diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c
index 8b4e806..034807c 100644
--- a/btif/src/btif_hh.c
+++ b/btif/src/btif_hh.c
@@ -132,12 +132,12 @@
#define CHECK_BTHH_INIT() if (bt_hh_callbacks == NULL)\
{\
- BTIF_TRACE_WARNING1("BTHH: %s: BTHH not initialized", __FUNCTION__);\
+ BTIF_TRACE_WARNING("BTHH: %s: BTHH not initialized", __FUNCTION__);\
return BT_STATUS_NOT_READY;\
}\
else\
{\
- BTIF_TRACE_EVENT1("BTHH: %s", __FUNCTION__);\
+ BTIF_TRACE_EVENT("BTHH: %s", __FUNCTION__);\
}
@@ -203,7 +203,7 @@
static void toggle_os_keylockstates(int fd, int changedlockstates)
{
- BTIF_TRACE_EVENT3("%s: fd = %d, changedlockstates = 0x%x",
+ BTIF_TRACE_EVENT("%s: fd = %d, changedlockstates = 0x%x",
__FUNCTION__, fd, changedlockstates);
UINT8 hidreport[9];
int reportIndex;
@@ -212,37 +212,37 @@
reportIndex=4;
if (changedlockstates & BTIF_HH_KEYSTATE_MASK_CAPSLOCK) {
- BTIF_TRACE_DEBUG1("%s Setting CAPSLOCK", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s Setting CAPSLOCK", __FUNCTION__);
hidreport[reportIndex++] = (UINT8)HID_REPORT_CAPSLOCK;
}
if (changedlockstates & BTIF_HH_KEYSTATE_MASK_NUMLOCK) {
- BTIF_TRACE_DEBUG1("%s Setting NUMLOCK", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s Setting NUMLOCK", __FUNCTION__);
hidreport[reportIndex++] = (UINT8)HID_REPORT_NUMLOCK;
}
if (changedlockstates & BTIF_HH_KEYSTATE_MASK_SCROLLLOCK) {
- BTIF_TRACE_DEBUG1("%s Setting SCROLLLOCK", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s Setting SCROLLLOCK", __FUNCTION__);
hidreport[reportIndex++] = (UINT8) HID_REPORT_SCROLLLOCK;
}
- BTIF_TRACE_DEBUG4("Writing hidreport #1 to os: "\
+ BTIF_TRACE_DEBUG("Writing hidreport #1 to os: "\
"%s: %x %x %x", __FUNCTION__,
hidreport[0], hidreport[1], hidreport[2]);
- BTIF_TRACE_DEBUG4("%s: %x %x %x", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s: %x %x %x", __FUNCTION__,
hidreport[3], hidreport[4], hidreport[5]);
- BTIF_TRACE_DEBUG4("%s: %x %x %x", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s: %x %x %x", __FUNCTION__,
hidreport[6], hidreport[7], hidreport[8]);
bta_hh_co_write(fd , hidreport, sizeof(hidreport));
usleep(200000);
memset(hidreport,0,9);
hidreport[0]=1;
- BTIF_TRACE_DEBUG4("Writing hidreport #2 to os: "\
+ BTIF_TRACE_DEBUG("Writing hidreport #2 to os: "\
"%s: %x %x %x", __FUNCTION__,
hidreport[0], hidreport[1], hidreport[2]);
- BTIF_TRACE_DEBUG4("%s: %x %x %x", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s: %x %x %x", __FUNCTION__,
hidreport[3], hidreport[4], hidreport[5]);
- BTIF_TRACE_DEBUG4("%s: %x %x %x ", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s: %x %x %x ", __FUNCTION__,
hidreport[6], hidreport[7], hidreport[8]);
bta_hh_co_write(fd , hidreport, sizeof(hidreport));
}
@@ -286,7 +286,7 @@
btif_hh_keylockstates}; /* keystate */
/* Set report for other keyboards */
- BTIF_TRACE_EVENT3("%s: setting report on dev_handle %d to 0x%x",
+ BTIF_TRACE_EVENT("%s: setting report on dev_handle %d to 0x%x",
__FUNCTION__, p_dev->dev_handle, btif_hh_keylockstates);
/* Get SetReport buffer */
@@ -310,7 +310,7 @@
{
int keylockstates;
- BTIF_TRACE_EVENT1("%s: Syncing keyboard lock states after "\
+ BTIF_TRACE_EVENT("%s: Syncing keyboard lock states after "\
"reconnect...",__FUNCTION__);
/*If the device is connected, update keyboard state */
update_keyboard_lockstates(p_dev);
@@ -321,7 +321,7 @@
keylockstates = get_keylockstates();
if (keylockstates)
{
- BTIF_TRACE_DEBUG2("%s: Sending hid report to kernel "\
+ BTIF_TRACE_DEBUG("%s: Sending hid report to kernel "\
"indicating lock key state 0x%x",__FUNCTION__,
keylockstates);
usleep(200000);
@@ -329,7 +329,7 @@
}
else
{
- BTIF_TRACE_DEBUG2("%s: NOT sending hid report to kernel "\
+ BTIF_TRACE_DEBUG("%s: NOT sending hid report to kernel "\
"indicating lock key state 0x%x",__FUNCTION__,
keylockstates);
}
@@ -413,7 +413,7 @@
{
if (p_dev->vup_timer_active)
{
- BTIF_TRACE_DEBUG0("stop VUP timer ");
+ BTIF_TRACE_DEBUG("stop VUP timer ");
btu_stop_timer(&p_dev->vup_timer);
}
p_dev->vup_timer_active = FALSE;
@@ -433,7 +433,7 @@
if (p_dev->vup_timer_active == FALSE)
{
- BTIF_TRACE_DEBUG0("Start VUP timer ");
+ BTIF_TRACE_DEBUG("Start VUP timer ");
memset(&p_dev->vup_timer, 0, sizeof(TIMER_LIST_ENT));
p_dev->vup_timer.param = (UINT32)btif_hh_tmr_hdlr;
btu_start_timer(&p_dev->vup_timer, BTU_TTYPE_USER_FUNC,
@@ -441,7 +441,7 @@
}
else
{
- BTIF_TRACE_DEBUG0("Restart VUP timer ");
+ BTIF_TRACE_DEBUG("Restart VUP timer ");
btu_stop_timer(&p_dev->vup_timer);
btu_start_timer(&p_dev->vup_timer, BTU_TTYPE_USER_FUNC,
BTIF_TIMEOUT_VUP_SECS);
@@ -463,7 +463,7 @@
int i;
for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
if (memcmp(&(btif_hh_cb.added_devices[i].bd_addr), &bda, BD_ADDR_LEN) == 0) {
- BTIF_TRACE_WARNING6(" Device %02X:%02X:%02X:%02X:%02X:%02X already added",
+ BTIF_TRACE_WARNING(" Device %02X:%02X:%02X:%02X:%02X:%02X already added",
bda.address[0], bda.address[1], bda.address[2], bda.address[3], bda.address[4], bda.address[5]);
return FALSE;
}
@@ -476,7 +476,7 @@
btif_hh_cb.added_devices[i].bd_addr.address[4] == 0 &&
btif_hh_cb.added_devices[i].bd_addr.address[5] == 0)
{
- BTIF_TRACE_WARNING6(" Added device %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_WARNING(" Added device %02X:%02X:%02X:%02X:%02X:%02X",
bda.address[0], bda.address[1], bda.address[2], bda.address[3], bda.address[4], bda.address[5]);
memcpy(&(btif_hh_cb.added_devices[i].bd_addr), &bda, BD_ADDR_LEN);
btif_hh_cb.added_devices[i].dev_handle = BTA_HH_INVALID_HANDLE;
@@ -485,7 +485,7 @@
}
}
- BTIF_TRACE_WARNING1("%s: Error, out of space to add device",__FUNCTION__);
+ BTIF_TRACE_WARNING("%s: Error, out of space to add device",__FUNCTION__);
return FALSE;
}
@@ -519,7 +519,7 @@
p_dev = btif_hh_find_dev_by_bda(&bd_addr);
if (p_dev == NULL) {
- BTIF_TRACE_WARNING6(" Oops, can't find device [%02x:%02x:%02x:%02x:%02x:%02x]",
+ BTIF_TRACE_WARNING(" Oops, can't find device [%02x:%02x:%02x:%02x:%02x:%02x]",
bd_addr.address[0], bd_addr.address[1], bd_addr.address[2], bd_addr.address[3], bd_addr.address[4], bd_addr.address[5]);
return;
}
@@ -533,12 +533,12 @@
btif_hh_cb.device_num--;
}
else {
- BTIF_TRACE_WARNING1("%s: device_num = 0", __FUNCTION__);
+ BTIF_TRACE_WARNING("%s: device_num = 0", __FUNCTION__);
}
p_dev->hh_keep_polling = 0;
p_dev->hh_poll_thread_id = -1;
- BTIF_TRACE_DEBUG2("%s: uhid fd = %d", __FUNCTION__, p_dev->fd);
+ BTIF_TRACE_DEBUG("%s: uhid fd = %d", __FUNCTION__, p_dev->fd);
if (p_dev->fd >= 0) {
bta_hh_co_destroy(p_dev->fd);
p_dev->fd = -1;
@@ -554,7 +554,7 @@
dest->descriptor.dsc_list = (UINT8 *) GKI_getbuf(src->descriptor.dl_len);
if (dest->descriptor.dsc_list == NULL)
{
- BTIF_TRACE_WARNING1("%s: Failed to allocate DSCP for CB", __FUNCTION__);
+ BTIF_TRACE_WARNING("%s: Failed to allocate DSCP for CB", __FUNCTION__);
return FALSE;
}
}
@@ -583,7 +583,7 @@
bt_status_t btif_hh_virtual_unplug(bt_bdaddr_t *bd_addr)
{
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
btif_hh_device_t *p_dev;
char bd_str[18];
sprintf(bd_str, "%02X:%02X:%02X:%02X:%02X:%02X",
@@ -593,7 +593,7 @@
if ((p_dev != NULL) && (p_dev->dev_status == BTHH_CONN_STATE_CONNECTED)
&& (p_dev->attr_mask & HID_VIRTUAL_CABLE))
{
- BTIF_TRACE_DEBUG1("%s Sending BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s Sending BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG", __FUNCTION__);
/* start the timer */
btif_hh_start_vup_timer(bd_addr);
p_dev->local_vup = TRUE;
@@ -602,7 +602,7 @@
}
else
{
- BTIF_TRACE_ERROR2("%s: Error, device %s not opened.", __FUNCTION__, bd_str);
+ BTIF_TRACE_ERROR("%s: Error, device %s not opened.", __FUNCTION__, bd_str);
return BT_STATUS_FAIL;
}
}
@@ -627,12 +627,12 @@
tBTA_HH_CONN conn;
CHECK_BTHH_INIT();
dev = btif_hh_find_dev_by_bda(bd_addr);
- BTIF_TRACE_DEBUG0("Connect _hh");
+ BTIF_TRACE_DEBUG("Connect _hh");
sprintf(bda_str, "%02X:%02X:%02X:%02X:%02X:%02X",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
if (dev == NULL && btif_hh_cb.device_num >= BTIF_HH_MAX_HID) {
// No space for more HID device now.
- BTIF_TRACE_WARNING2("%s: Error, exceeded the maximum supported HID device number %d",
+ BTIF_TRACE_WARNING("%s: Error, exceeded the maximum supported HID device number %d",
__FUNCTION__, BTIF_HH_MAX_HID);
return BT_STATUS_FAIL;
}
@@ -640,7 +640,7 @@
for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
if (memcmp(&(btif_hh_cb.added_devices[i].bd_addr), bd_addr, BD_ADDR_LEN) == 0) {
added_dev = &btif_hh_cb.added_devices[i];
- BTIF_TRACE_WARNING3("%s: Device %s already added, attr_mask = 0x%x",
+ BTIF_TRACE_WARNING("%s: Device %s already added, attr_mask = 0x%x",
__FUNCTION__, bda_str, added_dev->attr_mask);
}
}
@@ -648,7 +648,7 @@
if (added_dev != NULL) {
if (added_dev->dev_handle == BTA_HH_INVALID_HANDLE) {
// No space for more HID device now.
- BTIF_TRACE_ERROR2("%s: Error, device %s added but addition failed", __FUNCTION__, bda_str);
+ BTIF_TRACE_ERROR("%s: Error, device %s added but addition failed", __FUNCTION__, bda_str);
memset(&(added_dev->bd_addr), 0, 6);
added_dev->dev_handle = BTA_HH_INVALID_HANDLE;
return BT_STATUS_FAIL;
@@ -667,7 +667,7 @@
else
{
// This device shall be connected from the host side.
- BTIF_TRACE_ERROR2("%s: Error, device %s can only be reconnected from device side",
+ BTIF_TRACE_ERROR("%s: Error, device %s can only be reconnected from device side",
__FUNCTION__, bda_str);
return BT_STATUS_FAIL;
}
@@ -696,7 +696,7 @@
BTA_HhClose(p_dev->dev_handle);
}
else
- BTIF_TRACE_DEBUG1("%s-- Error: device not connected:",__FUNCTION__);
+ BTIF_TRACE_DEBUG("%s-- Error: device not connected:",__FUNCTION__);
}
/*******************************************************************************
@@ -713,7 +713,7 @@
{
BT_HDR* p_buf = create_pbuf(size, report);
if (p_buf == NULL) {
- APPL_TRACE_ERROR2("%s: Error, failed to allocate RPT buffer, size = %d", __FUNCTION__, size);
+ APPL_TRACE_ERROR("%s: Error, failed to allocate RPT buffer, size = %d", __FUNCTION__, size);
return;
}
BTA_HhSetReport(p_dev->dev_handle, r_type, p_buf);
@@ -747,21 +747,21 @@
int i;
int len, tmplen;
- BTIF_TRACE_DEBUG2("%s: event=%s", __FUNCTION__, dump_hh_event(event));
+ BTIF_TRACE_DEBUG("%s: event=%s", __FUNCTION__, dump_hh_event(event));
switch (event)
{
case BTA_HH_ENABLE_EVT:
- BTIF_TRACE_DEBUG2("%s: BTA_HH_ENABLE_EVT: status =%d",__FUNCTION__, p_data->status);
+ BTIF_TRACE_DEBUG("%s: BTA_HH_ENABLE_EVT: status =%d",__FUNCTION__, p_data->status);
if (p_data->status == BTA_HH_OK) {
btif_hh_cb.status = BTIF_HH_ENABLED;
- BTIF_TRACE_DEBUG1("%s--Loading added devices",__FUNCTION__);
+ BTIF_TRACE_DEBUG("%s--Loading added devices",__FUNCTION__);
/* Add hid descriptors for already bonded hid devices*/
btif_storage_load_bonded_hid_info();
}
else {
btif_hh_cb.status = BTIF_HH_DISABLED;
- BTIF_TRACE_WARNING1("BTA_HH_ENABLE_EVT: Error, HH enabling failed, status = %d", p_data->status);
+ BTIF_TRACE_WARNING("BTA_HH_ENABLE_EVT: Error, HH enabling failed, status = %d", p_data->status);
}
break;
@@ -776,15 +776,15 @@
}
}
else
- BTIF_TRACE_WARNING1("BTA_HH_DISABLE_EVT: Error, HH disabling failed, status = %d", p_data->status);
+ BTIF_TRACE_WARNING("BTA_HH_DISABLE_EVT: Error, HH disabling failed, status = %d", p_data->status);
break;
case BTA_HH_OPEN_EVT:
- BTIF_TRACE_WARNING3("%s: BTA_HH_OPN_EVT: handle=%d, status =%d",__FUNCTION__, p_data->conn.handle, p_data->conn.status);
+ BTIF_TRACE_WARNING("%s: BTA_HH_OPN_EVT: handle=%d, status =%d",__FUNCTION__, p_data->conn.handle, p_data->conn.status);
if (p_data->conn.status == BTA_HH_OK) {
p_dev = btif_hh_find_connected_dev_by_handle(p_data->conn.handle);
if (p_dev == NULL) {
- BTIF_TRACE_WARNING1("BTA_HH_OPEN_EVT: Error, cannot find device with handle %d", p_data->conn.handle);
+ BTIF_TRACE_WARNING("BTA_HH_OPEN_EVT: Error, cannot find device with handle %d", p_data->conn.handle);
btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED;
// The connect request must come from device side and exceeded the connected
// HID device number.
@@ -792,14 +792,14 @@
HAL_CBACK(bt_hh_callbacks, connection_state_cb, (bt_bdaddr_t*) &p_data->conn.bda,BTHH_CONN_STATE_DISCONNECTED);
}
else if (p_dev->fd < 0) {
- BTIF_TRACE_WARNING0("BTA_HH_OPEN_EVT: Error, failed to find the uhid driver...");
+ BTIF_TRACE_WARNING("BTA_HH_OPEN_EVT: Error, failed to find the uhid driver...");
memcpy(&(p_dev->bd_addr), p_data->conn.bda, BD_ADDR_LEN);
//remove the connection and then try again to reconnect from the mouse side to recover
btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED;
BTA_HhClose(p_data->conn.handle);
}
else {
- BTIF_TRACE_WARNING1("BTA_HH_OPEN_EVT: Found device...Getting dscp info for handle ... %d",p_data->conn.handle);
+ BTIF_TRACE_WARNING("BTA_HH_OPEN_EVT: Found device...Getting dscp info for handle ... %d",p_data->conn.handle);
memcpy(&(p_dev->bd_addr), p_data->conn.bda, BD_ADDR_LEN);
btif_hh_cb.status = BTIF_HH_DEV_CONNECTED;
// Send set_idle if the peer_device is a keyboard
@@ -820,11 +820,11 @@
}
break;
case BTA_HH_CLOSE_EVT:
- BTIF_TRACE_DEBUG2("BTA_HH_CLOSE_EVT: status = %d, handle = %d",
+ BTIF_TRACE_DEBUG("BTA_HH_CLOSE_EVT: status = %d, handle = %d",
p_data->dev_status.status, p_data->dev_status.handle);
p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);
if (p_dev != NULL) {
- BTIF_TRACE_DEBUG2("%s: uhid fd = %d", __FUNCTION__, p_dev->fd);
+ BTIF_TRACE_DEBUG("%s: uhid fd = %d", __FUNCTION__, p_dev->fd);
if(p_dev->vup_timer_active)
{
btif_hh_stop_vup_timer(&(p_dev->bd_addr));
@@ -832,12 +832,12 @@
btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED;
p_dev->dev_status = BTHH_CONN_STATE_DISCONNECTED;
HAL_CBACK(bt_hh_callbacks, connection_state_cb,&(p_dev->bd_addr), p_dev->dev_status);
- BTIF_TRACE_DEBUG2("%s: Closing uhid fd = %d", __FUNCTION__, p_dev->fd);
+ BTIF_TRACE_DEBUG("%s: Closing uhid fd = %d", __FUNCTION__, p_dev->fd);
bta_hh_co_destroy(p_dev->fd);
p_dev->fd = -1;
}
else {
- BTIF_TRACE_WARNING1("Error: cannot find device with handle %d", p_data->dev_status.handle);
+ BTIF_TRACE_WARNING("Error: cannot find device with handle %d", p_data->dev_status.handle);
}
break;
case BTA_HH_GET_RPT_EVT: {
@@ -845,7 +845,7 @@
UINT8 *data = NULL;
UINT16 len = 0;
- BTIF_TRACE_DEBUG2("BTA_HH_GET_RPT_EVT: status = %d, handle = %d",
+ BTIF_TRACE_DEBUG("BTA_HH_GET_RPT_EVT: status = %d, handle = %d",
p_data->hs_data.status, p_data->hs_data.handle);
/* p_rpt_data in HANDSHAKE response case */
if (hdr) {
@@ -858,18 +858,18 @@
(bt_bdaddr_t*) &(p_dev->bd_addr),
(bthh_status_t) p_data->hs_data.status, data, len);
} else {
- BTIF_TRACE_WARNING1("Error: cannot find device with handle %d", p_data->hs_data.handle);
+ BTIF_TRACE_WARNING("Error: cannot find device with handle %d", p_data->hs_data.handle);
}
break;
}
case BTA_HH_SET_RPT_EVT:
- BTIF_TRACE_DEBUG2("BTA_HH_SET_RPT_EVT: status = %d, handle = %d",
+ BTIF_TRACE_DEBUG("BTA_HH_SET_RPT_EVT: status = %d, handle = %d",
p_data->dev_status.status, p_data->dev_status.handle);
break;
case BTA_HH_GET_PROTO_EVT:
p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);
- BTIF_TRACE_WARNING4("BTA_HH_GET_PROTO_EVT: status = %d, handle = %d, proto = [%d], %s",
+ BTIF_TRACE_WARNING("BTA_HH_GET_PROTO_EVT: status = %d, handle = %d, proto = [%d], %s",
p_data->hs_data.status, p_data->hs_data.handle,
p_data->hs_data.rsp_data.proto_mode,
(p_data->hs_data.rsp_data.proto_mode == BTA_HH_PROTO_RPT_MODE) ? "Report Mode" :
@@ -879,29 +879,29 @@
break;
case BTA_HH_SET_PROTO_EVT:
- BTIF_TRACE_DEBUG2("BTA_HH_SET_PROTO_EVT: status = %d, handle = %d",
+ BTIF_TRACE_DEBUG("BTA_HH_SET_PROTO_EVT: status = %d, handle = %d",
p_data->dev_status.status, p_data->dev_status.handle);
break;
case BTA_HH_GET_IDLE_EVT:
- BTIF_TRACE_DEBUG3("BTA_HH_GET_IDLE_EVT: handle = %d, status = %d, rate = %d",
+ BTIF_TRACE_DEBUG("BTA_HH_GET_IDLE_EVT: handle = %d, status = %d, rate = %d",
p_data->hs_data.handle, p_data->hs_data.status,
p_data->hs_data.rsp_data.idle_rate);
break;
case BTA_HH_SET_IDLE_EVT:
- BTIF_TRACE_DEBUG2("BTA_HH_SET_IDLE_EVT: status = %d, handle = %d",
+ BTIF_TRACE_DEBUG("BTA_HH_SET_IDLE_EVT: status = %d, handle = %d",
p_data->dev_status.status, p_data->dev_status.handle);
break;
case BTA_HH_GET_DSCP_EVT:
- BTIF_TRACE_WARNING2("BTA_HH_GET_DSCP_EVT: status = %d, handle = %d",
+ BTIF_TRACE_WARNING("BTA_HH_GET_DSCP_EVT: status = %d, handle = %d",
p_data->dev_status.status, p_data->dev_status.handle);
len = p_data->dscp_info.descriptor.dl_len;
- BTIF_TRACE_DEBUG1("BTA_HH_GET_DSCP_EVT: len = %d", len);
+ BTIF_TRACE_DEBUG("BTA_HH_GET_DSCP_EVT: len = %d", len);
p_dev = btif_hh_cb.p_curr_dev;
if (p_dev == NULL) {
- BTIF_TRACE_ERROR0("BTA_HH_GET_DSCP_EVT: No HID device is currently connected");
+ BTIF_TRACE_ERROR("BTA_HH_GET_DSCP_EVT: No HID device is currently connected");
return;
}
if (p_dev->fd < 0) {
@@ -924,7 +924,7 @@
cached_name = "Bluetooth HID";
}
- BTIF_TRACE_WARNING2("%s: name = %s", __FUNCTION__, cached_name);
+ BTIF_TRACE_WARNING("%s: name = %s", __FUNCTION__, cached_name);
bta_hh_co_send_hid_info(p_dev, cached_name,
p_data->dscp_info.vendor_id, p_data->dscp_info.product_id,
p_data->dscp_info.version, p_data->dscp_info.ctry_code,
@@ -936,7 +936,7 @@
bt_status_t ret;
bdcpy(bda, p_dev->bd_addr.address);
btif_hh_copy_hid_info(&dscp_info, &p_data->dscp_info);
- BTIF_TRACE_DEBUG6("BTA_HH_GET_DSCP_EVT:bda = %02x:%02x:%02x:%02x:%02x:%02x",
+ BTIF_TRACE_DEBUG("BTA_HH_GET_DSCP_EVT:bda = %02x:%02x:%02x:%02x:%02x:%02x",
p_dev->bd_addr.address[0], p_dev->bd_addr.address[1],
p_dev->bd_addr.address[2],p_dev->bd_addr.address[3],
p_dev->bd_addr.address[4], p_dev->bd_addr.address[5]);
@@ -949,7 +949,7 @@
len, p_data->dscp_info.descriptor.dsc_list);
ASSERTC(ret == BT_STATUS_SUCCESS, "storing hid info failed", ret);
- BTIF_TRACE_WARNING0("BTA_HH_GET_DSCP_EVT: Called add device");
+ BTIF_TRACE_WARNING("BTA_HH_GET_DSCP_EVT: Called add device");
//Free buffer created for dscp_info;
if (dscp_info.descriptor.dl_len >0 && dscp_info.descriptor.dsc_list != NULL)
@@ -961,7 +961,7 @@
}
else {
//Device already added.
- BTIF_TRACE_WARNING1("%s: Device already added ",__FUNCTION__);
+ BTIF_TRACE_WARNING("%s: Device already added ",__FUNCTION__);
}
/*Sync HID Keyboard lockstates */
tmplen = sizeof(hid_kb_numlock_on_list)
@@ -973,7 +973,7 @@
p_data->dscp_info.product_id
== hid_kb_numlock_on_list[i].product_id)
{
- BTIF_TRACE_DEBUG3("%s() idx[%d] Enabling "\
+ BTIF_TRACE_DEBUG("%s() idx[%d] Enabling "\
"NUMLOCK for device :: %s", __FUNCTION__,
i, hid_kb_numlock_on_list[i].kb_name);
/* Enable NUMLOCK by default so that numeric
@@ -989,7 +989,7 @@
break;
case BTA_HH_ADD_DEV_EVT:
- BTIF_TRACE_WARNING2("BTA_HH_ADD_DEV_EVT: status = %d, handle = %d",p_data->dev_info.status, p_data->dev_info.handle);
+ BTIF_TRACE_WARNING("BTA_HH_ADD_DEV_EVT: status = %d, handle = %d",p_data->dev_info.status, p_data->dev_info.handle);
int i;
for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
if (memcmp(btif_hh_cb.added_devices[i].bd_addr.address, p_data->dev_info.bda, 6) == 0) {
@@ -1005,21 +1005,21 @@
}
break;
case BTA_HH_RMV_DEV_EVT:
- BTIF_TRACE_DEBUG2("BTA_HH_RMV_DEV_EVT: status = %d, handle = %d",
+ BTIF_TRACE_DEBUG("BTA_HH_RMV_DEV_EVT: status = %d, handle = %d",
p_data->dev_info.status, p_data->dev_info.handle);
- BTIF_TRACE_DEBUG6("BTA_HH_RMV_DEV_EVT:bda = %02x:%02x:%02x:%02x:%02x:%02x",
+ BTIF_TRACE_DEBUG("BTA_HH_RMV_DEV_EVT:bda = %02x:%02x:%02x:%02x:%02x:%02x",
p_data->dev_info.bda[0], p_data->dev_info.bda[1], p_data->dev_info.bda[2],
p_data->dev_info.bda[3], p_data->dev_info.bda[4], p_data->dev_info.bda[5]);
break;
case BTA_HH_VC_UNPLUG_EVT:
- BTIF_TRACE_DEBUG2("BTA_HH_VC_UNPLUG_EVT: status = %d, handle = %d",
+ BTIF_TRACE_DEBUG("BTA_HH_VC_UNPLUG_EVT: status = %d, handle = %d",
p_data->dev_status.status, p_data->dev_status.handle);
p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);
btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED;
if (p_dev != NULL) {
- BTIF_TRACE_DEBUG6("BTA_HH_VC_UNPLUG_EVT:bda = %02x:%02x:%02x:%02x:%02x:%02x",
+ BTIF_TRACE_DEBUG("BTA_HH_VC_UNPLUG_EVT:bda = %02x:%02x:%02x:%02x:%02x:%02x",
p_dev->bd_addr.address[0], p_dev->bd_addr.address[1],
p_dev->bd_addr.address[2],p_dev->bd_addr.address[3],
p_dev->bd_addr.address[4], p_dev->bd_addr.address[5]);
@@ -1029,9 +1029,9 @@
btif_hh_stop_vup_timer(&(p_dev->bd_addr));
}
p_dev->dev_status = BTHH_CONN_STATE_DISCONNECTED;
- BTIF_TRACE_DEBUG1("%s---Sending connection state change", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s---Sending connection state change", __FUNCTION__);
HAL_CBACK(bt_hh_callbacks, connection_state_cb,&(p_dev->bd_addr), p_dev->dev_status);
- BTIF_TRACE_DEBUG1("%s---Removing HID bond", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s---Removing HID bond", __FUNCTION__);
/* If it is locally initiated VUP or remote device has its major COD as
Peripheral removed the bond.*/
if (p_dev->local_vup || check_cod_hid(&(p_dev->bd_addr), COD_HID_MAJOR))
@@ -1053,7 +1053,7 @@
default:
- BTIF_TRACE_WARNING2("%s: Unhandled event: %d", __FUNCTION__, event);
+ BTIF_TRACE_WARNING("%s: Unhandled event: %d", __FUNCTION__, event);
break;
}
}
@@ -1111,7 +1111,7 @@
static void btif_hh_handle_evt(UINT16 event, char *p_param)
{
bt_bdaddr_t *bd_addr = (bt_bdaddr_t*)p_param;
- BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event);
+ BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
int ret;
switch(event)
{
@@ -1129,7 +1129,7 @@
case BTIF_HH_DISCONNECT_REQ_EVT:
{
- BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event);
+ BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
btif_hh_disconnect(bd_addr);
HAL_CBACK(bt_hh_callbacks, connection_state_cb,bd_addr,BTHH_CONN_STATE_DISCONNECTING);
}
@@ -1137,14 +1137,14 @@
case BTIF_HH_VUP_REQ_EVT:
{
- BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event);
+ BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
ret = btif_hh_virtual_unplug(bd_addr);
}
break;
default:
{
- BTIF_TRACE_WARNING2("%s : Unknown event 0x%x", __FUNCTION__, event);
+ BTIF_TRACE_WARNING("%s : Unknown event 0x%x", __FUNCTION__, event);
}
break;
}
@@ -1167,7 +1167,7 @@
int param_len = 0;
memset(&p_data, 0, sizeof(tBTA_HH));
- BTIF_TRACE_DEBUG2("%s timer_in_use=%d", __FUNCTION__, tle->in_use );
+ BTIF_TRACE_DEBUG("%s timer_in_use=%d", __FUNCTION__, tle->in_use );
for (i = 0; i < BTIF_HH_MAX_HID; i++) {
if (btif_hh_cb.devices[i].dev_status == BTHH_CONN_STATE_CONNECTED)
@@ -1203,7 +1203,7 @@
static bt_status_t init( bthh_callbacks_t* callbacks )
{
UINT32 i;
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
bt_hh_callbacks = callbacks;
memset(&btif_hh_cb, 0, sizeof(btif_hh_cb));
@@ -1252,7 +1252,7 @@
if (btif_hh_cb.status == BTIF_HH_DISABLED)
{
- BTIF_TRACE_WARNING2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ BTIF_TRACE_WARNING("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
return BT_STATUS_FAIL;
}
p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
@@ -1263,7 +1263,7 @@
}
else
{
- BTIF_TRACE_WARNING1("%s: Error, device not opened.", __FUNCTION__);
+ BTIF_TRACE_WARNING("%s: Error, device not opened.", __FUNCTION__);
return BT_STATUS_FAIL;
}
}
@@ -1287,13 +1287,13 @@
bd_addr->address[4], bd_addr->address[5]);
if (btif_hh_cb.status == BTIF_HH_DISABLED)
{
- BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
return BT_STATUS_FAIL;
}
p_dev = btif_hh_find_dev_by_bda(bd_addr);
if (!p_dev)
{
- BTIF_TRACE_ERROR2("%s: Error, device %s not opened.", __FUNCTION__, bd_str);
+ BTIF_TRACE_ERROR("%s: Error, device %s not opened.", __FUNCTION__, bd_str);
return BT_STATUS_FAIL;
}
btif_transfer_context(btif_hh_handle_evt, BTIF_HH_VUP_REQ_EVT,
@@ -1317,9 +1317,9 @@
tBTA_HH_DEV_DSCP_INFO dscp_info;
BD_ADDR* bda = (BD_ADDR*) bd_addr;
- BTIF_TRACE_DEBUG6("addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_DEBUG("addr = %02X:%02X:%02X:%02X:%02X:%02X",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
- BTIF_TRACE_DEBUG6("%s: sub_class = 0x%02x, app_id = %d, vendor_id = 0x%04x, "
+ BTIF_TRACE_DEBUG("%s: sub_class = 0x%02x, app_id = %d, vendor_id = 0x%04x, "
"product_id = 0x%04x, version= 0x%04x",
__FUNCTION__, hid_info.sub_class,
hid_info.app_id, hid_info.vendor_id, hid_info.product_id,
@@ -1327,7 +1327,7 @@
if (btif_hh_cb.status == BTIF_HH_DISABLED)
{
- BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
return BT_STATUS_FAIL;
}
@@ -1372,11 +1372,11 @@
BD_ADDR* bda = (BD_ADDR*) bd_addr;
UNUSED(protocolMode);
- BTIF_TRACE_DEBUG6(" addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_DEBUG(" addr = %02X:%02X:%02X:%02X:%02X:%02X",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
if (btif_hh_cb.status == BTIF_HH_DISABLED) {
- BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
return BT_STATUS_FAIL;
}
@@ -1407,24 +1407,24 @@
UINT8 proto_mode = protocolMode;
BD_ADDR* bda = (BD_ADDR*) bd_addr;
- BTIF_TRACE_DEBUG2("%s:proto_mode = %d", __FUNCTION__,protocolMode);
+ BTIF_TRACE_DEBUG("%s:proto_mode = %d", __FUNCTION__,protocolMode);
- BTIF_TRACE_DEBUG6("addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_DEBUG("addr = %02X:%02X:%02X:%02X:%02X:%02X",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
if (btif_hh_cb.status == BTIF_HH_DISABLED) {
- BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
return BT_STATUS_FAIL;
}
p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
if (p_dev == NULL) {
- BTIF_TRACE_WARNING6(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ BTIF_TRACE_WARNING(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
return BT_STATUS_FAIL;
}
else if (protocolMode != BTA_HH_PROTO_RPT_MODE && protocolMode != BTA_HH_PROTO_BOOT_MODE) {
- BTIF_TRACE_WARNING2("s: Error, device proto_mode = %d.", __FUNCTION__, proto_mode);
+ BTIF_TRACE_WARNING("s: Error, device proto_mode = %d.", __FUNCTION__, proto_mode);
return BT_STATUS_FAIL;
}
else {
@@ -1450,26 +1450,26 @@
btif_hh_device_t *p_dev;
BD_ADDR* bda = (BD_ADDR*) bd_addr;
- BTIF_TRACE_DEBUG4("%s:proto_mode = %dr_type = %d, rpt_id = %d, buf_size = %d", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s:proto_mode = %dr_type = %d, rpt_id = %d, buf_size = %d", __FUNCTION__,
reportType, reportId, bufferSize);
- BTIF_TRACE_DEBUG6("addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_DEBUG("addr = %02X:%02X:%02X:%02X:%02X:%02X",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
if (btif_hh_cb.status == BTIF_HH_DISABLED) {
- BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
return BT_STATUS_FAIL;
}
p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
if (p_dev == NULL) {
- BTIF_TRACE_ERROR6("%s: Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ BTIF_TRACE_ERROR("%s: Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
return BT_STATUS_FAIL;
}
else if ( ((int) reportType) <= BTA_HH_RPTT_RESRV || ((int) reportType) > BTA_HH_RPTT_FEATURE) {
- BTIF_TRACE_ERROR6(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ BTIF_TRACE_ERROR(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
return BT_STATUS_FAIL;
}
@@ -1496,25 +1496,25 @@
btif_hh_device_t *p_dev;
BD_ADDR* bda = (BD_ADDR*) bd_addr;
- BTIF_TRACE_DEBUG2("%s:reportType = %d", __FUNCTION__,reportType);
+ BTIF_TRACE_DEBUG("%s:reportType = %d", __FUNCTION__,reportType);
- BTIF_TRACE_DEBUG6("addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_DEBUG("addr = %02X:%02X:%02X:%02X:%02X:%02X",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
if (btif_hh_cb.status == BTIF_HH_DISABLED) {
- BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
return BT_STATUS_FAIL;
}
p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
if (p_dev == NULL) {
- BTIF_TRACE_ERROR6("%s: Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ BTIF_TRACE_ERROR("%s: Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
return BT_STATUS_FAIL;
}
else if ( ( (int) reportType) <= BTA_HH_RPTT_RESRV || ( (int) reportType) > BTA_HH_RPTT_FEATURE) {
- BTIF_TRACE_ERROR6(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ BTIF_TRACE_ERROR(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
return BT_STATUS_FAIL;
}
@@ -1525,7 +1525,7 @@
hexbuf = GKI_getbuf(len);
if (hexbuf == NULL) {
- BTIF_TRACE_ERROR2("%s: Error, failed to allocate RPT buffer, len = %d",
+ BTIF_TRACE_ERROR("%s: Error, failed to allocate RPT buffer, len = %d",
__FUNCTION__, len);
return BT_STATUS_FAIL;
}
@@ -1538,7 +1538,7 @@
if (hex_bytes_filled) {
BT_HDR* p_buf = create_pbuf(hex_bytes_filled, hexbuf);
if (p_buf == NULL) {
- BTIF_TRACE_ERROR2("%s: Error, failed to allocate RPT buffer, len = %d",
+ BTIF_TRACE_ERROR("%s: Error, failed to allocate RPT buffer, len = %d",
__FUNCTION__, hex_bytes_filled);
GKI_freebuf(hexbuf);
return BT_STATUS_FAIL;
@@ -1567,19 +1567,19 @@
btif_hh_device_t *p_dev;
BD_ADDR* bda = (BD_ADDR*) bd_addr;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
- BTIF_TRACE_DEBUG6("addr = %02X:%02X:%02X:%02X:%02X:%02X",
+ BTIF_TRACE_DEBUG("addr = %02X:%02X:%02X:%02X:%02X:%02X",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
if (btif_hh_cb.status == BTIF_HH_DISABLED) {
- BTIF_TRACE_ERROR2("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
+ BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status);
return BT_STATUS_FAIL;
}
p_dev = btif_hh_find_connected_dev_by_bda(bd_addr);
if (p_dev == NULL) {
- BTIF_TRACE_ERROR6("%s: Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
+ BTIF_TRACE_ERROR("%s: Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.",
(*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]);
return BT_STATUS_FAIL;
}
@@ -1591,7 +1591,7 @@
hexbuf = GKI_getbuf(len);
if (hexbuf == NULL) {
- BTIF_TRACE_ERROR2("%s: Error, failed to allocate RPT buffer, len = %d",
+ BTIF_TRACE_ERROR("%s: Error, failed to allocate RPT buffer, len = %d",
__FUNCTION__, len);
return BT_STATUS_FAIL;
}
@@ -1599,12 +1599,12 @@
/* Build a SendData data buffer */
memset(hexbuf, 0, len);
hex_bytes_filled = ascii_2_hex(data, len, hexbuf);
- BTIF_TRACE_ERROR2("Hex bytes filled, hex value: %d, %d", hex_bytes_filled, len);
+ BTIF_TRACE_ERROR("Hex bytes filled, hex value: %d, %d", hex_bytes_filled, len);
if (hex_bytes_filled) {
BT_HDR* p_buf = create_pbuf(hex_bytes_filled, hexbuf);
if (p_buf == NULL) {
- BTIF_TRACE_ERROR2("%s: Error, failed to allocate RPT buffer, len = %d",
+ BTIF_TRACE_ERROR("%s: Error, failed to allocate RPT buffer, len = %d",
__FUNCTION__, hex_bytes_filled);
GKI_freebuf(hexbuf);
return BT_STATUS_FAIL;
@@ -1631,18 +1631,18 @@
*******************************************************************************/
static void cleanup( void )
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
btif_hh_device_t *p_dev;
int i;
if (btif_hh_cb.status == BTIF_HH_DISABLED) {
- BTIF_TRACE_WARNING2("%s: HH disabling or disabled already, status = %d", __FUNCTION__, btif_hh_cb.status);
+ BTIF_TRACE_WARNING("%s: HH disabling or disabled already, status = %d", __FUNCTION__, btif_hh_cb.status);
return;
}
btif_hh_cb.status = BTIF_HH_DISABLING;
for (i = 0; i < BTIF_HH_MAX_HID; i++) {
p_dev = &btif_hh_cb.devices[i];
if (p_dev->dev_status != BTHH_CONN_STATE_UNKNOWN && p_dev->fd >= 0) {
- BTIF_TRACE_DEBUG2("%s: Closing uhid fd = %d", __FUNCTION__, p_dev->fd);
+ BTIF_TRACE_DEBUG("%s: Closing uhid fd = %d", __FUNCTION__, p_dev->fd);
bta_hh_co_destroy(p_dev->fd);
p_dev->fd = -1;
p_dev->hh_keep_polling = 0;
@@ -1709,6 +1709,6 @@
*******************************************************************************/
const bthh_interface_t *btif_hh_get_interface()
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
return &bthhInterface;
}
diff --git a/btif/src/btif_hl.c b/btif/src/btif_hl.c
index 8b950d1..3d77856 100644
--- a/btif/src/btif_hl.c
+++ b/btif/src/btif_hl.c
@@ -130,12 +130,12 @@
#define CHECK_BTHL_INIT() if (bt_hl_callbacks == NULL)\
{\
- BTIF_TRACE_WARNING1("BTHL: %s: BTHL not initialized", __FUNCTION__);\
+ BTIF_TRACE_WARNING("BTHL: %s: BTHL not initialized", __FUNCTION__);\
return BT_STATUS_NOT_READY;\
}\
else\
{\
- BTIF_TRACE_EVENT1("BTHL: %s", __FUNCTION__);\
+ BTIF_TRACE_EVENT("BTHL: %s", __FUNCTION__);\
}
@@ -170,7 +170,7 @@
{
char name[16];
prctl(BTIF_IF_GET_NAME, name, 0, 0, 0);
- BTIF_TRACE_DEBUG1("Process name (%s)", name);
+ BTIF_TRACE_DEBUG("Process name (%s)", name);
}
#define BTIF_TIMEOUT_CCH_NO_DCH_SECS 30
/*******************************************************************************
@@ -209,7 +209,7 @@
if (found)
break;
}
- BTIF_TRACE_DEBUG5("%s found=%d channel_id=0x%08x",
+ BTIF_TRACE_DEBUG("%s found=%d channel_id=0x%08x",
__FUNCTION__, found, channel_id, *p_app_idx, *p_mcl_idx);
return found;
@@ -231,25 +231,25 @@
for (i=0; i<BTA_HL_NUM_APPS; i++)
{
- BTIF_TRACE_DEBUG1("btif_hl_num_dchs:i = %d",i);
+ BTIF_TRACE_DEBUG("btif_hl_num_dchs:i = %d",i);
p_acb =BTIF_HL_GET_APP_CB_PTR(i);
if (p_acb && p_acb->in_use)
{
for (j=0; j < BTA_HL_NUM_MCLS ; j++)
{
if(p_acb->mcb[j].in_use)
- BTIF_TRACE_DEBUG3("btif_hl_num_dchs:mcb in use j=%d, mcl_handle=%d,mcb handle=%d",
+ BTIF_TRACE_DEBUG("btif_hl_num_dchs:mcb in use j=%d, mcl_handle=%d,mcb handle=%d",
j,mcl_handle, p_acb->mcb[j].mcl_handle);
if (p_acb->mcb[j].in_use &&
(p_acb->mcb[j].mcl_handle == mcl_handle))
{
p_mcb = &p_acb->mcb[j];
- BTIF_TRACE_DEBUG1("btif_hl_num_dchs: mcl handle found j =%d",j);
+ BTIF_TRACE_DEBUG("btif_hl_num_dchs: mcl handle found j =%d",j);
for (x=0; x < BTA_HL_NUM_MDLS_PER_MCL ; x ++)
{
if (p_mcb->mdl[x].in_use)
{
- BTIF_TRACE_DEBUG1("btif_hl_num_dchs_in_use:found x =%d",x);
+ BTIF_TRACE_DEBUG("btif_hl_num_dchs_in_use:found x =%d",x);
cnt++;
}
}
@@ -258,7 +258,7 @@
}
}
- BTIF_TRACE_DEBUG2("%s dch in use count=%d", __FUNCTION__, cnt);
+ BTIF_TRACE_DEBUG("%s dch in use count=%d", __FUNCTION__, cnt);
return cnt;
}
/*******************************************************************************
@@ -273,7 +273,7 @@
{
btif_hl_mcl_cb_t *p_mcb;
UINT8 i,j;
- BTIF_TRACE_DEBUG2("%s timer_in_use=%d", __FUNCTION__, tle->in_use );
+ BTIF_TRACE_DEBUG("%s timer_in_use=%d", __FUNCTION__, tle->in_use );
for (i=0; i < BTA_HL_NUM_APPS ; i ++)
{
@@ -283,18 +283,18 @@
if (p_mcb->cch_timer_active)
{
- BTIF_TRACE_DEBUG3("%app_idx=%d, mcl_idx=%d mcl-connected=%d",
+ BTIF_TRACE_DEBUG("%app_idx=%d, mcl_idx=%d mcl-connected=%d",
i, j, p_mcb->is_connected);
p_mcb->cch_timer_active = FALSE;
if (p_mcb->is_connected)
{
- BTIF_TRACE_DEBUG3("Idle timeout Close CCH app_idx=%d mcl_idx=%d mcl_handle=%d",
+ BTIF_TRACE_DEBUG("Idle timeout Close CCH app_idx=%d mcl_idx=%d mcl_handle=%d",
i ,j, p_mcb->mcl_handle);
BTA_HlCchClose(p_mcb->mcl_handle);
}
else
{
- BTIF_TRACE_DEBUG2("CCH idle timeout But CCH not connected app_idx=%d mcl_idx=%d ",i,j);
+ BTIF_TRACE_DEBUG("CCH idle timeout But CCH not connected app_idx=%d mcl_idx=%d ",i,j);
}
}
}
@@ -311,13 +311,13 @@
void btif_hl_stop_cch_timer(UINT8 app_idx, UINT8 mcl_idx)
{
btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
- BTIF_TRACE_DEBUG4("%s app_idx=%d, mcl_idx=%d timer_in_use=%d",
+ BTIF_TRACE_DEBUG("%s app_idx=%d, mcl_idx=%d timer_in_use=%d",
__FUNCTION__,app_idx, mcl_idx, p_mcb->cch_timer.in_use);
p_mcb->cch_timer_active = FALSE;
if (p_mcb->cch_timer.in_use)
{
- BTIF_TRACE_DEBUG0("stop CCH timer ");
+ BTIF_TRACE_DEBUG("stop CCH timer ");
btu_stop_timer(&p_mcb->cch_timer);
}
}
@@ -332,14 +332,14 @@
void btif_hl_start_cch_timer(UINT8 app_idx, UINT8 mcl_idx)
{
btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
- BTIF_TRACE_DEBUG5("%s app_idx=%d, mcl_idx=%d timer_active=%d timer_in_use=%d",
+ BTIF_TRACE_DEBUG("%s app_idx=%d, mcl_idx=%d timer_active=%d timer_in_use=%d",
__FUNCTION__,app_idx, mcl_idx,
p_mcb->cch_timer_active, p_mcb->cch_timer.in_use);
p_mcb->cch_timer_active = TRUE;
if (!p_mcb->cch_timer.in_use)
{
- BTIF_TRACE_DEBUG0("Start CCH timer ");
+ BTIF_TRACE_DEBUG("Start CCH timer ");
memset(&p_mcb->cch_timer, 0, sizeof(TIMER_LIST_ENT));
p_mcb->cch_timer.param = (UINT32)btif_hl_tmr_hdlr;
btu_start_timer(&p_mcb->cch_timer, BTU_TTYPE_USER_FUNC,
@@ -347,7 +347,7 @@
}
else
{
- BTIF_TRACE_DEBUG0("Restart CCH timer ");
+ BTIF_TRACE_DEBUG("Restart CCH timer ");
btu_stop_timer(&p_mcb->cch_timer);
btu_start_timer(&p_mcb->cch_timer, BTU_TTYPE_USER_FUNC,
BTIF_TIMEOUT_CCH_NO_DCH_SECS);
@@ -382,7 +382,7 @@
}
}
- BTIF_TRACE_DEBUG4("%s found=%d mdl_id=%d mdl_idx=%d ",
+ BTIF_TRACE_DEBUG("%s found=%d mdl_id=%d mdl_idx=%d ",
__FUNCTION__,found, mdl_id, i);
return found;
@@ -401,8 +401,8 @@
{
void *p_new;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
- BTIF_TRACE_DEBUG2("ret size=%d GKI_MAX_BUF_SIZE=%d",size, 6000);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("ret size=%d GKI_MAX_BUF_SIZE=%d",size, 6000);
if (size < 6000)
{
@@ -410,7 +410,7 @@
}
else
{
- BTIF_TRACE_DEBUG0("btif_hl_get_buf use HL large data pool");
+ BTIF_TRACE_DEBUG("btif_hl_get_buf use HL large data pool");
p_new = GKI_getpoolbuf(4);
}
@@ -429,12 +429,12 @@
{
if (*p != NULL)
{
- BTIF_TRACE_DEBUG1("%s OK", __FUNCTION__ );
+ BTIF_TRACE_DEBUG("%s OK", __FUNCTION__ );
GKI_freebuf(*p);
*p = NULL;
}
else
- BTIF_TRACE_ERROR1("%s NULL pointer",__FUNCTION__ );
+ BTIF_TRACE_ERROR("%s NULL pointer",__FUNCTION__ );
}
/*******************************************************************************
**
@@ -462,7 +462,7 @@
}
}
- BTIF_TRACE_DEBUG1("bta_hl_is_the_first_reliable_existed is_existed=%d ",is_existed );
+ BTIF_TRACE_DEBUG("bta_hl_is_the_first_reliable_existed is_existed=%d ",is_existed );
return is_existed;
}
/*******************************************************************************
@@ -476,7 +476,7 @@
*******************************************************************************/
static void btif_hl_clean_delete_mdl(btif_hl_delete_mdl_t *p_cb)
{
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__ );
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__ );
memset(p_cb, 0 , sizeof(btif_hl_delete_mdl_t));
}
@@ -491,7 +491,7 @@
*******************************************************************************/
static void btif_hl_clean_pcb(btif_hl_pending_chan_cb_t *p_pcb)
{
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__ );
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__ );
memset(p_pcb, 0 , sizeof(btif_hl_pending_chan_cb_t));
}
@@ -507,7 +507,7 @@
*******************************************************************************/
static void btif_hl_clean_mdl_cb(btif_hl_mdl_cb_t *p_dcb)
{
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__ );
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__ );
btif_hl_free_buf((void **) &p_dcb->p_rx_pkt);
btif_hl_free_buf((void **) &p_dcb->p_tx_pkt);
memset(p_dcb, 0 , sizeof(btif_hl_mdl_cb_t));
@@ -526,7 +526,7 @@
static void btif_hl_clean_mcl_cb(UINT8 app_idx, UINT8 mcl_idx)
{
btif_hl_mcl_cb_t *p_mcb;
- BTIF_TRACE_DEBUG3("%s app_idx=%d, mcl_idx=%d", __FUNCTION__,app_idx, mcl_idx);
+ BTIF_TRACE_DEBUG("%s app_idx=%d, mcl_idx=%d", __FUNCTION__,app_idx, mcl_idx);
p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
memset(p_mcb, 0, sizeof(btif_hl_mcl_cb_t));
}
@@ -567,12 +567,12 @@
BOOLEAN found = FALSE;
BOOLEAN elem_found;
- BTIF_TRACE_DEBUG0("btif_hl_find_sdp_idx_using_mdep_filter");
+ BTIF_TRACE_DEBUG("btif_hl_find_sdp_idx_using_mdep_filter");
num_recs = p_mcb->sdp.num_recs;
num_elems = p_acb->filter.num_elems;
if (!num_elems)
{
- BTIF_TRACE_DEBUG0("btif_hl_find_sdp_idx_using_mdep_filter num_elem=0");
+ BTIF_TRACE_DEBUG("btif_hl_find_sdp_idx_using_mdep_filter num_elem=0");
*p_sdp_idx = 0;
found = TRUE;
return found;
@@ -615,13 +615,13 @@
if (found)
{
- BTIF_TRACE_DEBUG1("btif_hl_find_sdp_idx_using_mdep_filter found idx=%d",i);
+ BTIF_TRACE_DEBUG("btif_hl_find_sdp_idx_using_mdep_filter found idx=%d",i);
*p_sdp_idx = i;
break;
}
}
- BTIF_TRACE_DEBUG3("%s found=%d sdp_idx=%d",__FUNCTION__ , found, *p_sdp_idx);
+ BTIF_TRACE_DEBUG("%s found=%d sdp_idx=%d",__FUNCTION__ , found, *p_sdp_idx);
btif_hl_reset_mdep_filter(app_idx);
@@ -654,7 +654,7 @@
UINT8 mdl_idx;
- BTIF_TRACE_DEBUG4("%s app_idx=%d mcl_idx=%d mdep_cfg_idx=%d",
+ BTIF_TRACE_DEBUG("%s app_idx=%d mcl_idx=%d mdep_cfg_idx=%d",
__FUNCTION__, app_idx, mcl_idx, mdep_cfg_idx );
switch (local_cfg)
{
@@ -675,13 +675,13 @@
dch_mode = BTA_HL_DCH_MODE_STREAMING;
break;
default:
- BTIF_TRACE_ERROR1("Invalid local_cfg=%d",local_cfg );
+ BTIF_TRACE_ERROR("Invalid local_cfg=%d",local_cfg );
return is_reconnect_ok;
break;
}
- BTIF_TRACE_DEBUG3("local_cfg=%d use_mdl_dch_mode=%d dch_mode=%d ",
+ BTIF_TRACE_DEBUG("local_cfg=%d use_mdl_dch_mode=%d dch_mode=%d ",
local_cfg, use_mdl_dch_mode, dch_mode );
for (i=0, p_mdl=&p_acb->mdl_cfg[0] ; i< BTA_HL_NUM_MDL_CFGS; i++, p_mdl++ )
@@ -693,7 +693,7 @@
p_mdl->base.mdl_id &&
!btif_hl_find_mdl_idx(app_idx, mcl_idx,p_mdl->base.mdl_id, &mdl_idx))
{
- BTIF_TRACE_DEBUG4("i=%d Matched active=%d mdl_id =%d, mdl_dch_mode=%d",
+ BTIF_TRACE_DEBUG("i=%d Matched active=%d mdl_id =%d, mdl_dch_mode=%d",
i, p_mdl->base.active, p_mdl->base.mdl_id,p_mdl->base.dch_mode);
if (!use_mdl_dch_mode)
{
@@ -701,7 +701,7 @@
{
is_reconnect_ok = TRUE;
*p_mdl_id = p_mdl->base.mdl_id;
- BTIF_TRACE_DEBUG2("reconnect is possible dch_mode=%d mdl_id=%d", dch_mode, p_mdl->base.mdl_id );
+ BTIF_TRACE_DEBUG("reconnect is possible dch_mode=%d mdl_id=%d", dch_mode, p_mdl->base.mdl_id );
break;
}
}
@@ -717,7 +717,7 @@
p_mdl1->base.dch_mode == BTA_HL_DCH_MODE_STREAMING)
{
stream_mode_avail = TRUE;
- BTIF_TRACE_DEBUG1("found streaming mode mdl index=%d", j);
+ BTIF_TRACE_DEBUG("found streaming mode mdl index=%d", j);
break;
}
}
@@ -726,14 +726,14 @@
{
dch_mode = BTA_HL_DCH_MODE_STREAMING;
*p_mdl_id = p_mdl1->base.mdl_id;
- BTIF_TRACE_DEBUG2("reconnect is ok index=%d dch_mode=streaming mdl_id=%d", j, *p_mdl_id);
+ BTIF_TRACE_DEBUG("reconnect is ok index=%d dch_mode=streaming mdl_id=%d", j, *p_mdl_id);
break;
}
else
{
dch_mode= p_mdl->base.dch_mode;
*p_mdl_id = p_mdl->base.mdl_id;
- BTIF_TRACE_DEBUG3("reconnect is ok index=%d dch_mode=%d mdl_id=%d", i, p_mdl->base.dch_mode, *p_mdl_id);
+ BTIF_TRACE_DEBUG("reconnect is ok index=%d dch_mode=%d mdl_id=%d", i, p_mdl->base.dch_mode, *p_mdl_id);
break;
}
@@ -743,7 +743,7 @@
}
- BTIF_TRACE_DEBUG3("is_reconnect_ok dch_mode=%d mdl_id=%d",is_reconnect_ok, dch_mode, *p_mdl_id);
+ BTIF_TRACE_DEBUG("is_reconnect_ok dch_mode=%d mdl_id=%d",is_reconnect_ok, dch_mode, *p_mdl_id);
return is_reconnect_ok;
}
@@ -768,9 +768,9 @@
tBTA_HL_MDL_ID mdl_id;
tBTA_HL_DCH_RECONNECT_PARAM reconnect_param;
- BTIF_TRACE_DEBUG2("%s app_id=%d ",
+ BTIF_TRACE_DEBUG("%s app_id=%d ",
__FUNCTION__, app_id );
- BTIF_TRACE_DEBUG6("DB [%02x:%02x:%02x:%02x:%02x:%02x]",
+ BTIF_TRACE_DEBUG("DB [%02x:%02x:%02x:%02x:%02x:%02x]",
bd_addr[0], bd_addr[1],bd_addr[2], bd_addr[3], bd_addr[4], bd_addr[5]);
if (btif_hl_find_app_idx(app_id, &app_idx))
@@ -802,14 +802,14 @@
if (!btif_hl_is_reconnect_possible(app_idx, mcl_idx, mdep_cfg_idx, p_dch_open_api, &mdl_id ))
{
- BTIF_TRACE_DEBUG0("Issue DCH open" );
+ BTIF_TRACE_DEBUG("Issue DCH open" );
BTA_HlDchOpen(p_mcb->mcl_handle, p_dch_open_api);
}
else
{
reconnect_param.ctrl_psm = p_mcb->ctrl_psm;
reconnect_param.mdl_id = mdl_id;;
- BTIF_TRACE_DEBUG2("Issue Reconnect ctrl_psm=0x%x mdl_id=0x%x",reconnect_param.ctrl_psm, reconnect_param.mdl_id );
+ BTIF_TRACE_DEBUG("Issue Reconnect ctrl_psm=0x%x mdl_id=0x%x",reconnect_param.ctrl_psm, reconnect_param.mdl_id );
BTA_HlDchReconnect(p_mcb->mcl_handle, &reconnect_param);
}
@@ -826,7 +826,7 @@
}
}
- BTIF_TRACE_DEBUG1("status=%d ", status);
+ BTIF_TRACE_DEBUG("status=%d ", status);
return status;
}
/*******************************************************************************
@@ -855,7 +855,7 @@
**
*******************************************************************************/
void btif_hl_display_bt_bda(bt_bdaddr_t *bd_addr){
- BTIF_TRACE_DEBUG6("DB [%02x:%02x:%02x:%02x:%02x:%02x]",
+ BTIF_TRACE_DEBUG("DB [%02x:%02x:%02x:%02x:%02x:%02x]",
bd_addr->address[0], bd_addr->address[1], bd_addr->address[2],
bd_addr->address[3], bd_addr->address[4], bd_addr->address[5]);
}
@@ -872,7 +872,7 @@
void btif_hl_dch_abort(UINT8 app_idx, UINT8 mcl_idx){
btif_hl_mcl_cb_t *p_mcb;
- BTIF_TRACE_DEBUG3("%s app_idx=%d mcl_idx=%d",__FUNCTION__, app_idx, mcl_idx );
+ BTIF_TRACE_DEBUG("%s app_idx=%d mcl_idx=%d",__FUNCTION__, app_idx, mcl_idx );
p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
if (p_mcb->is_connected)
{
@@ -903,9 +903,9 @@
UINT8 app_idx, mcl_idx, chan_idx;
BOOLEAN status = TRUE;
- BTIF_TRACE_DEBUG5("%s app_id=%d ctrl_psm=%d mdep_cfg_idx=%d op=%d",
+ BTIF_TRACE_DEBUG("%s app_id=%d ctrl_psm=%d mdep_cfg_idx=%d op=%d",
__FUNCTION__, app_id, ctrl_psm, mdep_cfg_idx, op);
- BTIF_TRACE_DEBUG6("DB [%02x:%02x:%02x:%02x:%02x:%02x]",
+ BTIF_TRACE_DEBUG("DB [%02x:%02x:%02x:%02x:%02x:%02x]",
bd_addr[0], bd_addr[1],bd_addr[2], bd_addr[3], bd_addr[4], bd_addr[5]);
if (btif_hl_find_app_idx(app_id, &app_idx))
@@ -956,28 +956,28 @@
else
{
status = FALSE;
- BTIF_TRACE_ERROR0("Open CCH request discarded- No mcl cb");
+ BTIF_TRACE_ERROR("Open CCH request discarded- No mcl cb");
}
}
else
{
status = FALSE;
- BTIF_TRACE_ERROR0("Open CCH request discarded- already in USE");
+ BTIF_TRACE_ERROR("Open CCH request discarded- already in USE");
}
}
else
{
status = FALSE;
- BTIF_TRACE_ERROR1("Invalid app_id=%d", app_id);
+ BTIF_TRACE_ERROR("Invalid app_id=%d", app_id);
}
if (channel_id)
{
- BTIF_TRACE_DEBUG2("status=%d channel_id=0x%08x", status, *channel_id);
+ BTIF_TRACE_DEBUG("status=%d channel_id=0x%08x", status, *channel_id);
}
else
{
- BTIF_TRACE_DEBUG1("status=%d ", status);
+ BTIF_TRACE_DEBUG("status=%d ", status);
}
return status;
}
@@ -1020,7 +1020,7 @@
}
}
- BTIF_TRACE_EVENT5("%s found=%d channel_id=0x%08x, app_idx=%d mdl_cfg_idx=%d ",
+ BTIF_TRACE_EVENT("%s found=%d channel_id=0x%08x, app_idx=%d mdl_cfg_idx=%d ",
__FUNCTION__,found,channel_id, i,j );
return found;
}
@@ -1065,7 +1065,7 @@
}
}
}
- BTIF_TRACE_DEBUG5("%s found=%d app_idx=%d mcl_idx=%d mdl_idx=%d ",
+ BTIF_TRACE_DEBUG("%s found=%d app_idx=%d mcl_idx=%d mdl_idx=%d ",
__FUNCTION__,found,i,j,k );
return found;
}
@@ -1100,7 +1100,7 @@
}
}
}
- BTIF_TRACE_EVENT6("%s found=%d channel_id=0x%08x, mdl_id=0x%x app_idx=%d mdl_cfg_idx=%d ",
+ BTIF_TRACE_EVENT("%s found=%d channel_id=0x%08x, mdl_id=0x%x app_idx=%d mdl_cfg_idx=%d ",
__FUNCTION__,found,*p_channel_id,mdl_id, app_idx,j );
return found;
}
@@ -1149,7 +1149,7 @@
}
- BTIF_TRACE_EVENT5("%s found=%d app_idx=%d mcl_idx=%d mdl_idx=%d ",
+ BTIF_TRACE_EVENT("%s found=%d app_idx=%d mcl_idx=%d mdl_idx=%d ",
__FUNCTION__,found,i,j,k );
return found;
}
@@ -1175,17 +1175,17 @@
tBTA_HL_MDEP_ROLE peer_mdep_role;
- BTIF_TRACE_DEBUG4("%s app_id=%d local_mdep_role=%d, data_type=%d",
+ BTIF_TRACE_DEBUG("%s app_id=%d local_mdep_role=%d, data_type=%d",
__FUNCTION__, app_id, local_mdep_role, data_type);
- BTIF_TRACE_DEBUG6("DB [%02x:%02x:%02x:%02x:%02x:%02x]",
+ BTIF_TRACE_DEBUG("DB [%02x:%02x:%02x:%02x:%02x:%02x]",
bd_addr[0], bd_addr[1],
bd_addr[2], bd_addr[3],
bd_addr[4], bd_addr[5]);
- BTIF_TRACE_DEBUG1("local_mdep_role=%d", local_mdep_role);
- BTIF_TRACE_DEBUG1("data_type=%d", data_type);
+ BTIF_TRACE_DEBUG("local_mdep_role=%d", local_mdep_role);
+ BTIF_TRACE_DEBUG("data_type=%d", data_type);
if (local_mdep_role == BTA_HL_MDEP_ROLE_SINK)
peer_mdep_role = BTA_HL_MDEP_ROLE_SOURCE;
@@ -1199,18 +1199,18 @@
{
p_mcb =BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
- BTIF_TRACE_DEBUG2("app_idx=%d mcl_idx=%d",app_idx, mcl_idx);
- BTIF_TRACE_DEBUG2("valid_spd_idx=%d sdp_idx=%d",p_mcb->valid_sdp_idx, p_mcb->sdp_idx);
+ BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=%d",app_idx, mcl_idx);
+ BTIF_TRACE_DEBUG("valid_spd_idx=%d sdp_idx=%d",p_mcb->valid_sdp_idx, p_mcb->sdp_idx);
if (p_mcb->valid_sdp_idx)
{
p_rec = &p_mcb->sdp.sdp_rec[p_mcb->sdp_idx];
num_mdeps = p_rec->num_mdeps;
- BTIF_TRACE_DEBUG1("num_mdeps=%d", num_mdeps);
+ BTIF_TRACE_DEBUG("num_mdeps=%d", num_mdeps);
for (i=0; i< num_mdeps; i++)
{
- BTIF_TRACE_DEBUG2("p_rec->mdep_cfg[%d].mdep_role=%d",i, p_rec->mdep_cfg[i].mdep_role);
- BTIF_TRACE_DEBUG2("p_rec->mdep_cfg[%d].data_type =%d",i, p_rec->mdep_cfg[i].data_type );
+ BTIF_TRACE_DEBUG("p_rec->mdep_cfg[%d].mdep_role=%d",i, p_rec->mdep_cfg[i].mdep_role);
+ BTIF_TRACE_DEBUG("p_rec->mdep_cfg[%d].data_type =%d",i, p_rec->mdep_cfg[i].data_type );
if ((p_rec->mdep_cfg[i].mdep_role == peer_mdep_role) &&
(p_rec->mdep_cfg[i].data_type == data_type))
{
@@ -1223,7 +1223,7 @@
}
}
- BTIF_TRACE_DEBUG2("found =%d *p_peer_mdep_id=%d", found, *p_peer_mdep_id);
+ BTIF_TRACE_DEBUG("found =%d *p_peer_mdep_id=%d", found, *p_peer_mdep_id);
return found;
}
@@ -1246,7 +1246,7 @@
for (i=0; i< p_sup_feature->num_of_mdeps; i++)
{
- BTIF_TRACE_DEBUG2("btif_hl_find_mdep_cfg_idx: mdep_id=%d app_idx = %d",
+ BTIF_TRACE_DEBUG("btif_hl_find_mdep_cfg_idx: mdep_id=%d app_idx = %d",
p_sup_feature->mdep[i].mdep_id,app_idx);
if ( p_sup_feature->mdep[i].mdep_id == local_mdep_id)
{
@@ -1256,7 +1256,7 @@
}
}
- BTIF_TRACE_DEBUG5("%s found=%d mdep_idx=%d local_mdep_id=%d app_idx=%d ",
+ BTIF_TRACE_DEBUG("%s found=%d mdep_idx=%d local_mdep_id=%d app_idx=%d ",
__FUNCTION__, found,i, local_mdep_id,app_idx);
return found;
}
@@ -1291,7 +1291,7 @@
}
- BTIF_TRACE_DEBUG3("%s found=%d idx=%d",__FUNCTION__, found, i);
+ BTIF_TRACE_DEBUG("%s found=%d idx=%d",__FUNCTION__, found, i);
return found;
}
/*******************************************************************************
@@ -1304,7 +1304,7 @@
**
*******************************************************************************/
static void btif_hl_init(void){
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
memset(p_btif_hl_cb, 0, sizeof(btif_hl_cb_t));
btif_hl_init_next_app_id();
btif_hl_init_next_channel_id();
@@ -1319,7 +1319,7 @@
**
*******************************************************************************/
static void btif_hl_disable(void){
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if ((p_btif_hl_cb->state != BTIF_HL_STATE_DISABLING) &&
(p_btif_hl_cb->state != BTIF_HL_STATE_DISABLED))
@@ -1350,7 +1350,7 @@
}
}
- BTIF_TRACE_DEBUG2("%s no_active_app=%d ", __FUNCTION__, no_active_app );
+ BTIF_TRACE_DEBUG("%s no_active_app=%d ", __FUNCTION__, no_active_app );
return no_active_app;
}
@@ -1381,7 +1381,7 @@
**
*******************************************************************************/
static void btif_hl_set_state(btif_hl_state_t state){
- BTIF_TRACE_DEBUG2("btif_hl_set_state: %d ---> %d ", p_btif_hl_cb->state, state);
+ BTIF_TRACE_DEBUG("btif_hl_set_state: %d ---> %d ", p_btif_hl_cb->state, state);
p_btif_hl_cb->state = state;
}
@@ -1396,7 +1396,7 @@
*******************************************************************************/
static btif_hl_state_t btif_hl_get_state(void){
- BTIF_TRACE_DEBUG1("btif_hl_get_state: %d ", p_btif_hl_cb->state);
+ BTIF_TRACE_DEBUG("btif_hl_get_state: %d ", p_btif_hl_cb->state);
return p_btif_hl_cb->state;
}
@@ -1423,7 +1423,7 @@
}
}
- BTIF_TRACE_DEBUG4("%s found=%d, data_type=0x%x idx=%d", __FUNCTION__, found, data_type, i);
+ BTIF_TRACE_DEBUG("%s found=%d, data_type=0x%x idx=%d", __FUNCTION__, found, data_type, i);
return found;
}
@@ -1467,7 +1467,7 @@
}
- BTIF_TRACE_DEBUG4("%s mdep_role=%d data_type=0x%4x size=%d",
+ BTIF_TRACE_DEBUG("%s mdep_role=%d data_type=0x%4x size=%d",
__FUNCTION__, mdep_role, data_type, max_tx_apdu_size);
return max_tx_apdu_size;
}
@@ -1512,7 +1512,7 @@
}
- BTIF_TRACE_DEBUG4("%s mdep_role=%d data_type=0x%4x size=%d",
+ BTIF_TRACE_DEBUG("%s mdep_role=%d data_type=0x%4x size=%d",
__FUNCTION__, mdep_role, data_type, max_rx_apdu_size);
return max_rx_apdu_size;
@@ -1543,7 +1543,7 @@
break;
}
- BTIF_TRACE_DEBUG4("%s status=%d bta_mdep_role=%d (%d:btif)",
+ BTIF_TRACE_DEBUG("%s status=%d bta_mdep_role=%d (%d:btif)",
__FUNCTION__, status, *p, mdep);
return status;
}
@@ -1574,7 +1574,7 @@
status = FALSE;
break;
}
- BTIF_TRACE_DEBUG3("%s status = %d BTA DCH CFG=%d (1-rel 2-strm",
+ BTIF_TRACE_DEBUG("%s status = %d BTA DCH CFG=%d (1-rel 2-strm",
__FUNCTION__, status, *p);
return status;
}
@@ -1608,7 +1608,7 @@
int channel_id;
btif_hl_cb.next_channel_id++;
channel_id = (app_id << 16) + next_channel_id;
- BTIF_TRACE_DEBUG4("%s channel_id=0x%08x, app_id=0x%02x next_channel_id=0x%04x", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s channel_id=0x%08x, app_id=0x%02x next_channel_id=0x%04x", __FUNCTION__,
channel_id, app_id, next_channel_id);
return channel_id;
}
@@ -1624,7 +1624,7 @@
static UINT8 btif_hl_get_app_id(int channel_id){
UINT8 app_id =(UINT8) (channel_id >> 16);
- BTIF_TRACE_DEBUG3("%s channel_id=0x%08x, app_id=0x%02x ", __FUNCTION__,channel_id, app_id);
+ BTIF_TRACE_DEBUG("%s channel_id=0x%08x, app_id=0x%02x ", __FUNCTION__,channel_id, app_id);
return app_id;
}
/*******************************************************************************
@@ -1678,7 +1678,7 @@
}
}
- BTIF_TRACE_EVENT4("%s status=%d handle=%d app_idx=%d ",
+ BTIF_TRACE_EVENT("%s status=%d handle=%d app_idx=%d ",
__FUNCTION__, found, app_handle , i);
return found;
@@ -1709,7 +1709,7 @@
}
}
- BTIF_TRACE_EVENT4("%s found=%d app_id=%d app_idx=%d ",
+ BTIF_TRACE_EVENT("%s found=%d app_id=%d app_idx=%d ",
__FUNCTION__, found, app_id , i);
return found;
@@ -1736,7 +1736,7 @@
for (j=0; j < BTA_HL_NUM_MCLS ; j++)
{
if (p_acb->mcb[j].in_use)
- BTIF_TRACE_DEBUG3("btif_hl_find_mcl_idx_using_handle:app_idx=%d,"
+ BTIF_TRACE_DEBUG("btif_hl_find_mcl_idx_using_handle:app_idx=%d,"
"mcl_idx =%d mcl_handle=%d",i,j,p_acb->mcb[j].mcl_handle);
if (p_acb->mcb[j].in_use &&
(p_acb->mcb[j].mcl_handle == mcl_handle))
@@ -1748,7 +1748,7 @@
}
}
}
- BTIF_TRACE_DEBUG4("%s found=%d app_idx=%d mcl_idx=%d",__FUNCTION__,
+ BTIF_TRACE_DEBUG("%s found=%d app_idx=%d mcl_idx=%d",__FUNCTION__,
found, i, j);
return found;
}
@@ -1778,12 +1778,12 @@
(p_acb->mcb[j].mcl_handle == mcl_handle))
{
p_mcb = &p_acb->mcb[j];
- BTIF_TRACE_DEBUG1("btif_hl_find_mcl_idx_using_mdl_id: mcl handle found j =%d",j);
+ BTIF_TRACE_DEBUG("btif_hl_find_mcl_idx_using_mdl_id: mcl handle found j =%d",j);
for (x=0; x < BTA_HL_NUM_MDLS_PER_MCL ; x ++)
{
if (p_mcb->mdl[x].in_use && p_mcb->mdl[x].mdl_id == mdl_id)
{
- BTIF_TRACE_DEBUG1("btif_hl_find_mcl_idx_using_mdl_id:found x =%d",x);
+ BTIF_TRACE_DEBUG("btif_hl_find_mcl_idx_using_mdl_id:found x =%d",x);
found = TRUE;
*p_app_idx = i;
*p_mcl_idx = j;
@@ -1793,7 +1793,7 @@
}
}
}
- BTIF_TRACE_DEBUG4("%s found=%d app_idx=%d mcl_idx=%d",__FUNCTION__,
+ BTIF_TRACE_DEBUG("%s found=%d app_idx=%d mcl_idx=%d",__FUNCTION__,
found, i, j);
return found;
}
@@ -1817,7 +1817,7 @@
{
p_acb =BTIF_HL_GET_APP_CB_PTR(i);
if (p_acb->delete_mdl.active) {
- BTIF_TRACE_DEBUG3("btif_hl_find_app_idx_using_deleted_mdl_id: app_idx=%d,"
+ BTIF_TRACE_DEBUG("btif_hl_find_app_idx_using_deleted_mdl_id: app_idx=%d,"
"mdl_id=%d mcl_handle=%d",i,mdl_id,p_acb->mcb[i].mcl_handle);
}
if (p_acb->delete_mdl.active &&
@@ -1828,7 +1828,7 @@
break;
}
}
- BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d",__FUNCTION__,
+ BTIF_TRACE_DEBUG("%s found=%d app_idx=%d",__FUNCTION__,
found, i);
return found;
}
@@ -1887,7 +1887,7 @@
break;
}
}
- BTIF_TRACE_DEBUG3("%s found=%dmcl_idx=%d",__FUNCTION__,
+ BTIF_TRACE_DEBUG("%s found=%dmcl_idx=%d",__FUNCTION__,
found, j);
return found;
}
@@ -1914,7 +1914,7 @@
if (p_acb->mcb[j].in_use)
{
p_mcb = &p_acb->mcb[j];
- BTIF_TRACE_DEBUG1("btif_hl_find_mcl_idx_using_mdl_id: mcl handle found j =%d",j);
+ BTIF_TRACE_DEBUG("btif_hl_find_mcl_idx_using_mdl_id: mcl handle found j =%d",j);
for (x=0; x < BTA_HL_NUM_MDLS_PER_MCL ; x ++)
{
if (p_mcb->mdl[x].in_use)
@@ -1931,7 +1931,7 @@
btif_hl_clean_mdl_cb(p_dcb);
if (!btif_hl_num_dchs_in_use(p_mcb->mcl_handle))
BTA_HlCchClose(p_mcb->mcl_handle);
- BTIF_TRACE_DEBUG1("remote DCH close success mdl_idx=%d", x);
+ BTIF_TRACE_DEBUG("remote DCH close success mdl_idx=%d", x);
}
}
}
@@ -1962,7 +1962,7 @@
break;
}
}
- BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d", __FUNCTION__, found, i );
+ BTIF_TRACE_DEBUG("%s found=%d app_idx=%d", __FUNCTION__, found, i );
return found;
}
@@ -1982,7 +1982,7 @@
for (i=0; i < BTA_HL_NUM_APPS ; i ++)
{
- BTIF_TRACE_DEBUG1("btif_hl_find_app_idx_using_mdepId: MDEP-ID = %d",
+ BTIF_TRACE_DEBUG("btif_hl_find_app_idx_using_mdepId: MDEP-ID = %d",
btif_hl_cb.acb[i].sup_feature.mdep[0].mdep_id);
if (btif_hl_cb.acb[i].in_use &&
(btif_hl_cb.acb[i].sup_feature.mdep[0].mdep_id == mdep_id))
@@ -1992,7 +1992,7 @@
break;
}
}
- BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d", __FUNCTION__, found, i );
+ BTIF_TRACE_DEBUG("%s found=%d app_idx=%d", __FUNCTION__, found, i );
return found;
}
@@ -2023,7 +2023,7 @@
}
}
- BTIF_TRACE_DEBUG3("%s found=%d idx=%d",__FUNCTION__, found, i);
+ BTIF_TRACE_DEBUG("%s found=%d idx=%d",__FUNCTION__, found, i);
return found;
}
@@ -2049,7 +2049,7 @@
break;
}
}
- BTIF_TRACE_DEBUG3("%s found=%d mcl_idx=%d", __FUNCTION__, found, i);
+ BTIF_TRACE_DEBUG("%s found=%d mcl_idx=%d", __FUNCTION__, found, i);
return found;
}
@@ -2076,7 +2076,7 @@
}
}
- BTIF_TRACE_DEBUG3("%s found=%d app_idx=%d", __FUNCTION__, found, i);
+ BTIF_TRACE_DEBUG("%s found=%d app_idx=%d", __FUNCTION__, found, i);
return found;
}
@@ -2099,7 +2099,7 @@
bthl_app_reg_state_t state = BTHL_APP_REG_STATE_DEREG_SUCCESS;
bt_status_t status = BT_STATUS_SUCCESS;
- BTIF_TRACE_DEBUG3("%s de-reg status=%d app_handle=%d", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s de-reg status=%d app_handle=%d", __FUNCTION__,
p_data->dereg_cfm.status, p_data->dereg_cfm.app_handle);
if (btif_hl_find_app_idx_using_app_id(p_data->dereg_cfm.app_id, &app_idx))
@@ -2114,7 +2114,7 @@
else
state = BTHL_APP_REG_STATE_DEREG_FAILED;
- BTIF_TRACE_DEBUG2("call reg state callback app_id=%d state=%d", app_id, state);
+ BTIF_TRACE_DEBUG("call reg state callback app_id=%d state=%d", app_id, state);
BTIF_HL_CALL_CBACK(bt_hl_callbacks, app_reg_state_cb, app_id, state );
if (btif_hl_is_no_active_app())
@@ -2139,7 +2139,7 @@
bthl_app_reg_state_t state = BTHL_APP_REG_STATE_REG_SUCCESS;
bt_status_t bt_status;
- BTIF_TRACE_DEBUG3("%s reg status=%d app_handle=%d", __FUNCTION__, p_data->reg_cfm.status, p_data->reg_cfm.app_handle);
+ BTIF_TRACE_DEBUG("%s reg status=%d app_handle=%d", __FUNCTION__, p_data->reg_cfm.status, p_data->reg_cfm.app_handle);
if (btif_hl_find_app_idx(p_data->reg_cfm.app_id, &app_idx))
{
@@ -2155,7 +2155,7 @@
state = BTHL_APP_REG_STATE_REG_FAILED;
}
- BTIF_TRACE_DEBUG3("%s call reg state callback app_id=%d reg state=%d", __FUNCTION__, p_data->reg_cfm.app_id, state);
+ BTIF_TRACE_DEBUG("%s call reg state callback app_id=%d reg state=%d", __FUNCTION__, p_data->reg_cfm.app_id, state);
BTIF_HL_CALL_CBACK(bt_hl_callbacks, app_reg_state_cb, ((int) p_data->reg_cfm.app_id), state );
}
}
@@ -2176,7 +2176,7 @@
if (cur_state != state)
{
p_pcb->cb_state = state;
- BTIF_TRACE_DEBUG3("%s state %d--->%d",__FUNCTION__, cur_state, state);
+ BTIF_TRACE_DEBUG("%s state %d--->%d",__FUNCTION__, cur_state, state);
}
@@ -2195,8 +2195,8 @@
int app_id = (int) btif_hl_get_app_id(p_acb->delete_mdl.channel_id);
btif_hl_copy_bda(&bd_addr, p_acb->delete_mdl.bd_addr);
- BTIF_TRACE_DEBUG1("%s",__FUNCTION__);
- BTIF_TRACE_DEBUG4("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d, state=%d fd=%d",p_acb->delete_mdl.channel_id,
+ BTIF_TRACE_DEBUG("%s",__FUNCTION__);
+ BTIF_TRACE_DEBUG("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d, state=%d fd=%d",p_acb->delete_mdl.channel_id,
p_acb->delete_mdl.mdep_cfg_idx, BTHL_CONN_STATE_DESTROYED, 0);
btif_hl_display_bt_bda(&bd_addr);
@@ -2221,8 +2221,8 @@
btif_hl_copy_bda(&bd_addr, p_scb->bd_addr);
- BTIF_TRACE_DEBUG1("%s",__FUNCTION__);
- BTIF_TRACE_DEBUG4("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d, state=%d fd=%d",p_scb->channel_id,
+ BTIF_TRACE_DEBUG("%s",__FUNCTION__);
+ BTIF_TRACE_DEBUG("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d, state=%d fd=%d",p_scb->channel_id,
p_scb->mdep_cfg_idx, BTHL_CONN_STATE_DISCONNECTING, p_scb->socket_id[0]);
btif_hl_display_bt_bda(&bd_addr);
BTIF_HL_CALL_CBACK(bt_hl_callbacks, channel_state_cb, app_id,
@@ -2247,8 +2247,8 @@
if (p_pcb->in_use && p_pcb->cb_state == BTIF_HL_CHAN_CB_STATE_CONNECTING_PENDING)
{
- BTIF_TRACE_DEBUG1("%s",__FUNCTION__);
- BTIF_TRACE_DEBUG4("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d state=%d fd=%d",p_pcb->channel_id,
+ BTIF_TRACE_DEBUG("%s",__FUNCTION__);
+ BTIF_TRACE_DEBUG("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d state=%d fd=%d",p_pcb->channel_id,
p_pcb->mdep_cfg_idx, BTHL_CONN_STATE_CONNECTING, 0);
btif_hl_display_bt_bda(&bd_addr);
@@ -2274,20 +2274,20 @@
btif_hl_copy_bda(&bd_addr, p_pcb->bd_addr);
- BTIF_TRACE_DEBUG2("%s p_pcb->in_use=%d",__FUNCTION__, p_pcb->in_use);
+ BTIF_TRACE_DEBUG("%s p_pcb->in_use=%d",__FUNCTION__, p_pcb->in_use);
if (p_pcb->in_use)
{
- BTIF_TRACE_DEBUG1("%p_pcb->cb_state=%d",p_pcb->cb_state);
+ BTIF_TRACE_DEBUG("%p_pcb->cb_state=%d",p_pcb->cb_state);
if (p_pcb->cb_state == BTIF_HL_CHAN_CB_STATE_CONNECTING_PENDING)
{
- BTIF_TRACE_DEBUG4("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d state=%d fd=%d",p_pcb->channel_id,
+ BTIF_TRACE_DEBUG("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d state=%d fd=%d",p_pcb->channel_id,
p_pcb->mdep_cfg_idx, BTHL_CONN_STATE_CONNECTING, 0);
btif_hl_display_bt_bda(&bd_addr);
BTIF_HL_CALL_CBACK(bt_hl_callbacks, channel_state_cb, app_id,
&bd_addr, p_pcb->mdep_cfg_idx,
p_pcb->channel_id, BTHL_CONN_STATE_CONNECTING, 0 );
- BTIF_TRACE_DEBUG4("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d state=%d fd=%d",p_pcb->channel_id,
+ BTIF_TRACE_DEBUG("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d state=%d fd=%d",p_pcb->channel_id,
p_pcb->mdep_cfg_idx, BTHL_CONN_STATE_DISCONNECTED, 0);
btif_hl_display_bt_bda(&bd_addr);
BTIF_HL_CALL_CBACK(bt_hl_callbacks, channel_state_cb, app_id,
@@ -2296,7 +2296,7 @@
}
else if (p_pcb->cb_state == BTIF_HL_CHAN_CB_STATE_CONNECTED_PENDING)
{
- BTIF_TRACE_DEBUG4("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d state=%d fd=%d",p_pcb->channel_id,
+ BTIF_TRACE_DEBUG("call channel state callback channel_id=0x%08x mdep_cfg_idx=%d state=%d fd=%d",p_pcb->channel_id,
p_pcb->mdep_cfg_idx, BTHL_CONN_STATE_DISCONNECTED, 0);
btif_hl_display_bt_bda(&bd_addr);
BTIF_HL_CALL_CBACK(bt_hl_callbacks, channel_state_cb, app_id,
@@ -2326,22 +2326,22 @@
BOOLEAN status =FALSE;
btif_hl_pending_chan_cb_t *p_pcb;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
p_sdp = p_data->sdp_query_cfm.p_sdp;
num_recs = p_sdp->num_recs;
- BTIF_TRACE_DEBUG1("num of SDP records=%d",num_recs);
+ BTIF_TRACE_DEBUG("num of SDP records=%d",num_recs);
for (i=0; i<num_recs; i++)
{
- BTIF_TRACE_DEBUG3("rec_idx=%d ctrl_psm=0x%x data_psm=0x%x",
+ BTIF_TRACE_DEBUG("rec_idx=%d ctrl_psm=0x%x data_psm=0x%x",
(i+1),p_sdp->sdp_rec[i].ctrl_psm, p_sdp->sdp_rec[i].data_psm);
- BTIF_TRACE_DEBUG1("MCAP supported procedures=0x%x",p_sdp->sdp_rec[i].mcap_sup_proc);
+ BTIF_TRACE_DEBUG("MCAP supported procedures=0x%x",p_sdp->sdp_rec[i].mcap_sup_proc);
num_mdeps = p_sdp->sdp_rec[i].num_mdeps;
- BTIF_TRACE_DEBUG1("num of mdeps =%d",num_mdeps);
+ BTIF_TRACE_DEBUG("num of mdeps =%d",num_mdeps);
for (j=0; j< num_mdeps; j++)
{
- BTIF_TRACE_DEBUG4("mdep_idx=%d mdep_id=0x%x data_type=0x%x mdep_role=0x%x",
+ BTIF_TRACE_DEBUG("mdep_idx=%d mdep_id=0x%x data_type=0x%x mdep_role=0x%x",
(j+1),
p_sdp->sdp_rec[i].mdep_cfg[j].mdep_id,
p_sdp->sdp_rec[i].mdep_cfg[j].data_type,
@@ -2403,7 +2403,7 @@
}
else
{
- BTIF_TRACE_DEBUG0("channel abort pending");
+ BTIF_TRACE_DEBUG("channel abort pending");
}
}
break;
@@ -2413,13 +2413,13 @@
break;
default:
- BTIF_TRACE_ERROR1("Invalid CCH oper %d", old_cch_oper);
+ BTIF_TRACE_ERROR("Invalid CCH oper %d", old_cch_oper);
break;
}
}
else
{
- BTIF_TRACE_ERROR0("Can not find SDP idx discard CCH Open request");
+ BTIF_TRACE_ERROR("Can not find SDP idx discard CCH Open request");
}
}
}
@@ -2444,7 +2444,7 @@
UINT8 app_idx, mcl_idx;
int i;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
for(i=0; i<BTA_HL_NUM_APPS; i++)
{
if (btif_hl_cb.acb[i].in_use)
@@ -2464,7 +2464,7 @@
}
else
{
- BTIF_TRACE_ERROR0("The MCL already exist for cch_open_ind");
+ BTIF_TRACE_ERROR("The MCL already exist for cch_open_ind");
}
}
}
@@ -2499,7 +2499,7 @@
case BTIF_HL_PEND_DCH_OP_OPEN:
if (!p_pcb->abort_pending)
{
- BTIF_TRACE_DEBUG0("op BTIF_HL_PEND_DCH_OP_OPEN");
+ BTIF_TRACE_DEBUG("op BTIF_HL_PEND_DCH_OP_OPEN");
dch_open.ctrl_psm = p_mcb->ctrl_psm;
dch_open.local_mdep_id = p_acb->sup_feature.mdep[p_pcb->mdep_cfg_idx].mdep_id;
if (btif_hl_find_peer_mdep_id(p_acb->app_id, p_mcb->bd_addr,
@@ -2513,19 +2513,19 @@
dch_open.local_cfg = BTA_HL_DCH_CFG_RELIABLE;
}
dch_open.sec_mask = (BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT);
- BTIF_TRACE_DEBUG1("dch_open.local_cfg=%d ", dch_open.local_cfg);
+ BTIF_TRACE_DEBUG("dch_open.local_cfg=%d ", dch_open.local_cfg);
btif_hl_send_setup_connecting_cb(app_idx,mcl_idx);
if (!btif_hl_is_reconnect_possible(app_idx, mcl_idx, p_pcb->mdep_cfg_idx, &dch_open, &mdl_id ))
{
- BTIF_TRACE_DEBUG1("Issue DCH open, mcl_handle=%d",p_mcb->mcl_handle);
+ BTIF_TRACE_DEBUG("Issue DCH open, mcl_handle=%d",p_mcb->mcl_handle);
BTA_HlDchOpen(p_mcb->mcl_handle, &dch_open);
}
else
{
reconnect_param.ctrl_psm = p_mcb->ctrl_psm;
reconnect_param.mdl_id = mdl_id;;
- BTIF_TRACE_DEBUG2("Issue Reconnect ctrl_psm=0x%x mdl_id=0x%x",reconnect_param.ctrl_psm, reconnect_param.mdl_id);
+ BTIF_TRACE_DEBUG("Issue Reconnect ctrl_psm=0x%x mdl_id=0x%x",reconnect_param.ctrl_psm, reconnect_param.mdl_id);
BTA_HlDchReconnect(p_mcb->mcl_handle, &reconnect_param);
}
status = TRUE;
@@ -2568,17 +2568,17 @@
tBTA_HL_DCH_OPEN_PARAM dch_open;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (btif_hl_find_app_idx_using_app_id(p_data->cch_open_cfm.app_id, &app_idx))
{
- BTIF_TRACE_DEBUG1("app_idx=%d", app_idx);
+ BTIF_TRACE_DEBUG("app_idx=%d", app_idx);
if (btif_hl_find_mcl_idx(app_idx, p_data->cch_open_cfm.bd_addr, &mcl_idx))
{
p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
- BTIF_TRACE_DEBUG2("mcl_idx=%d, mcl_handle=%d", mcl_idx,p_data->cch_open_cfm.mcl_handle);
+ BTIF_TRACE_DEBUG("mcl_idx=%d, mcl_handle=%d", mcl_idx,p_data->cch_open_cfm.mcl_handle);
p_mcb->mcl_handle = p_data->cch_open_cfm.mcl_handle;
p_mcb->is_connected = TRUE;
status = btif_hl_proc_pending_op(app_idx, mcl_idx);
@@ -2609,7 +2609,7 @@
for (j=0; j < BTA_HL_NUM_MCLS ; j++)
{
if (p_acb->mcb[j].in_use)
- BTIF_TRACE_DEBUG3("btif_hl_find_mcl_idx_using_handle: app_idx=%d,"
+ BTIF_TRACE_DEBUG("btif_hl_find_mcl_idx_using_handle: app_idx=%d,"
"mcl_idx =%d mcl_handle=%d",i,j,p_acb->mcb[j].mcl_handle);
if (p_acb->mcb[j].in_use &&
(p_acb->mcb[j].mcl_handle == mcl_handle))
@@ -2636,7 +2636,7 @@
{
UINT8 app_idx, mcl_idx;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
btif_hl_clean_mcb_using_handle(p_data->cch_close_ind.mcl_handle);
}
@@ -2654,7 +2654,7 @@
static void btif_hl_proc_cch_close_cfm(tBTA_HL *p_data)
{
UINT8 app_idx, mcl_idx;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
btif_hl_clean_mcb_using_handle(p_data->cch_close_ind.mcl_handle);
}
@@ -2679,7 +2679,7 @@
tBTA_HL_DCH_CREATE_RSP rsp_code = BTA_HL_DCH_CREATE_RSP_CFG_REJ;
tBTA_HL_DCH_CREATE_RSP_PARAM create_rsp_param;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
// Find the correct app_idx based on the mdep_id;
btif_hl_find_app_idx_using_mdepId(p_data->dch_create_ind.local_mdep_id,&orig_app_idx);
@@ -2711,13 +2711,13 @@
break;
case BTA_HL_MDEP_ROLE_SINK:
- BTIF_TRACE_DEBUG0("btif_hl_proc_create_ind:BTA_HL_MDEP_ROLE_SINK");
+ BTIF_TRACE_DEBUG("btif_hl_proc_create_ind:BTA_HL_MDEP_ROLE_SINK");
if ((p_data->dch_create_ind.cfg == BTA_HL_DCH_CFG_RELIABLE) ||
(first_reliable_exist && (p_data->dch_create_ind.cfg == BTA_HL_DCH_CFG_STREAMING)))
{
rsp_code = BTA_HL_DCH_CREATE_RSP_SUCCESS;
rsp_cfg = p_data->dch_create_ind.cfg;
- BTIF_TRACE_DEBUG1("btif_hl_proc_create_ind:BTA_HL_MDEP_ROLE_SINK cfg = %d",rsp_cfg);
+ BTIF_TRACE_DEBUG("btif_hl_proc_create_ind:BTA_HL_MDEP_ROLE_SINK cfg = %d",rsp_cfg);
}
break;
default:
@@ -2732,7 +2732,7 @@
if (success)
{
- BTIF_TRACE_DEBUG2("create response rsp_code=%d rsp_cfg=%d", rsp_code, rsp_cfg );
+ BTIF_TRACE_DEBUG("create response rsp_code=%d rsp_cfg=%d", rsp_code, rsp_cfg );
create_rsp_param.local_mdep_id = p_data->dch_create_ind.local_mdep_id;
create_rsp_param.mdl_id = p_data->dch_create_ind.mdl_id;
create_rsp_param.rsp_code = rsp_code;
@@ -2760,7 +2760,7 @@
UINT8 dc_cfg;
BOOLEAN close_dch = FALSE;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
// Find the correct app_idx based on the mdep_id;
btif_hl_find_app_idx_using_mdepId(p_data->dch_open_ind.local_mdep_id,&orig_app_idx);
@@ -2788,23 +2788,23 @@
if(btif_hl_find_channel_id_using_mdl_id(orig_app_idx,p_dcb->mdl_id , &p_dcb->channel_id))
{
- BTIF_TRACE_DEBUG4(" app_idx=%d mcl_idx=%d mdl_idx=%d channel_id=%d",
+ BTIF_TRACE_DEBUG(" app_idx=%d mcl_idx=%d mdl_idx=%d channel_id=%d",
orig_app_idx, mcl_idx, mdl_idx, p_dcb->channel_id );
if (!btif_hl_create_socket(orig_app_idx, mcl_idx, mdl_idx))
{
- BTIF_TRACE_ERROR0("Unable to create socket");
+ BTIF_TRACE_ERROR("Unable to create socket");
close_dch = TRUE;
}
}
else
{
- BTIF_TRACE_ERROR1("Unable find channel id for mdl_id=0x%x", p_dcb->mdl_id );
+ BTIF_TRACE_ERROR("Unable find channel id for mdl_id=0x%x", p_dcb->mdl_id );
close_dch = TRUE;
}
}
else
{
- BTIF_TRACE_ERROR1("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
+ BTIF_TRACE_ERROR("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
close_dch = TRUE;
}
@@ -2841,7 +2841,7 @@
BOOLEAN status = FALSE;
BOOLEAN close_dch = FALSE;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
// Find the correct app_idx based on the mdep_id;
btif_hl_find_app_idx_using_mdepId(p_data->dch_open_cfm.local_mdep_id,&app_idx);
@@ -2868,24 +2868,24 @@
p_dcb->mtu = p_data->dch_open_cfm.mtu;
p_dcb->channel_id = p_pcb->channel_id;
- BTIF_TRACE_DEBUG3("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
+ BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
btif_hl_send_setup_connecting_cb(app_idx, mcl_idx);
if (btif_hl_create_socket(app_idx, mcl_idx, mdl_idx))
{
status = TRUE;
- BTIF_TRACE_DEBUG4("app_idx=%d mcl_idx=%d mdl_idx=%d p_dcb->channel_id=0x%08x",
+ BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=%d mdl_idx=%d p_dcb->channel_id=0x%08x",
app_idx, mcl_idx, mdl_idx, p_dcb->channel_id);
btif_hl_clean_pcb(p_pcb);
}
else
{
- BTIF_TRACE_ERROR0("Unable to create socket");
+ BTIF_TRACE_ERROR("Unable to create socket");
close_dch = TRUE;
}
}
else
{
- BTIF_TRACE_ERROR1("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
+ BTIF_TRACE_ERROR("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
close_dch = TRUE;
}
@@ -2918,7 +2918,7 @@
BOOLEAN status = FALSE;
BOOLEAN close_dch = FALSE;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
btif_hl_find_app_idx_using_mdepId(p_data->dch_reconnect_cfm.local_mdep_id,&app_idx);
@@ -2944,24 +2944,24 @@
p_dcb->mtu = p_data->dch_reconnect_cfm.mtu;
p_dcb->channel_id = p_pcb->channel_id;
- BTIF_TRACE_DEBUG3("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
+ BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
btif_hl_send_setup_connecting_cb(app_idx, mcl_idx);
if (btif_hl_create_socket(app_idx, mcl_idx, mdl_idx))
{
status = TRUE;
- BTIF_TRACE_DEBUG4("app_idx=%d mcl_idx=%d mdl_idx=%d p_dcb->channel_id=0x%08x",
+ BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=%d mdl_idx=%d p_dcb->channel_id=0x%08x",
app_idx, mcl_idx, mdl_idx, p_dcb->channel_id);
btif_hl_clean_pcb(p_pcb);
}
else
{
- BTIF_TRACE_ERROR0("Unable to create socket");
+ BTIF_TRACE_ERROR("Unable to create socket");
close_dch = TRUE;
}
}
else
{
- BTIF_TRACE_ERROR1("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
+ BTIF_TRACE_ERROR("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
close_dch = TRUE;
}
@@ -2994,7 +2994,7 @@
UINT8 app_idx, mcl_idx, mdl_idx, mdep_cfg_idx, dc_cfg;
BOOLEAN close_dch = FALSE;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
// Find the correct app_idx based on the mdep_id;
btif_hl_find_app_idx_using_mdepId(p_data->dch_reconnect_ind.local_mdep_id,&app_idx);
@@ -3002,7 +3002,7 @@
if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_reconnect_ind.mcl_handle, app_idx, &mcl_idx ))
{
p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
- BTIF_TRACE_DEBUG2("btif_hl_proc_dch_reconnect_ind: app_idx = %d, mcl_idx = %d",
+ BTIF_TRACE_DEBUG("btif_hl_proc_dch_reconnect_ind: app_idx = %d, mcl_idx = %d",
app_idx, mcl_idx);
p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
@@ -3023,17 +3023,17 @@
p_dcb->mtu = p_data->dch_reconnect_ind.mtu;
p_dcb->channel_id = btif_hl_get_next_channel_id(p_acb->app_id);
- BTIF_TRACE_DEBUG4(" app_idx=%d mcl_idx=%d mdl_idx=%d channel_id=%d",
+ BTIF_TRACE_DEBUG(" app_idx=%d mcl_idx=%d mdl_idx=%d channel_id=%d",
app_idx, mcl_idx, mdl_idx, p_dcb->channel_id );
if (!btif_hl_create_socket(app_idx, mcl_idx, mdl_idx))
{
- BTIF_TRACE_ERROR0("Unable to create socket");
+ BTIF_TRACE_ERROR("Unable to create socket");
close_dch = TRUE;
}
}
else
{
- BTIF_TRACE_ERROR1("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
+ BTIF_TRACE_ERROR("INVALID_LOCAL_MDEP_ID mdep_id=%d",p_data->dch_open_cfm.local_mdep_id);
close_dch = TRUE;
}
@@ -3067,7 +3067,7 @@
btif_hl_mcl_cb_t *p_mcb;
UINT8 app_idx, mcl_idx, mdl_idx;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (btif_hl_find_mdl_idx_using_handle(p_data->dch_close_ind.mdl_handle,
&app_idx, &mcl_idx, &mdl_idx ))
{
@@ -3078,7 +3078,7 @@
btif_hl_clean_mdl_cb(p_dcb);
if (!btif_hl_num_dchs_in_use(p_mcb->mcl_handle))
btif_hl_start_cch_timer(app_idx, mcl_idx);
- BTIF_TRACE_DEBUG1("remote DCH close success mdl_idx=%d", mdl_idx);
+ BTIF_TRACE_DEBUG("remote DCH close success mdl_idx=%d", mdl_idx);
}
}
@@ -3098,7 +3098,7 @@
btif_hl_mcl_cb_t *p_mcb;
UINT8 app_idx, mcl_idx, mdl_idx;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (btif_hl_find_mdl_idx_using_handle(p_data->dch_close_cfm.mdl_handle,
&app_idx, &mcl_idx, &mdl_idx ))
{
@@ -3108,7 +3108,7 @@
p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx,mcl_idx);
if (!btif_hl_num_dchs_in_use(p_mcb->mcl_handle))
btif_hl_start_cch_timer(app_idx, mcl_idx);
- BTIF_TRACE_DEBUG1(" local DCH close success mdl_idx=%d", mdl_idx);
+ BTIF_TRACE_DEBUG(" local DCH close success mdl_idx=%d", mdl_idx);
}
}
@@ -3125,7 +3125,7 @@
static void btif_hl_proc_abort_ind(tBTA_HL_MCL_HANDLE mcl_handle){
UINT8 app_idx,mcl_idx;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__ );
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__ );
btif_hl_app_cb_t *p_acb;
UINT8 i,j;
@@ -3135,7 +3135,7 @@
for (j=0; j < BTA_HL_NUM_MCLS ; j++)
{
if (p_acb->mcb[j].in_use)
- BTIF_TRACE_DEBUG3("btif_hl_find_mcl_idx_using_handle: app_idx=%d,mcl_idx =%d mcl_handle=%d",i,j,p_acb->mcb[j].mcl_handle);
+ BTIF_TRACE_DEBUG("btif_hl_find_mcl_idx_using_handle: app_idx=%d,mcl_idx =%d mcl_handle=%d",i,j,p_acb->mcb[j].mcl_handle);
if (p_acb->mcb[j].in_use &&
(p_acb->mcb[j].mcl_handle == mcl_handle))
{
@@ -3159,7 +3159,7 @@
static void btif_hl_proc_abort_cfm(tBTA_HL_MCL_HANDLE mcl_handle){
UINT8 app_idx,mcl_idx;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__ );
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__ );
btif_hl_app_cb_t *p_acb;
UINT8 i,j;
@@ -3169,7 +3169,7 @@
for (j=0; j < BTA_HL_NUM_MCLS ; j++)
{
if (p_acb->mcb[j].in_use)
- BTIF_TRACE_DEBUG3("btif_hl_find_mcl_idx_using_handle: app_idx=%d,mcl_idx =%d mcl_handle=%d",i,j,p_acb->mcb[j].mcl_handle);
+ BTIF_TRACE_DEBUG("btif_hl_find_mcl_idx_using_handle: app_idx=%d,mcl_idx =%d mcl_handle=%d",i,j,p_acb->mcb[j].mcl_handle);
if (p_acb->mcb[j].in_use &&
(p_acb->mcb[j].mcl_handle == mcl_handle))
{
@@ -3197,13 +3197,13 @@
btif_hl_mdl_cb_t *p_dcb;
UNUSED(status);
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (btif_hl_find_mdl_idx_using_handle(mdl_handle,
&app_idx, &mcl_idx, &mdl_idx ))
{
p_dcb =BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
btif_hl_free_buf((void **) &p_dcb->p_tx_pkt);
- BTIF_TRACE_DEBUG1("send success free p_tx_pkt tx_size=%d", p_dcb->tx_size);
+ BTIF_TRACE_DEBUG("send success free p_tx_pkt tx_size=%d", p_dcb->tx_size);
p_dcb->tx_size = 0;
}
}
@@ -3223,7 +3223,7 @@
btif_hl_mdl_cb_t *p_dcb;
UINT8 app_idx, mcl_idx, mdl_idx;
- BTIF_TRACE_DEBUG0("btif_hl_proc_dch_cong_ind");
+ BTIF_TRACE_DEBUG("btif_hl_proc_dch_cong_ind");
if (btif_hl_find_mdl_idx_using_handle(p_data->dch_cong_ind.mdl_handle, &app_idx, &mcl_idx, &mdl_idx))
@@ -3250,11 +3250,11 @@
btif_hl_app_data_t *p_data;
UNUSED(p_cback);
- BTIF_TRACE_DEBUG3("%s app_idx=%d app_id=%d", __FUNCTION__, app_idx, app_id);
+ BTIF_TRACE_DEBUG("%s app_idx=%d app_id=%d", __FUNCTION__, app_idx, app_id);
if(reg_counter >1)
{
- BTIF_TRACE_DEBUG0("btif_hl_proc_reg_request: calling uPDATE");
+ BTIF_TRACE_DEBUG("btif_hl_proc_reg_request: calling uPDATE");
BTA_HlUpdate(app_id, p_reg_param,TRUE, btif_hl_cback);
}
else
@@ -3284,7 +3284,7 @@
UINT8 preg_idx;
bt_status_t bt_status;
- BTIF_TRACE_DEBUG2("%s event %d", __FUNCTION__, event);
+ BTIF_TRACE_DEBUG("%s event %d", __FUNCTION__, event);
btif_hl_display_calling_process_name();
switch (event)
@@ -3301,7 +3301,7 @@
if (send_chan_cb)
{
btif_hl_copy_bda(&bd_addr, p_data->chan_cb.bd_addr);
- BTIF_TRACE_DEBUG4("state callbk: ch_id=0x%08x cb_state=%d state=%d fd=%d",
+ BTIF_TRACE_DEBUG("state callbk: ch_id=0x%08x cb_state=%d state=%d fd=%d",
p_data->chan_cb.channel_id,
p_data->chan_cb.cb_state,
state, p_data->chan_cb.fd);
@@ -3315,10 +3315,10 @@
case BTIF_HL_REG_APP:
p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->reg.app_idx);
app_id = (int) p_acb->app_id;
- BTIF_TRACE_DEBUG2("Rcv BTIF_HL_REG_APP app_idx=%d reg_pending=%d", p_data->reg.app_idx, p_acb->reg_pending);
+ BTIF_TRACE_DEBUG("Rcv BTIF_HL_REG_APP app_idx=%d reg_pending=%d", p_data->reg.app_idx, p_acb->reg_pending);
if (btif_hl_get_state() == BTIF_HL_STATE_ENABLED && p_acb->reg_pending)
{
- BTIF_TRACE_DEBUG1("Rcv BTIF_HL_REG_APP reg_counter=%d",reg_counter);
+ BTIF_TRACE_DEBUG("Rcv BTIF_HL_REG_APP reg_counter=%d",reg_counter);
p_acb->reg_pending = FALSE;
reg_param.dev_type = p_acb->dev_type;
reg_param.sec_mask = BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT;
@@ -3329,13 +3329,13 @@
}
else
{
- BTIF_TRACE_DEBUG2("reg request is processed state=%d reg_pending=%d", btif_hl_get_state(), p_acb->reg_pending);
+ BTIF_TRACE_DEBUG("reg request is processed state=%d reg_pending=%d", btif_hl_get_state(), p_acb->reg_pending);
}
break;
case BTIF_HL_UNREG_APP:
- BTIF_TRACE_DEBUG1("Rcv BTIF_HL_UNREG_APP app_idx=%d", p_data->unreg.app_idx );
+ BTIF_TRACE_DEBUG("Rcv BTIF_HL_UNREG_APP app_idx=%d", p_data->unreg.app_idx );
p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->unreg.app_idx);
if (btif_hl_get_state() == BTIF_HL_STATE_ENABLED)
{
@@ -3346,12 +3346,12 @@
}
break;
case BTIF_HL_UPDATE_MDL:
- BTIF_TRACE_DEBUG1("Rcv BTIF_HL_UPDATE_MDL app_idx=%d", p_data->update_mdl.app_idx );
+ BTIF_TRACE_DEBUG("Rcv BTIF_HL_UPDATE_MDL app_idx=%d", p_data->update_mdl.app_idx );
p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->update_mdl.app_idx);
break;
default:
- BTIF_TRACE_ERROR1("Unknown event %d", event);
+ BTIF_TRACE_ERROR("Unknown event %d", event);
break;
}
}
@@ -3374,13 +3374,13 @@
btif_hl_pend_dch_op_t pending_op;
BOOLEAN status;
- BTIF_TRACE_DEBUG2("%s event %d", __FUNCTION__, event);
+ BTIF_TRACE_DEBUG("%s event %d", __FUNCTION__, event);
btif_hl_display_calling_process_name();
switch (event)
{
case BTA_HL_REGISTER_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_REGISTER_CFM_EVT");
- BTIF_TRACE_DEBUG3("app_id=%d app_handle=%d status=%d ",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_REGISTER_CFM_EVT");
+ BTIF_TRACE_DEBUG("app_id=%d app_handle=%d status=%d ",
p_data->reg_cfm.app_id,
p_data->reg_cfm.app_handle,
p_data->reg_cfm.status );
@@ -3388,8 +3388,8 @@
btif_hl_proc_reg_cfm(p_data);
break;
case BTA_HL_SDP_INFO_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_SDP_INFO_IND_EVT");
- BTIF_TRACE_DEBUG5("app_handle=%d ctrl_psm=0x%04x data_psm=0x%04x x_spec=%d mcap_sup_procs=0x%02x",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_SDP_INFO_IND_EVT");
+ BTIF_TRACE_DEBUG("app_handle=%d ctrl_psm=0x%04x data_psm=0x%04x x_spec=%d mcap_sup_procs=0x%02x",
p_data->sdp_info_ind.app_handle,
p_data->sdp_info_ind.ctrl_psm,
p_data->sdp_info_ind.data_psm,
@@ -3399,20 +3399,20 @@
break;
case BTA_HL_DEREGISTER_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DEREGISTER_CFM_EVT");
- BTIF_TRACE_DEBUG2("app_handle=%d status=%d ",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DEREGISTER_CFM_EVT");
+ BTIF_TRACE_DEBUG("app_handle=%d status=%d ",
p_data->dereg_cfm.app_handle,
p_data->dereg_cfm.status );
btif_hl_proc_dereg_cfm(p_data);
break;
case BTA_HL_SDP_QUERY_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_SDP_QUERY_CFM_EVT");
- BTIF_TRACE_DEBUG3("app_handle=%d app_id =%d,status =%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_SDP_QUERY_CFM_EVT");
+ BTIF_TRACE_DEBUG("app_handle=%d app_id =%d,status =%d",
p_data->sdp_query_cfm.app_handle,p_data->sdp_query_cfm.app_id,
p_data->sdp_query_cfm.status);
- BTIF_TRACE_DEBUG6("DB [%02x] [%02x] [%02x] [%02x] [%02x] [%02x]",
+ BTIF_TRACE_DEBUG("DB [%02x] [%02x] [%02x] [%02x] [%02x] [%02x]",
p_data->sdp_query_cfm.bd_addr[0], p_data->sdp_query_cfm.bd_addr[1],
p_data->sdp_query_cfm.bd_addr[2], p_data->sdp_query_cfm.bd_addr[3],
p_data->sdp_query_cfm.bd_addr[4], p_data->sdp_query_cfm.bd_addr[5]);
@@ -3424,7 +3424,7 @@
if (!status)
{
- BTIF_TRACE_DEBUG1("BTA_HL_SDP_QUERY_CFM_EVT Status = %d",
+ BTIF_TRACE_DEBUG("BTA_HL_SDP_QUERY_CFM_EVT Status = %d",
p_data->sdp_query_cfm.status);
if (btif_hl_find_app_idx_using_app_id(p_data->sdp_query_cfm.app_id, &app_idx))
{
@@ -3457,13 +3457,13 @@
case BTA_HL_CCH_OPEN_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_CCH_OPEN_CFM_EVT");
- BTIF_TRACE_DEBUG4("app_id=%d,app_handle=%d mcl_handle=%d status =%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_CCH_OPEN_CFM_EVT");
+ BTIF_TRACE_DEBUG("app_id=%d,app_handle=%d mcl_handle=%d status =%d",
p_data->cch_open_cfm.app_id,
p_data->cch_open_cfm.app_handle,
p_data->cch_open_cfm.mcl_handle,
p_data->cch_open_cfm.status);
- BTIF_TRACE_DEBUG6("DB [%02x] [%02x] [%02x] [%02x] [%02x] [%02x]",
+ BTIF_TRACE_DEBUG("DB [%02x] [%02x] [%02x] [%02x] [%02x] [%02x]",
p_data->cch_open_cfm.bd_addr[0], p_data->cch_open_cfm.bd_addr[1],
p_data->cch_open_cfm.bd_addr[2], p_data->cch_open_cfm.bd_addr[3],
p_data->cch_open_cfm.bd_addr[4], p_data->cch_open_cfm.bd_addr[5]);
@@ -3504,12 +3504,12 @@
break;
case BTA_HL_DCH_OPEN_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_OPEN_CFM_EVT");
- BTIF_TRACE_DEBUG3("mcl_handle=%d mdl_handle=0x%x status=%d ",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_OPEN_CFM_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle=%d mdl_handle=0x%x status=%d ",
p_data->dch_open_cfm.mcl_handle,
p_data->dch_open_cfm.mdl_handle,
p_data->dch_open_cfm.status);
- BTIF_TRACE_DEBUG5("first_reliable =%d dch_mode=%d local_mdep_id=%d mdl_id=%d mtu=%d",
+ BTIF_TRACE_DEBUG("first_reliable =%d dch_mode=%d local_mdep_id=%d mdl_id=%d mtu=%d",
p_data->dch_open_cfm.first_reliable,
p_data->dch_open_cfm.dch_mode,
p_data->dch_open_cfm.local_mdep_id,
@@ -3546,11 +3546,11 @@
case BTA_HL_CCH_OPEN_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_CCH_OPEN_IND_EVT");
- BTIF_TRACE_DEBUG2("app_handle=%d mcl_handle=%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_CCH_OPEN_IND_EVT");
+ BTIF_TRACE_DEBUG("app_handle=%d mcl_handle=%d",
p_data->cch_open_ind.app_handle,
p_data->cch_open_ind.mcl_handle);
- BTIF_TRACE_DEBUG6("DB [%02x] [%02x] [%02x] [%02x] [%02x] [%02x]",
+ BTIF_TRACE_DEBUG("DB [%02x] [%02x] [%02x] [%02x] [%02x] [%02x]",
p_data->cch_open_ind.bd_addr[0], p_data->cch_open_ind.bd_addr[1],
p_data->cch_open_ind.bd_addr[2], p_data->cch_open_ind.bd_addr[3],
p_data->cch_open_ind.bd_addr[4], p_data->cch_open_ind.bd_addr[5]);
@@ -3559,10 +3559,10 @@
break;
case BTA_HL_DCH_CREATE_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_CREATE_IND_EVT");
- BTIF_TRACE_DEBUG1("mcl_handle=%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_CREATE_IND_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle=%d",
p_data->dch_create_ind.mcl_handle );
- BTIF_TRACE_DEBUG3("local_mdep_id =%d mdl_id=%d cfg=%d",
+ BTIF_TRACE_DEBUG("local_mdep_id =%d mdl_id=%d cfg=%d",
p_data->dch_create_ind.local_mdep_id,
p_data->dch_create_ind.mdl_id,
p_data->dch_create_ind.cfg);
@@ -3570,11 +3570,11 @@
break;
case BTA_HL_DCH_OPEN_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_OPEN_IND_EVT");
- BTIF_TRACE_DEBUG2("mcl_handle=%d mdl_handle=0x%x",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_OPEN_IND_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle=%d mdl_handle=0x%x",
p_data->dch_open_ind.mcl_handle,
p_data->dch_open_ind.mdl_handle );
- BTIF_TRACE_DEBUG5("first_reliable =%d dch_mode=%d local_mdep_id=%d mdl_id=%d mtu=%d",
+ BTIF_TRACE_DEBUG("first_reliable =%d dch_mode=%d local_mdep_id=%d mdl_id=%d mtu=%d",
p_data->dch_open_ind.first_reliable,
p_data->dch_open_ind.dch_mode,
p_data->dch_open_ind.local_mdep_id,
@@ -3585,15 +3585,15 @@
break;
case BTA_HL_DELETE_MDL_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DELETE_MDL_IND_EVT");
- BTIF_TRACE_DEBUG2("mcl_handle=%d mdl_id=0x%x",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DELETE_MDL_IND_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle=%d mdl_id=0x%x",
p_data->delete_mdl_ind.mcl_handle,
p_data->delete_mdl_ind.mdl_id);
break;
case BTA_HL_DELETE_MDL_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DELETE_MDL_CFM_EVT");
- BTIF_TRACE_DEBUG3("mcl_handle=%d mdl_id=0x%x status=%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DELETE_MDL_CFM_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle=%d mdl_id=0x%x status=%d",
p_data->delete_mdl_cfm.mcl_handle,
p_data->delete_mdl_cfm.mdl_id,
p_data->delete_mdl_cfm.status);
@@ -3608,12 +3608,12 @@
break;
case BTA_HL_DCH_RECONNECT_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_RECONNECT_CFM_EVT");
- BTIF_TRACE_DEBUG3("mcl_handle=%d mdl_handle=%d status=%d ",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_RECONNECT_CFM_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle=%d mdl_handle=%d status=%d ",
p_data->dch_reconnect_cfm.mcl_handle,
p_data->dch_reconnect_cfm.mdl_handle,
p_data->dch_reconnect_cfm.status);
- BTIF_TRACE_DEBUG4("first_reliable =%d dch_mode=%d mdl_id=%d mtu=%d",
+ BTIF_TRACE_DEBUG("first_reliable =%d dch_mode=%d mdl_id=%d mtu=%d",
p_data->dch_reconnect_cfm.first_reliable,
p_data->dch_reconnect_cfm.dch_mode,
p_data->dch_reconnect_cfm.mdl_id,
@@ -3651,8 +3651,8 @@
break;
case BTA_HL_CCH_CLOSE_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_CCH_CLOSE_CFM_EVT");
- BTIF_TRACE_DEBUG2("mcl_handle=%d status =%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_CCH_CLOSE_CFM_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle=%d status =%d",
p_data->cch_close_cfm.mcl_handle,
p_data->cch_close_cfm.status);
if (p_data->cch_close_cfm.status == BTA_HL_STATUS_OK)
@@ -3662,8 +3662,8 @@
break;
case BTA_HL_CCH_CLOSE_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_CCH_CLOSE_IND_EVT");
- BTIF_TRACE_DEBUG2("mcl_handle =%d intentional_close=%s",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_CCH_CLOSE_IND_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle =%d intentional_close=%s",
p_data->cch_close_ind.mcl_handle,
(p_data->cch_close_ind.intentional?"Yes":"No"));
@@ -3671,8 +3671,8 @@
break;
case BTA_HL_DCH_CLOSE_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_CLOSE_IND_EVT");
- BTIF_TRACE_DEBUG2("mdl_handle=%d intentional_close=%s",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_CLOSE_IND_EVT");
+ BTIF_TRACE_DEBUG("mdl_handle=%d intentional_close=%s",
p_data->dch_close_ind.mdl_handle,
(p_data->dch_close_ind.intentional?"Yes":"No") );
@@ -3680,8 +3680,8 @@
break;
case BTA_HL_DCH_CLOSE_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_CLOSE_CFM_EVT");
- BTIF_TRACE_DEBUG2("mdl_handle=%d status=%d ",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_CLOSE_CFM_EVT");
+ BTIF_TRACE_DEBUG("mdl_handle=%d status=%d ",
p_data->dch_close_cfm.mdl_handle,
p_data->dch_close_cfm.status);
@@ -3692,8 +3692,8 @@
break;
case BTA_HL_DCH_ECHO_TEST_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_ECHO_TEST_CFM_EVT");
- BTIF_TRACE_DEBUG2("mcl_handle=%d status=%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_ECHO_TEST_CFM_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle=%d status=%d",
p_data->echo_test_cfm.mcl_handle,
p_data->echo_test_cfm.status );
/* not supported */
@@ -3701,12 +3701,12 @@
case BTA_HL_DCH_RECONNECT_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_RECONNECT_IND_EVT");
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_RECONNECT_IND_EVT");
- BTIF_TRACE_DEBUG2("mcl_handle=%d mdl_handle=5d",
+ BTIF_TRACE_DEBUG("mcl_handle=%d mdl_handle=5d",
p_data->dch_reconnect_ind.mcl_handle,
p_data->dch_reconnect_ind.mdl_handle );
- BTIF_TRACE_DEBUG4("first_reliable =%d dch_mode=%d mdl_id=%d mtu=%d",
+ BTIF_TRACE_DEBUG("first_reliable =%d dch_mode=%d mdl_id=%d mtu=%d",
p_data->dch_reconnect_ind.first_reliable,
p_data->dch_reconnect_ind.dch_mode,
p_data->dch_reconnect_ind.mdl_id,
@@ -3716,22 +3716,22 @@
break;
case BTA_HL_CONG_CHG_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_CONG_CHG_IND_EVT");
- BTIF_TRACE_DEBUG2("mdl_handle=%d cong =%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_CONG_CHG_IND_EVT");
+ BTIF_TRACE_DEBUG("mdl_handle=%d cong =%d",
p_data->dch_cong_ind.mdl_handle,
p_data->dch_cong_ind.cong);
btif_hl_proc_dch_cong_ind(p_data);
break;
case BTA_HL_DCH_ABORT_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_ABORT_IND_EVT");
- BTIF_TRACE_DEBUG1("mcl_handle=%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_ABORT_IND_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle=%d",
p_data->dch_abort_ind.mcl_handle );
btif_hl_proc_abort_ind(p_data->dch_abort_ind.mcl_handle);
break;
case BTA_HL_DCH_ABORT_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_ABORT_CFM_EVT");
- BTIF_TRACE_DEBUG2("mcl_handle=%d status =%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_ABORT_CFM_EVT");
+ BTIF_TRACE_DEBUG("mcl_handle=%d status =%d",
p_data->dch_abort_cfm.mcl_handle,
p_data->dch_abort_cfm.status);
if (p_data->dch_abort_cfm.status == BTA_HL_STATUS_OK)
@@ -3741,8 +3741,8 @@
break;
case BTA_HL_DCH_SEND_DATA_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_SEND_DATA_CFM_EVT");
- BTIF_TRACE_DEBUG2("mdl_handle=0x%x status =%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_SEND_DATA_CFM_EVT");
+ BTIF_TRACE_DEBUG("mdl_handle=0x%x status =%d",
p_data->dch_send_data_cfm.mdl_handle,
p_data->dch_send_data_cfm.status);
btif_hl_proc_send_data_cfm(p_data->dch_send_data_cfm.mdl_handle,
@@ -3750,14 +3750,14 @@
break;
case BTA_HL_DCH_RCV_DATA_IND_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_DCH_RCV_DATA_IND_EVT");
- BTIF_TRACE_DEBUG1("mdl_handle=0x%x ",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_DCH_RCV_DATA_IND_EVT");
+ BTIF_TRACE_DEBUG("mdl_handle=0x%x ",
p_data->dch_rcv_data_ind.mdl_handle);
/* do nothing here */
break;
default:
- BTIF_TRACE_DEBUG1("Unknown Event (0x%02x)...", event);
+ BTIF_TRACE_DEBUG("Unknown Event (0x%02x)...", event);
break;
}
}
@@ -3774,7 +3774,7 @@
static void btif_hl_cback(tBTA_HL_EVT event, tBTA_HL *p_data){
bt_status_t status;
int param_len = 0;
- BTIF_TRACE_DEBUG2("%s event %d", __FUNCTION__, event);
+ BTIF_TRACE_DEBUG("%s event %d", __FUNCTION__, event);
btif_hl_display_calling_process_name();
switch (event)
{
@@ -3872,14 +3872,14 @@
tBTA_HL_REG_PARAM reg_param;
btif_hl_app_cb_t *p_acb;
- BTIF_TRACE_DEBUG2("%s event %d", __FUNCTION__, event);
+ BTIF_TRACE_DEBUG("%s event %d", __FUNCTION__, event);
btif_hl_display_calling_process_name();
switch ( event )
{
case BTA_HL_CTRL_ENABLE_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_CTRL_ENABLE_CFM_EVT");
- BTIF_TRACE_DEBUG1("status=%d", p_data->enable_cfm.status);
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_CTRL_ENABLE_CFM_EVT");
+ BTIF_TRACE_DEBUG("status=%d", p_data->enable_cfm.status);
if (p_data->enable_cfm.status == BTA_HL_STATUS_OK)
{
@@ -3898,7 +3898,7 @@
reg_param.p_srv_desp = p_acb->srv_desp;
reg_param.p_provider_name = p_acb->provider_name;
- BTIF_TRACE_DEBUG1("Register pending app_id=%d", p_acb->app_id);
+ BTIF_TRACE_DEBUG("Register pending app_id=%d", p_acb->app_id);
btif_hl_proc_reg_request (i, p_acb->app_id, ®_param, btif_hl_cback);
}
}
@@ -3906,8 +3906,8 @@
break;
case BTA_HL_CTRL_DISABLE_CFM_EVT:
- BTIF_TRACE_DEBUG0("Rcv BTA_HL_CTRL_DISABLE_CFM_EVT");
- BTIF_TRACE_DEBUG1("status=%d",
+ BTIF_TRACE_DEBUG("Rcv BTA_HL_CTRL_DISABLE_CFM_EVT");
+ BTIF_TRACE_DEBUG("status=%d",
p_data->disable_cfm.status);
if (p_data->disable_cfm.status == BTA_HL_STATUS_OK)
@@ -3935,7 +3935,7 @@
bt_status_t status;
int param_len = 0;
- BTIF_TRACE_DEBUG2("%s event %d", __FUNCTION__, event);
+ BTIF_TRACE_DEBUG("%s event %d", __FUNCTION__, event);
btif_hl_display_calling_process_name();
switch ( event )
@@ -3971,7 +3971,7 @@
UINT8 i;
CHECK_BTHL_INIT();
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
btif_hl_display_calling_process_name();
@@ -3989,7 +3989,7 @@
{
dch_open.ctrl_psm = p_mcb->ctrl_psm;
dch_open.local_mdep_id = p_acb->sup_feature.mdep[mdep_cfg_index].mdep_id;
- BTIF_TRACE_DEBUG4("connect_channel: app_idx =%d, mdep_cfg_indx =%d, mdep_id =%d app_id= %d", app_idx,
+ BTIF_TRACE_DEBUG("connect_channel: app_idx =%d, mdep_cfg_indx =%d, mdep_id =%d app_id= %d", app_idx,
mdep_cfg_index, dch_open.local_mdep_id, app_id);
if (btif_hl_find_peer_mdep_id(p_acb->app_id, p_mcb->bd_addr,
p_acb->sup_feature.mdep[mdep_cfg_index].mdep_cfg.mdep_role,
@@ -4007,7 +4007,7 @@
mdep_cfg_index, BTIF_HL_PEND_DCH_OP_OPEN, channel_id ))
{
status = BT_STATUS_FAIL;
- BTIF_TRACE_EVENT1("%s loc0 status = BT_STATUS_FAIL", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s loc0 status = BT_STATUS_FAIL", __FUNCTION__);
}
}
else
@@ -4049,7 +4049,7 @@
status = BT_STATUS_FAIL;
}
- BTIF_TRACE_DEBUG3("%s status=%d channel_id=0x%08x", __FUNCTION__, status, *channel_id);
+ BTIF_TRACE_DEBUG("%s status=%d channel_id=0x%08x", __FUNCTION__, status, *channel_id);
return status;
}
@@ -4071,7 +4071,7 @@
btif_hl_app_cb_t *p_acb;
CHECK_BTHL_INIT();
- BTIF_TRACE_EVENT2("%s channel_id=0x%08x", __FUNCTION__, channel_id);
+ BTIF_TRACE_EVENT("%s channel_id=0x%08x", __FUNCTION__, channel_id);
btif_hl_display_calling_process_name();
@@ -4099,7 +4099,7 @@
p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
if (p_mcb->is_connected)
{
- BTIF_TRACE_DEBUG1("calling BTA_HlDeleteMdl mdl_id=%d",p_acb->delete_mdl.mdl_id );
+ BTIF_TRACE_DEBUG("calling BTA_HlDeleteMdl mdl_id=%d",p_acb->delete_mdl.mdl_id );
BTA_HlDeleteMdl(p_mcb->mcl_handle, p_acb->delete_mdl.mdl_id);
}
else
@@ -4109,7 +4109,7 @@
}
else
{
- BTIF_TRACE_DEBUG0("btif_hl_delete_mdl calling btif_hl_cch_open" );
+ BTIF_TRACE_DEBUG("btif_hl_delete_mdl calling btif_hl_cch_open" );
mdep_cfg_idx = p_mdl->extra.mdep_cfg_idx;
p_acb->filter.num_elems =1;
p_acb->filter.elem[0].data_type = p_acb->sup_feature.mdep[mdep_cfg_idx].mdep_cfg.data_cfg[mdep_cfg_idx].data_type;
@@ -4161,7 +4161,7 @@
btif_hl_evt_cb_t evt_param;
CHECK_BTHL_INIT();
- BTIF_TRACE_EVENT2("%s app_id=%d", __FUNCTION__, app_id);
+ BTIF_TRACE_EVENT("%s app_id=%d", __FUNCTION__, app_id);
btif_hl_display_calling_process_name();
if (btif_hl_find_app_idx(((UINT8)app_id), &app_idx))
@@ -4179,7 +4179,7 @@
status = BT_STATUS_FAIL;
}
- BTIF_TRACE_DEBUG1("de-reg return status=%d", status);
+ BTIF_TRACE_DEBUG("de-reg return status=%d", status);
return status;
}
/*******************************************************************************
@@ -4203,7 +4203,7 @@
int len;
CHECK_BTHL_INIT();
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
btif_hl_display_calling_process_name();
if (btif_hl_get_state() == BTIF_HL_STATE_DISABLED)
@@ -4215,7 +4215,7 @@
if (!btif_hl_find_avail_app_idx(&app_idx))
{
- BTIF_TRACE_ERROR0("Unable to allocate a new application control block");
+ BTIF_TRACE_ERROR("Unable to allocate a new application control block");
return BT_STATUS_FAIL;
}
@@ -4251,7 +4251,7 @@
if ( !btif_hl_get_bta_mdep_role(p_mdep_cfg->mdep_role, &(p_cfg->mdep_role)))
{
- BTIF_TRACE_ERROR1("Invalid mdep_role=%d", p_mdep_cfg->mdep_role);
+ BTIF_TRACE_ERROR("Invalid mdep_role=%d", p_mdep_cfg->mdep_role);
status = BT_STATUS_FAIL;
break;
}
@@ -4282,7 +4282,7 @@
if ( !btif_hl_get_bta_channel_type(p_mdep_cfg->channel_type, &(p_acb->channel_type[i])))
{
- BTIF_TRACE_ERROR1("Invalid channel_type=%d", p_mdep_cfg->channel_type);
+ BTIF_TRACE_ERROR("Invalid channel_type=%d", p_mdep_cfg->channel_type);
status = BT_STATUS_FAIL;
break;
}
@@ -4296,7 +4296,7 @@
len = sizeof(btif_hl_reg_t);
p_acb->reg_pending = TRUE;
reg_counter++;
- BTIF_TRACE_DEBUG2("calling btif_transfer_context status=%d app_id=%d", status, *app_id);
+ BTIF_TRACE_DEBUG("calling btif_transfer_context status=%d app_id=%d", status, *app_id);
status = btif_transfer_context (btif_hl_proc_cb_evt, BTIF_HL_REG_APP,
(char*) &evt_param, len, NULL);
ASSERTC(status == BT_STATUS_SUCCESS, "context transfer failed", status);
@@ -4307,7 +4307,7 @@
btif_hl_free_app_idx(app_idx);
}
- BTIF_TRACE_DEBUG2("register_application status=%d app_id=%d", status, *app_id);
+ BTIF_TRACE_DEBUG("register_application status=%d app_id=%d", status, *app_id);
return status;
}
@@ -4331,7 +4331,7 @@
btif_hl_evt_cb_t evt_param;
int *p_channel_id;
- BTIF_TRACE_DEBUG6("%s mdep_id=%d item_idx=%d, local_mdep_id=%d mdl_id=0x%x dch_mode=%d",
+ BTIF_TRACE_DEBUG("%s mdep_id=%d item_idx=%d, local_mdep_id=%d mdl_id=0x%x dch_mode=%d",
__FUNCTION__, mdep_id, item_idx, p_mdl_cfg->local_mdep_id,
p_mdl_cfg->mdl_id, p_mdl_cfg->dch_mode );
@@ -4360,11 +4360,11 @@
{
p_mdl->extra.peer_mdep_id = BTA_HL_INVALID_MDEP_ID;
}
- BTIF_TRACE_DEBUG4("%s app_idx=%d item_idx=%d mld_id=0x%x",
+ BTIF_TRACE_DEBUG("%s app_idx=%d item_idx=%d mld_id=0x%x",
__FUNCTION__, app_idx, item_idx, p_mdl->base.mdl_id);
evt_param.update_mdl.app_idx = app_idx;
len = sizeof(btif_hl_update_mdl_t);
- BTIF_TRACE_DEBUG1("send BTIF_HL_UPDATE_MDL event app_idx=%d ",app_idx);
+ BTIF_TRACE_DEBUG("send BTIF_HL_UPDATE_MDL event app_idx=%d ",app_idx);
if ((bt_status = btif_transfer_context (btif_hl_proc_cb_evt, BTIF_HL_UPDATE_MDL,
(char*) &evt_param, len, NULL)) == BT_STATUS_SUCCESS)
{
@@ -4374,7 +4374,7 @@
}
}
}
- BTIF_TRACE_DEBUG2("%s success=%d ",__FUNCTION__, success );
+ BTIF_TRACE_DEBUG("%s success=%d ",__FUNCTION__, success );
return success;
}
@@ -4407,7 +4407,7 @@
memset(p_mdl, 0, sizeof(btif_hl_mdl_cfg_t));
evt_param.update_mdl.app_idx = app_idx;
len = sizeof(btif_hl_update_mdl_t);
- BTIF_TRACE_DEBUG1("send BTIF_HL_UPDATE_MDL event app_idx=%d ",app_idx);
+ BTIF_TRACE_DEBUG("send BTIF_HL_UPDATE_MDL event app_idx=%d ",app_idx);
if ((bt_status = btif_transfer_context (btif_hl_proc_cb_evt, BTIF_HL_UPDATE_MDL,
(char*) &evt_param, len, NULL)) == BT_STATUS_SUCCESS)
{
@@ -4417,7 +4417,7 @@
}
}
- BTIF_TRACE_DEBUG2("%s success=%d ",__FUNCTION__, success );
+ BTIF_TRACE_DEBUG("%s success=%d ",__FUNCTION__, success );
return success;
}
@@ -4433,7 +4433,7 @@
static bt_status_t init( bthl_callbacks_t* callbacks ){
bt_status_t status = BT_STATUS_SUCCESS;
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
btif_hl_display_calling_process_name();
bt_hl_callbacks_cb = *callbacks;
bt_hl_callbacks = &bt_hl_callbacks_cb;
@@ -4451,7 +4451,7 @@
**
*******************************************************************************/
static void cleanup( void ){
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
btif_hl_display_calling_process_name();
if (bt_hl_callbacks)
{
@@ -4485,7 +4485,7 @@
**
*******************************************************************************/
const bthl_interface_t *btif_hl_get_interface(){
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
return &bthlInterface;
}
@@ -4502,7 +4502,7 @@
btif_hl_soc_cb_t *p_scb = NULL;
int maxfd=0;
- BTIF_TRACE_DEBUG1("btif_hl_update_maxfd max_org_s= %d", max_org_s);
+ BTIF_TRACE_DEBUG("btif_hl_update_maxfd max_org_s= %d", max_org_s);
maxfd = max_org_s;
if (!GKI_queue_is_empty(&soc_queue))
@@ -4511,20 +4511,20 @@
if (maxfd < p_scb->max_s)
{
maxfd = p_scb->max_s;
- BTIF_TRACE_DEBUG1("btif_hl_update_maxfd 1 maxfd=%d", maxfd);
+ BTIF_TRACE_DEBUG("btif_hl_update_maxfd 1 maxfd=%d", maxfd);
}
while (p_scb != NULL)
{
if (maxfd < p_scb->max_s)
{
maxfd = p_scb->max_s;
- BTIF_TRACE_DEBUG1("btif_hl_update_maxfd 2 maxfd=%d", maxfd);
+ BTIF_TRACE_DEBUG("btif_hl_update_maxfd 2 maxfd=%d", maxfd);
}
p_scb = (btif_hl_soc_cb_t *)GKI_getnext((void *)p_scb );
}
}
- BTIF_TRACE_DEBUG1("btif_hl_update_maxfd final *p_max_s=%d", maxfd);
+ BTIF_TRACE_DEBUG("btif_hl_update_maxfd final *p_max_s=%d", maxfd);
return maxfd;
}
/*******************************************************************************
@@ -4537,7 +4537,7 @@
**
*******************************************************************************/
btif_hl_soc_state_t btif_hl_get_socket_state(btif_hl_soc_cb_t *p_scb){
- BTIF_TRACE_DEBUG1("btif_hl_get_socket_state state=%d", p_scb->state);
+ BTIF_TRACE_DEBUG("btif_hl_get_socket_state state=%d", p_scb->state);
return p_scb->state;
}
/*******************************************************************************
@@ -4550,7 +4550,7 @@
**
*******************************************************************************/
void btif_hl_set_socket_state(btif_hl_soc_cb_t *p_scb, btif_hl_soc_state_t new_state){
- BTIF_TRACE_DEBUG2("btif_hl_set_socket_state %d---->%d", p_scb->state, new_state);
+ BTIF_TRACE_DEBUG("btif_hl_set_socket_state %d---->%d", p_scb->state, new_state);
p_scb->state = new_state;
}
/*******************************************************************************
@@ -4567,13 +4567,13 @@
UINT8 i;
btif_hl_mdl_cb_t *p_dcb;
BOOLEAN found= FALSE;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
for (i=0; i < BTA_HL_NUM_MDLS_PER_MCL ; i ++)
{
p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, i);
if (p_dcb && p_dcb->in_use && p_dcb->p_scb)
{
- BTIF_TRACE_DEBUG3("found socket for app_idx=%d mcl_id=%d, mdl_idx=%d", app_idx, mcl_idx, i);
+ BTIF_TRACE_DEBUG("found socket for app_idx=%d mcl_id=%d, mdl_idx=%d", app_idx, mcl_idx, i);
btif_hl_set_socket_state (p_dcb->p_scb, BTIF_HL_SOC_STATE_W4_REL);
p_dcb->p_scb = NULL;
found = TRUE;
@@ -4595,8 +4595,8 @@
btif_hl_soc_cb_t *p_scb = NULL;
btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
- BTIF_TRACE_DEBUG3("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx );
if (p_dcb && p_dcb->p_scb)
{
@@ -4622,13 +4622,13 @@
UINT8 soc_idx;
BOOLEAN status = FALSE;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (p_dcb && ((p_scb = (btif_hl_soc_cb_t *)GKI_getbuf((UINT16)sizeof(btif_hl_soc_cb_t)))!=NULL))
{
if (socketpair(AF_UNIX, SOCK_STREAM, 0, p_scb->socket_id) >= 0)
{
- BTIF_TRACE_DEBUG2("socket id[0]=%d id[1]=%d",p_scb->socket_id[0], p_scb->socket_id[1] );
+ BTIF_TRACE_DEBUG("socket id[0]=%d id[1]=%d",p_scb->socket_id[0], p_scb->socket_id[1] );
p_dcb->p_scb = p_scb;
p_scb->app_idx = app_idx;
p_scb->mcl_idx = mcl_idx;
@@ -4649,7 +4649,7 @@
}
}
- BTIF_TRACE_DEBUG2("%s status=%d", __FUNCTION__, status);
+ BTIF_TRACE_DEBUG("%s status=%d", __FUNCTION__, status);
return status;
}
/*******************************************************************************
@@ -4670,19 +4670,19 @@
bt_status_t status;
int len;
- BTIF_TRACE_DEBUG1("entering %s",__FUNCTION__);
+ BTIF_TRACE_DEBUG("entering %s",__FUNCTION__);
if (!GKI_queue_is_empty(&soc_queue))
{
p_scb = (btif_hl_soc_cb_t *)GKI_getfirst((void *)&soc_queue);
- BTIF_TRACE_DEBUG1("btif_hl_add_socket_to_set first p_scb=0x%x", p_scb);
+ BTIF_TRACE_DEBUG("btif_hl_add_socket_to_set first p_scb=0x%x", p_scb);
while (p_scb != NULL)
{
if (btif_hl_get_socket_state(p_scb) == BTIF_HL_SOC_STATE_W4_ADD)
{
btif_hl_set_socket_state(p_scb, BTIF_HL_SOC_STATE_W4_READ);
FD_SET(p_scb->socket_id[1], p_org_set);
- BTIF_TRACE_DEBUG2("found and set socket_id=%d is_set=%d", p_scb->socket_id[1], FD_ISSET(p_scb->socket_id[1], p_org_set));
+ BTIF_TRACE_DEBUG("found and set socket_id=%d is_set=%d", p_scb->socket_id[1], FD_ISSET(p_scb->socket_id[1], p_org_set));
p_mcb = BTIF_HL_GET_MCL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx);
p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
p_acb = BTIF_HL_GET_APP_CB_PTR(p_scb->app_idx);
@@ -4702,11 +4702,11 @@
}
}
p_scb = (btif_hl_soc_cb_t *)GKI_getnext((void *)p_scb );
- BTIF_TRACE_DEBUG1("next p_scb=0x%x", p_scb);
+ BTIF_TRACE_DEBUG("next p_scb=0x%x", p_scb);
}
}
- BTIF_TRACE_DEBUG1("leaving %s",__FUNCTION__);
+ BTIF_TRACE_DEBUG("leaving %s",__FUNCTION__);
}
/*******************************************************************************
**
@@ -4727,7 +4727,7 @@
int app_idx;
bt_status_t status;
- BTIF_TRACE_DEBUG1("entering %s",__FUNCTION__);
+ BTIF_TRACE_DEBUG("entering %s",__FUNCTION__);
if (!GKI_queue_is_empty(&soc_queue))
{
p_scb = (btif_hl_soc_cb_t *)GKI_getfirst((void *)&soc_queue);
@@ -4735,7 +4735,7 @@
{
if (btif_hl_get_socket_state(p_scb) == BTIF_HL_SOC_STATE_W4_REL)
{
- BTIF_TRACE_DEBUG3("app_idx=%d mcl_id=%d, mdl_idx=%d",
+ BTIF_TRACE_DEBUG("app_idx=%d mcl_id=%d, mdl_idx=%d",
p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
btif_hl_set_socket_state(p_scb, BTIF_HL_SOC_STATE_IDLE);
if (p_scb->socket_id[1] != -1)
@@ -4759,7 +4759,7 @@
}
}
p_scb = (btif_hl_soc_cb_t *)GKI_getnext((void *)p_scb );
- BTIF_TRACE_DEBUG1("while loop next p_scb=0x%x", p_scb);
+ BTIF_TRACE_DEBUG("while loop next p_scb=0x%x", p_scb);
}
p_scb = (btif_hl_soc_cb_t *)GKI_getfirst((void *)&soc_queue);
@@ -4768,14 +4768,14 @@
if (btif_hl_get_socket_state(p_scb) == BTIF_HL_SOC_STATE_IDLE)
{
p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
- BTIF_TRACE_DEBUG4("idle socket app_idx=%d mcl_id=%d, mdl_idx=%d p_dcb->in_use=%d",
+ BTIF_TRACE_DEBUG("idle socket app_idx=%d mcl_id=%d, mdl_idx=%d p_dcb->in_use=%d",
p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx, p_dcb->in_use);
GKI_remove_from_queue((void *)&soc_queue, p_scb);
btif_hl_free_buf((void **)&p_scb);
p_dcb->p_scb = NULL;
element_removed = TRUE;
}
- BTIF_TRACE_DEBUG2("element_removed=%d p_scb=0x%x", element_removed, p_scb);
+ BTIF_TRACE_DEBUG("element_removed=%d p_scb=0x%x", element_removed, p_scb);
if (element_removed)
{
element_removed = FALSE;
@@ -4784,10 +4784,10 @@
else
p_scb = (btif_hl_soc_cb_t *)GKI_getnext((void *)p_scb );
- BTIF_TRACE_DEBUG1("while loop p_scb=0x%x", p_scb);
+ BTIF_TRACE_DEBUG("while loop p_scb=0x%x", p_scb);
}
}
- BTIF_TRACE_DEBUG1("leaving %s",__FUNCTION__);
+ BTIF_TRACE_DEBUG("leaving %s",__FUNCTION__);
}
/*******************************************************************************
**
@@ -4800,7 +4800,7 @@
*******************************************************************************/
void btif_hl_select_wakeup_callback( fd_set *p_org_set , int wakeup_signal){
- BTIF_TRACE_DEBUG2("entering %s wakeup_signal=0x%04x",__FUNCTION__, wakeup_signal);
+ BTIF_TRACE_DEBUG("entering %s wakeup_signal=0x%04x",__FUNCTION__, wakeup_signal);
if (wakeup_signal == btif_hl_signal_select_wakeup )
{
@@ -4810,7 +4810,7 @@
{
btif_hl_close_socket(p_org_set);
}
- BTIF_TRACE_DEBUG1("leaving %s",__FUNCTION__);
+ BTIF_TRACE_DEBUG("leaving %s",__FUNCTION__);
}
/*******************************************************************************
@@ -4828,24 +4828,24 @@
int r;
UNUSED(p_org_set);
- BTIF_TRACE_DEBUG1("entering %s",__FUNCTION__);
+ BTIF_TRACE_DEBUG("entering %s",__FUNCTION__);
if (!GKI_queue_is_empty(&soc_queue))
{
p_scb = (btif_hl_soc_cb_t *)GKI_getfirst((void *)&soc_queue);
- BTIF_TRACE_DEBUG0(" GKI queue is not empty ");
+ BTIF_TRACE_DEBUG(" GKI queue is not empty ");
while (p_scb != NULL)
{
if (btif_hl_get_socket_state(p_scb) == BTIF_HL_SOC_STATE_W4_READ)
{
if (FD_ISSET(p_scb->socket_id[1], p_cur_set))
{
- BTIF_TRACE_DEBUG0("read data");
- BTIF_TRACE_DEBUG0("state= BTIF_HL_SOC_STATE_W4_READ");
+ BTIF_TRACE_DEBUG("read data");
+ BTIF_TRACE_DEBUG("state= BTIF_HL_SOC_STATE_W4_READ");
p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx);
if (p_dcb->p_tx_pkt)
{
- BTIF_TRACE_ERROR1("Rcv new pkt but the last pkt is still not been sent tx_size=%d", p_dcb->tx_size);
+ BTIF_TRACE_ERROR("Rcv new pkt but the last pkt is still not been sent tx_size=%d", p_dcb->tx_size);
btif_hl_free_buf((void **) &p_dcb->p_tx_pkt);
}
p_dcb->p_tx_pkt = btif_hl_get_buf (p_dcb->mtu);
@@ -4858,15 +4858,15 @@
if ((r = (int)recv(p_scb->socket_id[1], p_dcb->p_tx_pkt, p_dcb->mtu , MSG_DONTWAIT)) > 0)
{
- BTIF_TRACE_DEBUG1("btif_hl_select_monitor_callback send data r =%d", r);
+ BTIF_TRACE_DEBUG("btif_hl_select_monitor_callback send data r =%d", r);
p_dcb->tx_size = r;
- BTIF_TRACE_DEBUG1("btif_hl_select_monitor_callback send data tx_size=%d", p_dcb->tx_size );
+ BTIF_TRACE_DEBUG("btif_hl_select_monitor_callback send data tx_size=%d", p_dcb->tx_size );
BTA_HlSendData(p_dcb->mdl_handle, p_dcb->tx_size );
}
if (r <= 0 )
{
- BTIF_TRACE_DEBUG1("btif_hl_select_monitor_callback receive failed r=%d",r);
+ BTIF_TRACE_DEBUG("btif_hl_select_monitor_callback receive failed r=%d",r);
BTA_HlDchClose(p_dcb->mdl_handle );
}
}
@@ -4877,9 +4877,9 @@
}
else
{
- BTIF_TRACE_DEBUG0("btif_hl_select_monitor_queue is empty");
+ BTIF_TRACE_DEBUG("btif_hl_select_monitor_queue is empty");
}
- BTIF_TRACE_DEBUG1("leaving %s",__FUNCTION__);
+ BTIF_TRACE_DEBUG("leaving %s",__FUNCTION__);
}
/*******************************************************************************
**
@@ -4891,14 +4891,14 @@
**
*******************************************************************************/
static inline int btif_hl_select_wakeup_init(fd_set* set){
- BTIF_TRACE_DEBUG0("btif_hl_select_wakeup_init");
+ BTIF_TRACE_DEBUG("btif_hl_select_wakeup_init");
if (socketpair(AF_UNIX, SOCK_STREAM, 0, signal_fds) < 0)
{
- BTIF_TRACE_ERROR1("socketpair failed: %s", strerror(errno));
+ BTIF_TRACE_ERROR("socketpair failed: %s", strerror(errno));
return -1;
}
- BTIF_TRACE_DEBUG2("btif_hl_select_wakeup_init signal_fds[0]=%d signal_fds[1]=%d",signal_fds[0], signal_fds[1] );
+ BTIF_TRACE_DEBUG("btif_hl_select_wakeup_init signal_fds[0]=%d signal_fds[1]=%d",signal_fds[0], signal_fds[1] );
FD_SET(signal_fds[0], set);
return signal_fds[0];
@@ -4915,7 +4915,7 @@
*******************************************************************************/
static inline int btif_hl_select_wakeup(void){
char sig_on = btif_hl_signal_select_wakeup;
- BTIF_TRACE_DEBUG0("btif_hl_select_wakeup");
+ BTIF_TRACE_DEBUG("btif_hl_select_wakeup");
return send(signal_fds[1], &sig_on, sizeof(sig_on), 0);
}
@@ -4930,7 +4930,7 @@
*******************************************************************************/
static inline int btif_hl_select_close_connected(void){
char sig_on = btif_hl_signal_select_close_connected;
- BTIF_TRACE_DEBUG0("btif_hl_select_close_connected");
+ BTIF_TRACE_DEBUG("btif_hl_select_close_connected");
return send(signal_fds[1], &sig_on, sizeof(sig_on), 0);
}
@@ -4947,7 +4947,7 @@
{
int result = 0;
char sig_on = btif_hl_signal_select_exit;
- BTIF_TRACE_DEBUG0("btif_hl_signal_select_exit");
+ BTIF_TRACE_DEBUG("btif_hl_signal_select_exit");
result = send(signal_fds[1], &sig_on, sizeof(sig_on), 0);
if (btif_is_enabled())
{
@@ -4984,7 +4984,7 @@
static inline int btif_hl_select_wake_reset(void){
char sig_recv = 0;
- BTIF_TRACE_DEBUG0("btif_hl_select_wake_reset");
+ BTIF_TRACE_DEBUG("btif_hl_select_wake_reset");
recv(signal_fds[0], &sig_recv, sizeof(sig_recv), MSG_WAITALL);
return(int)sig_recv;
}
@@ -4998,7 +4998,7 @@
**
*******************************************************************************/
static inline int btif_hl_select_wake_signaled(fd_set* set){
- BTIF_TRACE_DEBUG0("btif_hl_select_wake_signaled");
+ BTIF_TRACE_DEBUG("btif_hl_select_wake_signaled");
return FD_ISSET(signal_fds[0], set);
}
/*******************************************************************************
@@ -5019,7 +5019,7 @@
close(connected_s);
}
listen_s = connected_s = -1;
- BTIF_TRACE_DEBUG0("hl thread cleanup");
+ BTIF_TRACE_DEBUG("hl thread cleanup");
}
/*******************************************************************************
**
@@ -5035,33 +5035,33 @@
int r, max_curr_s, max_org_s;
UNUSED(arg);
- BTIF_TRACE_DEBUG0("entered btif_hl_select_thread");
+ BTIF_TRACE_DEBUG("entered btif_hl_select_thread");
FD_ZERO(&org_set);
max_org_s = btif_hl_select_wakeup_init(&org_set);
- BTIF_TRACE_DEBUG1("max_s=%d ", max_org_s);
+ BTIF_TRACE_DEBUG("max_s=%d ", max_org_s);
for (;;)
{
r = 0;
- BTIF_TRACE_DEBUG0("set curr_set = org_set ");
+ BTIF_TRACE_DEBUG("set curr_set = org_set ");
curr_set = org_set;
max_curr_s = max_org_s;
int ret = select((max_curr_s + 1), &curr_set, NULL, NULL, NULL);
- BTIF_TRACE_DEBUG1("select unblocked ret=%d", ret);
+ BTIF_TRACE_DEBUG("select unblocked ret=%d", ret);
if (ret == -1)
{
- BTIF_TRACE_DEBUG0("select() ret -1, exit the thread");
+ BTIF_TRACE_DEBUG("select() ret -1, exit the thread");
btif_hl_thread_cleanup();
select_thread_id = -1;
return 0;
}
else if (ret)
{
- BTIF_TRACE_DEBUG1("btif_hl_select_wake_signaled, signal ret=%d", ret);
+ BTIF_TRACE_DEBUG("btif_hl_select_wake_signaled, signal ret=%d", ret);
if (btif_hl_select_wake_signaled(&curr_set))
{
r = btif_hl_select_wake_reset();
- BTIF_TRACE_DEBUG1("btif_hl_select_wake_signaled, signal:%d", r);
+ BTIF_TRACE_DEBUG("btif_hl_select_wake_signaled, signal:%d", r);
if (r == btif_hl_signal_select_wakeup || r == btif_hl_signal_select_close_connected )
{
btif_hl_select_wakeup_callback(&org_set, r);
@@ -5069,7 +5069,7 @@
else if( r == btif_hl_signal_select_exit)
{
btif_hl_thread_cleanup();
- BTIF_TRACE_DEBUG0("Exit hl_select_thread for btif_hl_signal_select_exit");
+ BTIF_TRACE_DEBUG("Exit hl_select_thread for btif_hl_signal_select_exit");
return 0;
}
}
@@ -5078,9 +5078,9 @@
max_org_s = btif_hl_update_maxfd(max_org_s);
}
else
- BTIF_TRACE_DEBUG1("no data, select ret: %d\n", ret);
+ BTIF_TRACE_DEBUG("no data, select ret: %d\n", ret);
}
- BTIF_TRACE_DEBUG0("leaving hl_select_thread");
+ BTIF_TRACE_DEBUG("leaving hl_select_thread");
return 0;
}
@@ -5094,7 +5094,7 @@
**
*******************************************************************************/
static inline pthread_t create_thread(void *(*start_routine)(void *), void * arg){
- BTIF_TRACE_DEBUG0("create_thread: entered");
+ BTIF_TRACE_DEBUG("create_thread: entered");
pthread_attr_t thread_attr;
pthread_attr_init(&thread_attr);
@@ -5102,10 +5102,10 @@
pthread_t thread_id = -1;
if ( pthread_create(&thread_id, &thread_attr, start_routine, arg)!=0 )
{
- BTIF_TRACE_ERROR1("pthread_create : %s", strerror(errno));
+ BTIF_TRACE_ERROR("pthread_create : %s", strerror(errno));
return -1;
}
- BTIF_TRACE_DEBUG0("create_thread: thread created successfully");
+ BTIF_TRACE_DEBUG("create_thread: thread created successfully");
return thread_id;
}
@@ -5119,7 +5119,7 @@
**
*******************************************************************************/
void btif_hl_soc_thread_init(void){
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
GKI_init_q(&soc_queue);
select_thread_id = create_thread(btif_hl_select_thread, NULL);
}
@@ -5139,7 +5139,7 @@
btif_hl_app_cb_t *p_acb;
tBTA_HL_MDL_CFG *p;
int i;
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (btif_hl_find_app_idx(app_id, &app_idx))
{
@@ -5151,6 +5151,6 @@
result = TRUE;
}
- BTIF_TRACE_DEBUG1("result=%d", result);
+ BTIF_TRACE_DEBUG("result=%d", result);
return result;
}
diff --git a/btif/src/btif_media_task.c b/btif/src/btif_media_task.c
index 4653081..6ba45dc 100644
--- a/btif/src/btif_media_task.c
+++ b/btif/src/btif_media_task.c
@@ -375,7 +375,7 @@
now_us = now.tv_sec*USEC_PER_SEC + now.tv_nsec/1000;
diff_us = (now.tv_sec - prev.tv_sec) * USEC_PER_SEC + (now.tv_nsec - prev.tv_nsec)/1000;
- APPL_TRACE_DEBUG4("[%s] ts %08d, diff : %08d, queue sz %d", comment, now_us, diff_us,
+ APPL_TRACE_DEBUG("[%s] ts %08d, diff : %08d, queue sz %d", comment, now_us, diff_us,
btif_media_cb.TxAaQ.count);
prev = now;
@@ -427,7 +427,7 @@
static void btif_audiopath_detached(void)
{
- APPL_TRACE_EVENT0("## AUDIO PATH DETACHED ##");
+ APPL_TRACE_EVENT("## AUDIO PATH DETACHED ##");
/* send stop request only if we are actively streaming and haven't received
a stop request. Potentially audioflinger detached abnormally */
@@ -442,13 +442,13 @@
{
UINT8 ack = status;
- APPL_TRACE_EVENT2("## a2dp ack : %s, status %d ##",
+ APPL_TRACE_EVENT("## a2dp ack : %s, status %d ##",
dump_a2dp_ctrl_event(btif_media_cb.a2dp_cmd_pending), status);
/* sanity check */
if (btif_media_cb.a2dp_cmd_pending == A2DP_CTRL_CMD_NONE)
{
- APPL_TRACE_ERROR0("warning : no command pending, ignore ack");
+ APPL_TRACE_ERROR("warning : no command pending, ignore ack");
return;
}
@@ -469,7 +469,7 @@
/* detach on ctrl channel means audioflinger process was terminated */
if (n == 0)
{
- APPL_TRACE_EVENT0("CTRL CH DETACHED");
+ APPL_TRACE_EVENT("CTRL CH DETACHED");
UIPC_Close(UIPC_CH_ID_AV_CTRL);
/* we can operate only on datachannel, if af client wants to
do send additional commands the ctrl channel would be reestablished */
@@ -477,7 +477,7 @@
return;
}
- APPL_TRACE_DEBUG1("a2dp-ctrl-cmd : %s", dump_a2dp_ctrl_event(cmd));
+ APPL_TRACE_DEBUG("a2dp-ctrl-cmd : %s", dump_a2dp_ctrl_event(cmd));
btif_media_cb.a2dp_cmd_pending = cmd;
@@ -568,18 +568,18 @@
}
default:
- APPL_TRACE_ERROR1("UNSUPPORTED CMD (%d)", cmd);
+ APPL_TRACE_ERROR("UNSUPPORTED CMD (%d)", cmd);
a2dp_cmd_acknowledge(A2DP_CTRL_ACK_FAILURE);
break;
}
- APPL_TRACE_DEBUG1("a2dp-ctrl-cmd : %s DONE", dump_a2dp_ctrl_event(cmd));
+ APPL_TRACE_DEBUG("a2dp-ctrl-cmd : %s DONE", dump_a2dp_ctrl_event(cmd));
}
static void btif_a2dp_ctrl_cb(tUIPC_CH_ID ch_id, tUIPC_EVENT event)
{
UNUSED(ch_id);
- APPL_TRACE_DEBUG1("A2DP-CTRL-CHANNEL EVENT %s", dump_uipc_event(event));
+ APPL_TRACE_DEBUG("A2DP-CTRL-CHANNEL EVENT %s", dump_uipc_event(event));
switch(event)
{
@@ -599,7 +599,7 @@
break;
default :
- APPL_TRACE_ERROR1("### A2DP-CTRL-CHANNEL EVENT %d NOT HANDLED ###", event);
+ APPL_TRACE_ERROR("### A2DP-CTRL-CHANNEL EVENT %d NOT HANDLED ###", event);
break;
}
}
@@ -608,7 +608,7 @@
{
UNUSED(ch_id);
- APPL_TRACE_DEBUG1("BTIF MEDIA (A2DP-DATA) EVENT %s", dump_uipc_event(event));
+ APPL_TRACE_DEBUG("BTIF MEDIA (A2DP-DATA) EVENT %s", dump_uipc_event(event));
switch(event)
{
@@ -639,7 +639,7 @@
break;
default :
- APPL_TRACE_ERROR1("### A2DP-DATA EVENT %d NOT HANDLED ###", event);
+ APPL_TRACE_ERROR("### A2DP-DATA EVENT %d NOT HANDLED ###", event);
break;
}
}
@@ -657,7 +657,7 @@
if (!btif_av_is_peer_edr())
{
rate = BTIF_A2DP_NON_EDR_MAX_RATE;
- APPL_TRACE_DEBUG1("non-edr a2dp sink detected, restrict rate to %d", rate);
+ APPL_TRACE_DEBUG("non-edr a2dp sink detected, restrict rate to %d", rate);
}
return rate;
@@ -678,7 +678,7 @@
/* lookup table to convert freq */
UINT16 freq_block_tbl[5] = { SBC_sf48000, SBC_sf44100, SBC_sf32000, 0, SBC_sf16000 };
- APPL_TRACE_DEBUG0("btif_a2dp_encoder_init");
+ APPL_TRACE_DEBUG("btif_a2dp_encoder_init");
/* Retrieve the current SBC configuration (default if currently not used) */
bta_av_co_audio_get_sbc_config(&sbc_config, &minmtu);
@@ -689,7 +689,7 @@
msg.SamplingFreq = freq_block_tbl[sbc_config.samp_freq >> 5];
msg.MtuSize = minmtu;
- APPL_TRACE_EVENT1("msg.ChannelMode %x", msg.ChannelMode);
+ APPL_TRACE_EVENT("msg.ChannelMode %x", msg.ChannelMode);
/* Init the media task to encode SBC properly */
btif_media_task_enc_init_req(&msg);
@@ -703,18 +703,18 @@
UINT8 pref_min;
UINT8 pref_max;
- APPL_TRACE_DEBUG0("btif_a2dp_encoder_update");
+ APPL_TRACE_DEBUG("btif_a2dp_encoder_update");
/* Retrieve the current SBC configuration (default if currently not used) */
bta_av_co_audio_get_sbc_config(&sbc_config, &minmtu);
- APPL_TRACE_DEBUG4("btif_a2dp_encoder_update: Common min_bitpool:%d(0x%x) max_bitpool:%d(0x%x)",
+ APPL_TRACE_DEBUG("btif_a2dp_encoder_update: Common min_bitpool:%d(0x%x) max_bitpool:%d(0x%x)",
sbc_config.min_bitpool, sbc_config.min_bitpool,
sbc_config.max_bitpool, sbc_config.max_bitpool);
if (sbc_config.min_bitpool > sbc_config.max_bitpool)
{
- APPL_TRACE_ERROR0("btif_a2dp_encoder_update: ERROR btif_a2dp_encoder_update min_bitpool > max_bitpool");
+ APPL_TRACE_ERROR("btif_a2dp_encoder_update: ERROR btif_a2dp_encoder_update min_bitpool > max_bitpool");
}
/* check if remote sink has a preferred bitpool range */
@@ -734,7 +734,7 @@
if ((pref_min != sbc_config.min_bitpool) || (pref_max != sbc_config.max_bitpool))
{
- APPL_TRACE_EVENT2("## adjusted our bitpool range to peer pref [%d:%d] ##",
+ APPL_TRACE_EVENT("## adjusted our bitpool range to peer pref [%d:%d] ##",
pref_min, pref_max);
}
}
@@ -767,11 +767,11 @@
if (media_task_running != MEDIA_TASK_STATE_OFF)
{
- APPL_TRACE_ERROR0("warning : media task already running");
+ APPL_TRACE_ERROR("warning : media task already running");
return GKI_FAILURE;
}
- APPL_TRACE_EVENT0("## A2DP START MEDIA TASK ##");
+ APPL_TRACE_EVENT("## A2DP START MEDIA TASK ##");
/* start a2dp media task */
retval = GKI_create_task((TASKPTR)btif_media_task, A2DP_MEDIA_TASK,
@@ -786,7 +786,7 @@
while (media_task_running == MEDIA_TASK_STATE_OFF)
usleep(10);
- APPL_TRACE_EVENT0("## A2DP MEDIA TASK STARTED ##");
+ APPL_TRACE_EVENT("## A2DP MEDIA TASK STARTED ##");
return retval;
}
@@ -803,7 +803,7 @@
void btif_a2dp_stop_media_task(void)
{
- APPL_TRACE_EVENT0("## A2DP STOP MEDIA TASK ##");
+ APPL_TRACE_EVENT("## A2DP STOP MEDIA TASK ##");
GKI_destroy_task(BT_MEDIA_TASK);
}
@@ -838,7 +838,7 @@
tBTIF_AV_MEDIA_FEEDINGS media_feeding;
tBTIF_STATUS status;
- APPL_TRACE_EVENT0("## A2DP SETUP CODEC ##");
+ APPL_TRACE_EVENT("## A2DP SETUP CODEC ##");
GKI_disable();
@@ -878,7 +878,7 @@
void btif_a2dp_on_idle(void)
{
- APPL_TRACE_EVENT0("## ON A2DP IDLE ##");
+ APPL_TRACE_EVENT("## ON A2DP IDLE ##");
if (btif_media_cb.peer_sep == AVDT_TSEP_SNK)
{
/* Make sure media task is stopped */
@@ -893,7 +893,7 @@
btif_media_task_aa_rx_flush_req();
btif_media_task_stop_decoding_req();
btif_media_task_clear_track();
- APPL_TRACE_DEBUG0("Stopped BT track");
+ APPL_TRACE_DEBUG("Stopped BT track");
}
#endif
}
@@ -910,7 +910,7 @@
void btif_a2dp_on_open(void)
{
- APPL_TRACE_EVENT0("## ON A2DP OPEN ##");
+ APPL_TRACE_EVENT("## ON A2DP OPEN ##");
/* always use callback to notify socket events */
UIPC_Open(UIPC_CH_ID_AV_AUDIO, btif_a2dp_data_cb);
@@ -1005,15 +1005,15 @@
void btif_reset_decoder(UINT8 *p_av)
{
- APPL_TRACE_EVENT0("btif_reset_decoder");
- APPL_TRACE_DEBUG6("btif_reset_decoder p_codec_info[%x:%x:%x:%x:%x:%x]",
+ APPL_TRACE_EVENT("btif_reset_decoder");
+ APPL_TRACE_DEBUG("btif_reset_decoder p_codec_info[%x:%x:%x:%x:%x:%x]",
p_av[1], p_av[2], p_av[3],
p_av[4], p_av[5], p_av[6]);
tBTIF_MEDIA_SINK_CFG_UPDATE *p_buf;
if (NULL == (p_buf = GKI_getbuf(sizeof(tBTIF_MEDIA_SINK_CFG_UPDATE))))
{
- APPL_TRACE_EVENT0("btif_reset_decoder No Buffer ");
+ APPL_TRACE_EVENT("btif_reset_decoder No Buffer ");
return;
}
@@ -1038,7 +1038,7 @@
tBTIF_STATUS status;
BOOLEAN ack = FALSE;
- APPL_TRACE_EVENT0("## ON A2DP STARTED ##");
+ APPL_TRACE_EVENT("## ON A2DP STARTED ##");
if (p_av == NULL)
{
@@ -1091,7 +1091,7 @@
{
tBTIF_STATUS status;
- APPL_TRACE_EVENT0("## A2DP_CTRL_ACK_FAILURE ##");
+ APPL_TRACE_EVENT("## A2DP_CTRL_ACK_FAILURE ##");
a2dp_cmd_acknowledge(A2DP_CTRL_ACK_FAILURE);
}
@@ -1107,7 +1107,7 @@
void btif_a2dp_on_stopped(tBTA_AV_SUSPEND *p_av)
{
- APPL_TRACE_EVENT0("## ON A2DP STOPPED ##");
+ APPL_TRACE_EVENT("## ON A2DP STOPPED ##");
if (btif_media_cb.peer_sep == AVDT_TSEP_SRC) /* Handling for A2DP SINK cases*/
{
btif_media_cb.rx_flush = TRUE;
@@ -1122,7 +1122,7 @@
{
if (p_av->status != BTA_AV_SUCCESS)
{
- APPL_TRACE_EVENT1("AV STOP FAILED (%d)", p_av->status);
+ APPL_TRACE_EVENT("AV STOP FAILED (%d)", p_av->status);
if (p_av->initiator)
a2dp_cmd_acknowledge(A2DP_CTRL_ACK_FAILURE);
@@ -1153,7 +1153,7 @@
void btif_a2dp_on_suspended(tBTA_AV_SUSPEND *p_av)
{
- APPL_TRACE_EVENT0("## ON A2DP SUSPENDED ##");
+ APPL_TRACE_EVENT("## ON A2DP SUSPENDED ##");
if (btif_media_cb.peer_sep == AVDT_TSEP_SRC)
{
btif_media_cb.rx_flush = TRUE;
@@ -1181,14 +1181,14 @@
/* when true media task discards any rx frames */
void btif_a2dp_set_rx_flush(BOOLEAN enable)
{
- APPL_TRACE_EVENT1("## DROP RX %d ##", enable);
+ APPL_TRACE_EVENT("## DROP RX %d ##", enable);
btif_media_cb.rx_flush = enable;
}
/* when true media task discards any tx frames */
void btif_a2dp_set_tx_flush(BOOLEAN enable)
{
- APPL_TRACE_EVENT1("## DROP TX %d ##", enable);
+ APPL_TRACE_EVENT("## DROP TX %d ##", enable);
btif_media_cb.tx_flush = enable;
}
@@ -1212,7 +1212,7 @@
count = btif_media_cb.RxSbcQ.count;
if (0 == count)
{
- APPL_TRACE_DEBUG0(" QUE EMPTY ");
+ APPL_TRACE_DEBUG(" QUE EMPTY ");
}
else
{
@@ -1223,7 +1223,7 @@
}
num_frames_to_process = btif_media_cb.frames_to_process;
- APPL_TRACE_DEBUG0(" Process Frames + ");
+ APPL_TRACE_DEBUG(" Process Frames + ");
do
{
@@ -1231,9 +1231,9 @@
if (p_msg == NULL)
return;
num_sbc_frames = p_msg->num_frames_to_be_processed; /* num of frames in Que Packets */
- APPL_TRACE_DEBUG1(" Frames left in topmost packet %d", num_sbc_frames);
- APPL_TRACE_DEBUG1(" Remaining frames to process in tick %d", num_frames_to_process);
- APPL_TRACE_DEBUG1(" Num of Packets in Que %d", btif_media_cb.RxSbcQ.count);
+ APPL_TRACE_DEBUG(" Frames left in topmost packet %d", num_sbc_frames);
+ APPL_TRACE_DEBUG(" Remaining frames to process in tick %d", num_frames_to_process);
+ APPL_TRACE_DEBUG(" Num of Packets in Que %d", btif_media_cb.RxSbcQ.count);
if ( num_sbc_frames > num_frames_to_process) /* Que Packet has more frames*/
{
@@ -1249,7 +1249,7 @@
p_msg = (tBT_SBC_HDR *)GKI_dequeue(&(btif_media_cb.RxSbcQ));
if( p_msg == NULL )
{
- APPL_TRACE_ERROR0("Insufficient data in que ");
+ APPL_TRACE_ERROR("Insufficient data in que ");
break;
}
num_frames_to_process = num_frames_to_process - p_msg->num_frames_to_be_processed;
@@ -1257,7 +1257,7 @@
}
}while(num_frames_to_process > 0);
- APPL_TRACE_DEBUG0(" Process Frames - ");
+ APPL_TRACE_DEBUG(" Process Frames - ");
}
}
#endif
@@ -1276,7 +1276,7 @@
{
#if (defined(DEBUG_MEDIA_AV_FLOW) && (DEBUG_MEDIA_AV_FLOW == TRUE))
static UINT16 Debug = 0;
- APPL_TRACE_DEBUG1("btif_media_task_aa_handle_timer: %d", Debug++);
+ APPL_TRACE_DEBUG("btif_media_task_aa_handle_timer: %d", Debug++);
#endif
log_tstamps_us("media task tx timer");
@@ -1288,7 +1288,7 @@
}
else
{
- APPL_TRACE_ERROR0("ERROR Media task Scheduled after Suspend");
+ APPL_TRACE_ERROR("ERROR Media task Scheduled after Suspend");
}
#endif
}
@@ -1307,7 +1307,7 @@
{
#if (defined(DEBUG_MEDIA_AV_FLOW) && (DEBUG_MEDIA_AV_FLOW == TRUE))
static UINT16 Debug = 0;
- APPL_TRACE_DEBUG1("btif_media_task_aa_handle_uipc_rx_rdy: %d", Debug++);
+ APPL_TRACE_DEBUG("btif_media_task_aa_handle_uipc_rx_rdy: %d", Debug++);
#endif
/* process all the UIPC data */
@@ -1425,7 +1425,7 @@
/* Clear media task flag */
media_task_running = MEDIA_TASK_STATE_OFF;
- APPL_TRACE_DEBUG0("MEDIA TASK EXITING");
+ APPL_TRACE_DEBUG("MEDIA TASK EXITING");
return 0;
}
@@ -1531,7 +1531,7 @@
break;
#endif
default:
- APPL_TRACE_ERROR1("ERROR in btif_media_task_handle_cmd unknown event %d", p_msg->event);
+ APPL_TRACE_ERROR("ERROR in btif_media_task_handle_cmd unknown event %d", p_msg->event);
}
GKI_freebuf(p_msg);
VERBOSE("btif_media_task_handle_cmd : %s DONE", dump_media_event(p_msg->event));
@@ -1560,7 +1560,7 @@
if ((btif_media_cb.peer_sep == AVDT_TSEP_SNK) || (btif_media_cb.rx_flush))
{
- APPL_TRACE_DEBUG0(" State Changed happened in this tick ");
+ APPL_TRACE_DEBUG(" State Changed happened in this tick ");
return;
}
@@ -1568,7 +1568,7 @@
if (!btif_media_cb.data_channel_open)
return;
- APPL_TRACE_DEBUG2("Number of sbc frames %d, frame_len %d", num_sbc_frames, sbc_frame_len);
+ APPL_TRACE_DEBUG("Number of sbc frames %d, frame_len %d", num_sbc_frames, sbc_frame_len);
for(count = 0; count < num_sbc_frames && sbc_frame_len != 0; count ++)
{
@@ -1578,7 +1578,7 @@
(OI_INT16 *)pcmDataPointer,
(OI_UINT32 *)&pcmBytes);
if (!OI_SUCCESS(status)) {
- APPL_TRACE_ERROR1("Decoding failure: %d\n", status);
+ APPL_TRACE_ERROR("Decoding failure: %d\n", status);
break;
}
availPcmBytes -= pcmBytes;
@@ -1602,7 +1602,7 @@
*******************************************************************************/
static void btif_media_task_handle_media(BT_HDR*p_msg)
{
- APPL_TRACE_DEBUG0(" btif_media_task_handle_media ");
+ APPL_TRACE_DEBUG(" btif_media_task_handle_media ");
GKI_freebuf(p_msg);
}
#if (BTA_AV_INCLUDED == TRUE)
@@ -1692,7 +1692,7 @@
BT_HDR *p_buf;
if (NULL == (p_buf = GKI_getbuf(sizeof(BT_HDR))))
{
- APPL_TRACE_EVENT0("GKI failed");
+ APPL_TRACE_EVENT("GKI failed");
return FALSE;
}
@@ -1785,7 +1785,7 @@
static void btif_media_task_aa_rx_flush(void)
{
/* Flush all enqueued GKI SBC buffers (encoded) */
- APPL_TRACE_DEBUG0("btif_media_task_aa_rx_flush");
+ APPL_TRACE_DEBUG("btif_media_task_aa_rx_flush");
btif_media_flush_q(&(btif_media_cb.RxSbcQ));
}
@@ -1805,7 +1805,7 @@
UNUSED(p_msg);
/* Flush all enqueued GKI music buffers (encoded) */
- APPL_TRACE_DEBUG0("btif_media_task_aa_tx_flush");
+ APPL_TRACE_DEBUG("btif_media_task_aa_tx_flush");
btif_media_cb.media_feeding_state.pcm.counter = 0;
btif_media_cb.media_feeding_state.pcm.aa_feed_residue = 0;
@@ -1828,7 +1828,7 @@
{
tBTIF_MEDIA_INIT_AUDIO *pInitAudio = (tBTIF_MEDIA_INIT_AUDIO *) p_msg;
- APPL_TRACE_DEBUG0("btif_media_task_enc_init");
+ APPL_TRACE_DEBUG("btif_media_task_enc_init");
btif_media_cb.timestamp = 0;
@@ -1847,9 +1847,9 @@
< pInitAudio->MtuSize) ? (BTIF_MEDIA_AA_BUF_SIZE - BTIF_MEDIA_AA_SBC_OFFSET
- sizeof(BT_HDR)) : pInitAudio->MtuSize;
- APPL_TRACE_EVENT3("btif_media_task_enc_init busy %d, mtu %d, peer mtu %d",
+ APPL_TRACE_EVENT("btif_media_task_enc_init busy %d, mtu %d, peer mtu %d",
btif_media_cb.busy_level, btif_media_cb.TxAaMtuSize, pInitAudio->MtuSize);
- APPL_TRACE_EVENT6(" ch mode %d, subnd %d, nb blk %d, alloc %d, rate %d, freq %d",
+ APPL_TRACE_EVENT(" ch mode %d, subnd %d, nb blk %d, alloc %d, rate %d, freq %d",
btif_media_cb.encoder.s16ChannelMode, btif_media_cb.encoder.s16NumOfSubBands,
btif_media_cb.encoder.s16NumOfBlocks,
btif_media_cb.encoder.s16AllocationMethod, btif_media_cb.encoder.u16BitRate,
@@ -1857,7 +1857,7 @@
/* Reset entirely the SBC encoder */
SBC_Encoder_Init(&(btif_media_cb.encoder));
- APPL_TRACE_DEBUG1("btif_media_task_enc_init bit pool %d", btif_media_cb.encoder.s16BitPool);
+ APPL_TRACE_DEBUG("btif_media_task_enc_init bit pool %d", btif_media_cb.encoder.s16BitPool);
}
/*******************************************************************************
@@ -1880,7 +1880,7 @@
SINT16 s16FrameLen;
UINT8 protect = 0;
- APPL_TRACE_DEBUG3("btif_media_task_enc_update : minmtu %d, maxbp %d minbp %d",
+ APPL_TRACE_DEBUG("btif_media_task_enc_update : minmtu %d, maxbp %d minbp %d",
pUpdateAudio->MinMtuSize, pUpdateAudio->MaxBitPool, pUpdateAudio->MinBitPool);
/* Only update the bitrate and MTU size while timer is running to make sure it has been initialized */
@@ -1953,12 +1953,12 @@
s16BitPool = 0;
}
- APPL_TRACE_EVENT2("bitpool candidate : %d (%d kbps)",
+ APPL_TRACE_EVENT("bitpool candidate : %d (%d kbps)",
s16BitPool, pstrEncParams->u16BitRate);
if (s16BitPool > pUpdateAudio->MaxBitPool)
{
- APPL_TRACE_DEBUG1("btif_media_task_enc_update computed bitpool too large (%d)",
+ APPL_TRACE_DEBUG("btif_media_task_enc_update computed bitpool too large (%d)",
s16BitPool);
/* Decrease bitrate */
btif_media_cb.encoder.u16BitRate -= BTIF_MEDIA_BITRATE_STEP;
@@ -1967,7 +1967,7 @@
}
else if (s16BitPool < pUpdateAudio->MinBitPool)
{
- APPL_TRACE_WARNING1("btif_media_task_enc_update computed bitpool too small (%d)", s16BitPool);
+ APPL_TRACE_WARNING("btif_media_task_enc_update computed bitpool too small (%d)", s16BitPool);
/* Increase bitrate */
btif_media_cb.encoder.u16BitRate += BTIF_MEDIA_BITRATE_STEP;
/* Record that we have increased the bitrate */
@@ -1980,7 +1980,7 @@
/* In case we have already increased and decreased the bitrate, just stop */
if (protect == 3)
{
- APPL_TRACE_ERROR0("btif_media_task_enc_update could not find bitpool in range");
+ APPL_TRACE_ERROR("btif_media_task_enc_update could not find bitpool in range");
break;
}
} while (1);
@@ -1988,7 +1988,7 @@
/* Finally update the bitpool in the encoder structure */
pstrEncParams->s16BitPool = s16BitPool;
- APPL_TRACE_DEBUG2("btif_media_task_enc_update final bit rate %d, final bit pool %d",
+ APPL_TRACE_DEBUG("btif_media_task_enc_update final bit rate %d, final bit pool %d",
btif_media_cb.encoder.u16BitRate, btif_media_cb.encoder.s16BitPool);
/* make sure we reinitialize encoder with new settings */
@@ -2009,10 +2009,10 @@
{
BOOLEAN reconfig_needed = FALSE;
- APPL_TRACE_DEBUG0("PCM feeding:");
- APPL_TRACE_DEBUG1("sampling_freq:%d", p_feeding->feeding.cfg.pcm.sampling_freq);
- APPL_TRACE_DEBUG1("num_channel:%d", p_feeding->feeding.cfg.pcm.num_channel);
- APPL_TRACE_DEBUG1("bit_per_sample:%d", p_feeding->feeding.cfg.pcm.bit_per_sample);
+ APPL_TRACE_DEBUG("PCM feeding:");
+ APPL_TRACE_DEBUG("sampling_freq:%d", p_feeding->feeding.cfg.pcm.sampling_freq);
+ APPL_TRACE_DEBUG("num_channel:%d", p_feeding->feeding.cfg.pcm.num_channel);
+ APPL_TRACE_DEBUG("bit_per_sample:%d", p_feeding->feeding.cfg.pcm.bit_per_sample);
/* Check the PCM feeding sampling_freq */
switch (p_feeding->feeding.cfg.pcm.sampling_freq)
@@ -2027,7 +2027,7 @@
if (btif_media_cb.encoder.s16SamplingFreq != SBC_sf48000)
{
/* Reconfiguration needed at 48000 */
- APPL_TRACE_DEBUG0("SBC Reconfiguration needed at 48000");
+ APPL_TRACE_DEBUG("SBC Reconfiguration needed at 48000");
btif_media_cb.encoder.s16SamplingFreq = SBC_sf48000;
reconfig_needed = TRUE;
}
@@ -2040,28 +2040,28 @@
if (btif_media_cb.encoder.s16SamplingFreq != SBC_sf44100)
{
/* Reconfiguration needed at 44100 */
- APPL_TRACE_DEBUG0("SBC Reconfiguration needed at 44100");
+ APPL_TRACE_DEBUG("SBC Reconfiguration needed at 44100");
btif_media_cb.encoder.s16SamplingFreq = SBC_sf44100;
reconfig_needed = TRUE;
}
break;
default:
- APPL_TRACE_DEBUG0("Feeding PCM sampling_freq unsupported");
+ APPL_TRACE_DEBUG("Feeding PCM sampling_freq unsupported");
break;
}
/* Some AV Headsets do not support Mono => always ask for Stereo */
if (btif_media_cb.encoder.s16ChannelMode == SBC_MONO)
{
- APPL_TRACE_DEBUG0("SBC Reconfiguration needed in Stereo");
+ APPL_TRACE_DEBUG("SBC Reconfiguration needed in Stereo");
btif_media_cb.encoder.s16ChannelMode = SBC_JOINT_STEREO;
reconfig_needed = TRUE;
}
if (reconfig_needed != FALSE)
{
- APPL_TRACE_DEBUG1("btif_media_task_pcm2sbc_init :: mtu %d", btif_media_cb.TxAaMtuSize);
- APPL_TRACE_DEBUG6("ch mode %d, nbsubd %d, nb %d, alloc %d, rate %d, freq %d",
+ APPL_TRACE_DEBUG("btif_media_task_pcm2sbc_init :: mtu %d", btif_media_cb.TxAaMtuSize);
+ APPL_TRACE_DEBUG("ch mode %d, nbsubd %d, nb %d, alloc %d, rate %d, freq %d",
btif_media_cb.encoder.s16ChannelMode,
btif_media_cb.encoder.s16NumOfSubBands, btif_media_cb.encoder.s16NumOfBlocks,
btif_media_cb.encoder.s16AllocationMethod, btif_media_cb.encoder.u16BitRate,
@@ -2071,7 +2071,7 @@
}
else
{
- APPL_TRACE_DEBUG0("btif_media_task_pcm2sbc_init no SBC reconfig needed");
+ APPL_TRACE_DEBUG("btif_media_task_pcm2sbc_init no SBC reconfig needed");
}
}
@@ -2089,7 +2089,7 @@
{
tBTIF_MEDIA_INIT_AUDIO_FEEDING *p_feeding = (tBTIF_MEDIA_INIT_AUDIO_FEEDING *) p_msg;
- APPL_TRACE_DEBUG1("btif_media_task_audio_feeding_init format:%d", p_feeding->feeding.format);
+ APPL_TRACE_DEBUG("btif_media_task_audio_feeding_init format:%d", p_feeding->feeding.format);
/* Save Media Feeding information */
btif_media_cb.feeding_mode = p_feeding->feeding_mode;
@@ -2104,7 +2104,7 @@
break;
default :
- APPL_TRACE_ERROR1("unknown feeding format %d", p_feeding->feeding.format);
+ APPL_TRACE_ERROR("unknown feeding format %d", p_feeding->feeding.format);
break;
}
}
@@ -2183,7 +2183,7 @@
static void btif_media_task_aa_handle_clear_track (void)
{
- APPL_TRACE_DEBUG0("btif_media_task_aa_handle_clear_track");
+ APPL_TRACE_DEBUG("btif_media_task_aa_handle_clear_track");
}
/*******************************************************************************
@@ -2205,14 +2205,14 @@
UINT32 num_blocks = 16;
UINT32 num_subbands = 8;
- APPL_TRACE_DEBUG6("btif_media_task_aa_handle_decoder_reset p_codec_info[%x:%x:%x:%x:%x:%x]",
+ APPL_TRACE_DEBUG("btif_media_task_aa_handle_decoder_reset p_codec_info[%x:%x:%x:%x:%x:%x]",
p_buf->codec_info[1], p_buf->codec_info[2], p_buf->codec_info[3],
p_buf->codec_info[4], p_buf->codec_info[5], p_buf->codec_info[6]);
a2d_status = A2D_ParsSbcInfo(&sbc_cie, p_buf->codec_info, FALSE);
if (a2d_status != A2D_SUCCESS)
{
- APPL_TRACE_ERROR1("ERROR dump_codec_info A2D_ParsSbcInfo fail:%d", a2d_status);
+ APPL_TRACE_ERROR("ERROR dump_codec_info A2D_ParsSbcInfo fail:%d", a2d_status);
return;
}
@@ -2220,10 +2220,10 @@
btif_media_cb.channel_count = btif_a2dp_get_track_channel_count(sbc_cie.ch_mode);
btif_media_cb.rx_flush = FALSE;
- APPL_TRACE_DEBUG0("Reset to sink role");
+ APPL_TRACE_DEBUG("Reset to sink role");
status = OI_CODEC_SBC_DecoderReset(&context, contextData, sizeof(contextData), 2, 2, FALSE);
if (!OI_SUCCESS(status)) {
- APPL_TRACE_ERROR1("OI_CODEC_SBC_DecoderReset failed with error code %d\n", status);
+ APPL_TRACE_ERROR("OI_CODEC_SBC_DecoderReset failed with error code %d\n", status);
}
UIPC_Open(UIPC_CH_ID_AV_AUDIO, btif_a2dp_data_cb);
@@ -2231,100 +2231,100 @@
switch(sbc_cie.samp_freq)
{
case A2D_SBC_IE_SAMP_FREQ_16:
- APPL_TRACE_DEBUG1("\tsamp_freq:%d (16000)", sbc_cie.samp_freq);
+ APPL_TRACE_DEBUG("\tsamp_freq:%d (16000)", sbc_cie.samp_freq);
freq_multiple = 16*20;
break;
case A2D_SBC_IE_SAMP_FREQ_32:
- APPL_TRACE_DEBUG1("\tsamp_freq:%d (32000)", sbc_cie.samp_freq);
+ APPL_TRACE_DEBUG("\tsamp_freq:%d (32000)", sbc_cie.samp_freq);
freq_multiple = 32*20;
break;
case A2D_SBC_IE_SAMP_FREQ_44:
- APPL_TRACE_DEBUG1("\tsamp_freq:%d (44100)", sbc_cie.samp_freq);
+ APPL_TRACE_DEBUG("\tsamp_freq:%d (44100)", sbc_cie.samp_freq);
freq_multiple = 441*2;
break;
case A2D_SBC_IE_SAMP_FREQ_48:
- APPL_TRACE_DEBUG1("\tsamp_freq:%d (48000)", sbc_cie.samp_freq);
+ APPL_TRACE_DEBUG("\tsamp_freq:%d (48000)", sbc_cie.samp_freq);
freq_multiple = 48*20;
break;
default:
- APPL_TRACE_DEBUG0(" Unknown Frequency ");
+ APPL_TRACE_DEBUG(" Unknown Frequency ");
break;
}
switch(sbc_cie.ch_mode)
{
case A2D_SBC_IE_CH_MD_MONO:
- APPL_TRACE_DEBUG1("\tch_mode:%d (Mono)", sbc_cie.ch_mode);
+ APPL_TRACE_DEBUG("\tch_mode:%d (Mono)", sbc_cie.ch_mode);
break;
case A2D_SBC_IE_CH_MD_DUAL:
- APPL_TRACE_DEBUG1("\tch_mode:%d (DUAL)", sbc_cie.ch_mode);
+ APPL_TRACE_DEBUG("\tch_mode:%d (DUAL)", sbc_cie.ch_mode);
break;
case A2D_SBC_IE_CH_MD_STEREO:
- APPL_TRACE_DEBUG1("\tch_mode:%d (STEREO)", sbc_cie.ch_mode);
+ APPL_TRACE_DEBUG("\tch_mode:%d (STEREO)", sbc_cie.ch_mode);
break;
case A2D_SBC_IE_CH_MD_JOINT:
- APPL_TRACE_DEBUG1("\tch_mode:%d (JOINT)", sbc_cie.ch_mode);
+ APPL_TRACE_DEBUG("\tch_mode:%d (JOINT)", sbc_cie.ch_mode);
break;
default:
- APPL_TRACE_DEBUG0(" Unknown Mode ");
+ APPL_TRACE_DEBUG(" Unknown Mode ");
break;
}
switch(sbc_cie.block_len)
{
case A2D_SBC_IE_BLOCKS_4:
- APPL_TRACE_DEBUG1("\tblock_len:%d (4)", sbc_cie.block_len);
+ APPL_TRACE_DEBUG("\tblock_len:%d (4)", sbc_cie.block_len);
num_blocks = 4;
break;
case A2D_SBC_IE_BLOCKS_8:
- APPL_TRACE_DEBUG1("\tblock_len:%d (8)", sbc_cie.block_len);
+ APPL_TRACE_DEBUG("\tblock_len:%d (8)", sbc_cie.block_len);
num_blocks = 8;
break;
case A2D_SBC_IE_BLOCKS_12:
- APPL_TRACE_DEBUG1("\tblock_len:%d (12)", sbc_cie.block_len);
+ APPL_TRACE_DEBUG("\tblock_len:%d (12)", sbc_cie.block_len);
num_blocks = 12;
break;
case A2D_SBC_IE_BLOCKS_16:
- APPL_TRACE_DEBUG1("\tblock_len:%d (16)", sbc_cie.block_len);
+ APPL_TRACE_DEBUG("\tblock_len:%d (16)", sbc_cie.block_len);
num_blocks = 16;
break;
default:
- APPL_TRACE_DEBUG0(" Unknown BlockLen ");
+ APPL_TRACE_DEBUG(" Unknown BlockLen ");
break;
}
switch(sbc_cie.num_subbands)
{
case A2D_SBC_IE_SUBBAND_4:
- APPL_TRACE_DEBUG1("\tnum_subbands:%d (4)", sbc_cie.num_subbands);
+ APPL_TRACE_DEBUG("\tnum_subbands:%d (4)", sbc_cie.num_subbands);
num_subbands = 4;
break;
case A2D_SBC_IE_SUBBAND_8:
- APPL_TRACE_DEBUG1("\tnum_subbands:%d (8)", sbc_cie.num_subbands);
+ APPL_TRACE_DEBUG("\tnum_subbands:%d (8)", sbc_cie.num_subbands);
num_subbands = 8;
break;
default:
- APPL_TRACE_DEBUG0(" Unknown SubBands ");
+ APPL_TRACE_DEBUG(" Unknown SubBands ");
break;
}
switch(sbc_cie.alloc_mthd)
{
case A2D_SBC_IE_ALLOC_MD_S:
- APPL_TRACE_DEBUG1("\talloc_mthd:%d (SNR)", sbc_cie.alloc_mthd);
+ APPL_TRACE_DEBUG("\talloc_mthd:%d (SNR)", sbc_cie.alloc_mthd);
break;
case A2D_SBC_IE_ALLOC_MD_L:
- APPL_TRACE_DEBUG1("\talloc_mthd:%d (Loudness)", sbc_cie.alloc_mthd);
+ APPL_TRACE_DEBUG("\talloc_mthd:%d (Loudness)", sbc_cie.alloc_mthd);
break;
default:
- APPL_TRACE_DEBUG0(" Unknown Allocation Method");
+ APPL_TRACE_DEBUG(" Unknown Allocation Method");
break;
}
- APPL_TRACE_DEBUG2("\tBit pool Min:%d Max:%d", sbc_cie.min_bitpool, sbc_cie.max_bitpool);
+ APPL_TRACE_DEBUG("\tBit pool Min:%d Max:%d", sbc_cie.min_bitpool, sbc_cie.max_bitpool);
btif_media_cb.frames_to_process = ((freq_multiple)/(num_blocks*num_subbands)) + 1;
- APPL_TRACE_DEBUG1(" Frames to be processed in 20 ms %d",btif_media_cb.frames_to_process);
+ APPL_TRACE_DEBUG(" Frames to be processed in 20 ms %d",btif_media_cb.frames_to_process);
}
#endif
@@ -2339,7 +2339,7 @@
*******************************************************************************/
static void btif_media_task_feeding_state_reset(void)
{
- APPL_TRACE_WARNING3("overflow %d, enter %d, exit %d",
+ APPL_TRACE_WARNING("overflow %d, enter %d, exit %d",
btif_media_cb.media_feeding_state.pcm.overflow_count,
btif_media_cb.media_feeding_state.pcm.max_counter_enter,
btif_media_cb.media_feeding_state.pcm.max_counter_exit);
@@ -2355,7 +2355,7 @@
btif_media_cb.media_feeding.cfg.pcm.num_channel *
BTIF_MEDIA_TIME_TICK)/1000;
- APPL_TRACE_WARNING1("pcm bytes per tick %d",
+ APPL_TRACE_WARNING("pcm bytes per tick %d",
(int)btif_media_cb.media_feeding_state.pcm.bytes_per_tick);
}
}
@@ -2370,7 +2370,7 @@
*******************************************************************************/
static void btif_media_task_aa_start_tx(void)
{
- APPL_TRACE_DEBUG2("btif_media_task_aa_start_tx is timer %d, feeding mode %d",
+ APPL_TRACE_DEBUG("btif_media_task_aa_start_tx is timer %d, feeding mode %d",
btif_media_cb.is_tx_timer, btif_media_cb.feeding_mode);
/* Use a timer to poll the UIPC, get rid of the UIPC call back */
@@ -2381,7 +2381,7 @@
/* Reset the media feeding state */
btif_media_task_feeding_state_reset();
- APPL_TRACE_EVENT2("starting timer %d ticks (%d)",
+ APPL_TRACE_EVENT("starting timer %d ticks (%d)",
GKI_MS_TO_TICKS(BTIF_MEDIA_TIME_TICK), TICKS_PER_SEC);
GKI_start_timer(BTIF_MEDIA_AA_TASK_TIMER_ID, GKI_MS_TO_TICKS(BTIF_MEDIA_TIME_TICK), TRUE);
@@ -2398,7 +2398,7 @@
*******************************************************************************/
static void btif_media_task_aa_stop_tx(void)
{
- APPL_TRACE_DEBUG1("btif_media_task_aa_stop_tx is timer: %d", btif_media_cb.is_tx_timer);
+ APPL_TRACE_DEBUG("btif_media_task_aa_stop_tx is timer: %d", btif_media_cb.is_tx_timer);
/* Stop the timer first */
GKI_stop_timer(BTIF_MEDIA_AA_TASK_TIMER_ID);
@@ -2460,14 +2460,14 @@
break;
default:
- APPL_TRACE_ERROR1("ERROR btif_get_num_aa_frame Unsupported transcoding format 0x%x",
+ APPL_TRACE_ERROR("ERROR btif_get_num_aa_frame Unsupported transcoding format 0x%x",
btif_media_cb.TxTranscoding);
result = 0;
break;
}
#if (defined(DEBUG_MEDIA_AV_FLOW) && (DEBUG_MEDIA_AV_FLOW == TRUE))
- APPL_TRACE_DEBUG1("btif_get_num_aa_frame returns %d", result);
+ APPL_TRACE_DEBUG("btif_get_num_aa_frame returns %d", result);
#endif
return (UINT8)result;
@@ -2493,25 +2493,25 @@
GKI_freebuf(GKI_dequeue(&(btif_media_cb.RxSbcQ)));
}
- BTIF_TRACE_VERBOSE0("btif_media_sink_enque_buf + ");
+ BTIF_TRACE_VERBOSE("btif_media_sink_enque_buf + ");
/* allocate and Queue this buffer */
if ((p_msg = (tBT_SBC_HDR *) GKI_getbuf(sizeof(tBT_SBC_HDR) +
p_pkt->offset+ p_pkt->len)) != NULL)
{
memcpy(p_msg, p_pkt, (sizeof(BT_HDR) + p_pkt->offset + p_pkt->len));
p_msg->num_frames_to_be_processed = (*((UINT8*)(p_msg + 1) + p_msg->offset)) & 0x0f;
- BTIF_TRACE_VERBOSE1("btif_media_sink_enque_buf + ", p_msg->num_frames_to_be_processed);
+ BTIF_TRACE_VERBOSE("btif_media_sink_enque_buf + ", p_msg->num_frames_to_be_processed);
GKI_enqueue(&(btif_media_cb.RxSbcQ), p_msg);
if(btif_media_cb.RxSbcQ.count == MAX_A2DP_DELAYED_START_FRAME_COUNT)
{
- BTIF_TRACE_DEBUG0(" Initiate Decoding ");
+ BTIF_TRACE_DEBUG(" Initiate Decoding ");
btif_media_task_start_decoding_req();
}
}
else
{
/* let caller deal with a failed allocation */
- BTIF_TRACE_VERBOSE0("btif_media_sink_enque_buf No Buffer left - ");
+ BTIF_TRACE_VERBOSE("btif_media_sink_enque_buf No Buffer left - ");
}
return btif_media_cb.RxSbcQ.count;
}
@@ -2588,7 +2588,7 @@
btif_media_cb.media_feeding_state.pcm.aa_feed_residue = 0;
return TRUE;
} else {
- APPL_TRACE_WARNING2("### UNDERFLOW :: ONLY READ %d BYTES OUT OF %d ###",
+ APPL_TRACE_WARNING("### UNDERFLOW :: ONLY READ %d BYTES OUT OF %d ###",
nb_byte_read, read_size);
btif_media_cb.media_feeding_state.pcm.aa_feed_residue += nb_byte_read;
return FALSE;
@@ -2647,7 +2647,7 @@
if (nb_byte_read < read_size)
{
- APPL_TRACE_WARNING2("### UNDERRUN :: ONLY READ %d BYTES OUT OF %d ###",
+ APPL_TRACE_WARNING("### UNDERRUN :: ONLY READ %d BYTES OUT OF %d ###",
nb_byte_read, read_size);
if (nb_byte_read == 0)
@@ -2675,7 +2675,7 @@
&src_size_used);
#if (defined(DEBUG_MEDIA_AV_FLOW) && (DEBUG_MEDIA_AV_FLOW == TRUE))
- APPL_TRACE_DEBUG3("btif_media_aa_read_feeding readsz:%d src_size_used:%d dst_size_used:%d",
+ APPL_TRACE_DEBUG("btif_media_aa_read_feeding readsz:%d src_size_used:%d dst_size_used:%d",
read_size, src_size_used, dst_size_used);
#endif
@@ -2702,7 +2702,7 @@
}
#if (defined(DEBUG_MEDIA_AV_FLOW) && (DEBUG_MEDIA_AV_FLOW == TRUE))
- APPL_TRACE_DEBUG3("btif_media_aa_read_feeding residue:%d, dst_size_used %d, bytes_needed %d",
+ APPL_TRACE_DEBUG("btif_media_aa_read_feeding residue:%d, dst_size_used %d, bytes_needed %d",
btif_media_cb.media_feeding_state.pcm.aa_feed_residue, dst_size_used, bytes_needed);
#endif
@@ -2725,14 +2725,14 @@
btif_media_cb.encoder.s16NumOfBlocks;
#if (defined(DEBUG_MEDIA_AV_FLOW) && (DEBUG_MEDIA_AV_FLOW == TRUE))
- APPL_TRACE_DEBUG2("btif_media_aa_prep_sbc_2_send nb_frame %d, TxAaQ %d",
+ APPL_TRACE_DEBUG("btif_media_aa_prep_sbc_2_send nb_frame %d, TxAaQ %d",
nb_frame, btif_media_cb.TxAaQ.count);
#endif
while (nb_frame)
{
if (NULL == (p_buf = GKI_getpoolbuf(BTIF_MEDIA_AA_POOL_ID)))
{
- APPL_TRACE_ERROR1 ("ERROR btif_media_aa_prep_sbc_2_send no buffer TxCnt %d ",
+ APPL_TRACE_ERROR ("ERROR btif_media_aa_prep_sbc_2_send no buffer TxCnt %d ",
btif_media_cb.TxAaQ.count);
return;
}
@@ -2764,7 +2764,7 @@
}
else
{
- APPL_TRACE_WARNING2("btif_media_aa_prep_sbc_2_send underflow %d, %d",
+ APPL_TRACE_WARNING("btif_media_aa_prep_sbc_2_send underflow %d, %d",
nb_frame, btif_media_cb.media_feeding_state.pcm.aa_feed_residue);
btif_media_cb.media_feeding_state.pcm.counter += nb_frame *
btif_media_cb.encoder.s16NumOfSubBands *
@@ -2797,7 +2797,7 @@
if (btif_media_cb.tx_flush)
{
- APPL_TRACE_DEBUG0("### tx suspended, discarded frame ###");
+ APPL_TRACE_DEBUG("### tx suspended, discarded frame ###");
if (btif_media_cb.TxAaQ.count > 0)
btif_media_flush_q(&(btif_media_cb.TxAaQ));
@@ -2833,7 +2833,7 @@
if (btif_media_cb.media_feeding_state.pcm.counter > reset_rate_bytes) {
btif_media_cb.media_feeding_state.pcm.counter = 0;
- APPL_TRACE_WARNING0("btif_media_aa_prep_sbc_2_send:reset rate counter");
+ APPL_TRACE_WARNING("btif_media_aa_prep_sbc_2_send:reset rate counter");
}
/* no more pcm to read */
@@ -2866,7 +2866,7 @@
default:
- APPL_TRACE_ERROR1("ERROR btif_media_aa_prep_2_send unsupported transcoding format 0x%x",btif_media_cb.TxTranscoding);
+ APPL_TRACE_ERROR("ERROR btif_media_aa_prep_2_send unsupported transcoding format 0x%x",btif_media_cb.TxTranscoding);
break;
}
}
@@ -2916,60 +2916,60 @@
a2d_status = A2D_ParsSbcInfo(&sbc_cie, p_codec, FALSE);
if (a2d_status != A2D_SUCCESS)
{
- APPL_TRACE_ERROR1("ERROR dump_codec_info A2D_ParsSbcInfo fail:%d", a2d_status);
+ APPL_TRACE_ERROR("ERROR dump_codec_info A2D_ParsSbcInfo fail:%d", a2d_status);
return;
}
- APPL_TRACE_DEBUG0("dump_codec_info");
+ APPL_TRACE_DEBUG("dump_codec_info");
if (sbc_cie.samp_freq == A2D_SBC_IE_SAMP_FREQ_16)
- { APPL_TRACE_DEBUG1("\tsamp_freq:%d (16000)", sbc_cie.samp_freq);}
+ { APPL_TRACE_DEBUG("\tsamp_freq:%d (16000)", sbc_cie.samp_freq);}
else if (sbc_cie.samp_freq == A2D_SBC_IE_SAMP_FREQ_32)
- { APPL_TRACE_DEBUG1("\tsamp_freq:%d (32000)", sbc_cie.samp_freq);}
+ { APPL_TRACE_DEBUG("\tsamp_freq:%d (32000)", sbc_cie.samp_freq);}
else if (sbc_cie.samp_freq == A2D_SBC_IE_SAMP_FREQ_44)
- { APPL_TRACE_DEBUG1("\tsamp_freq:%d (44.100)", sbc_cie.samp_freq);}
+ { APPL_TRACE_DEBUG("\tsamp_freq:%d (44.100)", sbc_cie.samp_freq);}
else if (sbc_cie.samp_freq == A2D_SBC_IE_SAMP_FREQ_48)
- { APPL_TRACE_DEBUG1("\tsamp_freq:%d (48000)", sbc_cie.samp_freq);}
+ { APPL_TRACE_DEBUG("\tsamp_freq:%d (48000)", sbc_cie.samp_freq);}
else
- { APPL_TRACE_DEBUG1("\tBAD samp_freq:%d", sbc_cie.samp_freq);}
+ { APPL_TRACE_DEBUG("\tBAD samp_freq:%d", sbc_cie.samp_freq);}
if (sbc_cie.ch_mode == A2D_SBC_IE_CH_MD_MONO)
- { APPL_TRACE_DEBUG1("\tch_mode:%d (Mono)", sbc_cie.ch_mode);}
+ { APPL_TRACE_DEBUG("\tch_mode:%d (Mono)", sbc_cie.ch_mode);}
else if (sbc_cie.ch_mode == A2D_SBC_IE_CH_MD_DUAL)
- { APPL_TRACE_DEBUG1("\tch_mode:%d (Dual)", sbc_cie.ch_mode);}
+ { APPL_TRACE_DEBUG("\tch_mode:%d (Dual)", sbc_cie.ch_mode);}
else if (sbc_cie.ch_mode == A2D_SBC_IE_CH_MD_STEREO)
- { APPL_TRACE_DEBUG1("\tch_mode:%d (Stereo)", sbc_cie.ch_mode);}
+ { APPL_TRACE_DEBUG("\tch_mode:%d (Stereo)", sbc_cie.ch_mode);}
else if (sbc_cie.ch_mode == A2D_SBC_IE_CH_MD_JOINT)
- { APPL_TRACE_DEBUG1("\tch_mode:%d (Joint)", sbc_cie.ch_mode);}
+ { APPL_TRACE_DEBUG("\tch_mode:%d (Joint)", sbc_cie.ch_mode);}
else
- { APPL_TRACE_DEBUG1("\tBAD ch_mode:%d", sbc_cie.ch_mode);}
+ { APPL_TRACE_DEBUG("\tBAD ch_mode:%d", sbc_cie.ch_mode);}
if (sbc_cie.block_len == A2D_SBC_IE_BLOCKS_4)
- { APPL_TRACE_DEBUG1("\tblock_len:%d (4)", sbc_cie.block_len);}
+ { APPL_TRACE_DEBUG("\tblock_len:%d (4)", sbc_cie.block_len);}
else if (sbc_cie.block_len == A2D_SBC_IE_BLOCKS_8)
- { APPL_TRACE_DEBUG1("\tblock_len:%d (8)", sbc_cie.block_len);}
+ { APPL_TRACE_DEBUG("\tblock_len:%d (8)", sbc_cie.block_len);}
else if (sbc_cie.block_len == A2D_SBC_IE_BLOCKS_12)
- { APPL_TRACE_DEBUG1("\tblock_len:%d (12)", sbc_cie.block_len);}
+ { APPL_TRACE_DEBUG("\tblock_len:%d (12)", sbc_cie.block_len);}
else if (sbc_cie.block_len == A2D_SBC_IE_BLOCKS_16)
- { APPL_TRACE_DEBUG1("\tblock_len:%d (16)", sbc_cie.block_len);}
+ { APPL_TRACE_DEBUG("\tblock_len:%d (16)", sbc_cie.block_len);}
else
- { APPL_TRACE_DEBUG1("\tBAD block_len:%d", sbc_cie.block_len);}
+ { APPL_TRACE_DEBUG("\tBAD block_len:%d", sbc_cie.block_len);}
if (sbc_cie.num_subbands == A2D_SBC_IE_SUBBAND_4)
- { APPL_TRACE_DEBUG1("\tnum_subbands:%d (4)", sbc_cie.num_subbands);}
+ { APPL_TRACE_DEBUG("\tnum_subbands:%d (4)", sbc_cie.num_subbands);}
else if (sbc_cie.num_subbands == A2D_SBC_IE_SUBBAND_8)
- { APPL_TRACE_DEBUG1("\tnum_subbands:%d (8)", sbc_cie.num_subbands);}
+ { APPL_TRACE_DEBUG("\tnum_subbands:%d (8)", sbc_cie.num_subbands);}
else
- { APPL_TRACE_DEBUG1("\tBAD num_subbands:%d", sbc_cie.num_subbands);}
+ { APPL_TRACE_DEBUG("\tBAD num_subbands:%d", sbc_cie.num_subbands);}
if (sbc_cie.alloc_mthd == A2D_SBC_IE_ALLOC_MD_S)
- { APPL_TRACE_DEBUG1("\talloc_mthd:%d (SNR)", sbc_cie.alloc_mthd);}
+ { APPL_TRACE_DEBUG("\talloc_mthd:%d (SNR)", sbc_cie.alloc_mthd);}
else if (sbc_cie.alloc_mthd == A2D_SBC_IE_ALLOC_MD_L)
- { APPL_TRACE_DEBUG1("\talloc_mthd:%d (Loundess)", sbc_cie.alloc_mthd);}
+ { APPL_TRACE_DEBUG("\talloc_mthd:%d (Loundess)", sbc_cie.alloc_mthd);}
else
- { APPL_TRACE_DEBUG1("\tBAD alloc_mthd:%d", sbc_cie.alloc_mthd);}
+ { APPL_TRACE_DEBUG("\tBAD alloc_mthd:%d", sbc_cie.alloc_mthd);}
- APPL_TRACE_DEBUG2("\tBit pool Min:%d Max:%d", sbc_cie.min_bitpool, sbc_cie.max_bitpool);
+ APPL_TRACE_DEBUG("\tBit pool Min:%d Max:%d", sbc_cie.min_bitpool, sbc_cie.max_bitpool);
}
diff --git a/btif/src/btif_pan.c b/btif/src/btif_pan.c
index 7cb2d1c..cc3799e 100644
--- a/btif/src/btif_pan.c
+++ b/btif/src/btif_pan.c
@@ -75,7 +75,7 @@
#define BTPAN_LOCAL_ROLE (BTPAN_ROLE_PANU | BTPAN_ROLE_PANNAP)
#endif
-#define asrt(s) if(!(s)) BTIF_TRACE_ERROR3("btif_pan: ## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define asrt(s) if(!(s)) BTIF_TRACE_ERROR("btif_pan: ## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
@@ -121,11 +121,11 @@
*******************************************************************************/
void btif_pan_init()
{
- BTIF_TRACE_DEBUG2("jni_initialized = %d, btpan_cb.enabled:%d", jni_initialized, btpan_cb.enabled);
+ BTIF_TRACE_DEBUG("jni_initialized = %d, btpan_cb.enabled:%d", jni_initialized, btpan_cb.enabled);
stack_initialized = TRUE;
if (jni_initialized && !btpan_cb.enabled)
{
- BTIF_TRACE_DEBUG0("Enabling PAN....");
+ BTIF_TRACE_DEBUG("Enabling PAN....");
memset(&btpan_cb, 0, sizeof(btpan_cb));
btpan_cb.tap_fd = -1;
btpan_cb.flow = 1;
@@ -168,7 +168,7 @@
static btpan_callbacks_t callback;
static bt_status_t btpan_jni_init(const btpan_callbacks_t* callbacks)
{
- BTIF_TRACE_DEBUG2("stack_initialized = %d, btpan_cb.enabled:%d", stack_initialized, btpan_cb.enabled);
+ BTIF_TRACE_DEBUG("stack_initialized = %d, btpan_cb.enabled:%d", stack_initialized, btpan_cb.enabled);
jni_initialized = TRUE;
if(stack_initialized && !btpan_cb.enabled)
btif_pan_init();
@@ -185,7 +185,7 @@
static inline int bta_role_to_btpan(int bta_pan_role)
{
int btpan_role = 0;
- BTIF_TRACE_DEBUG1("bta_pan_role:0x%x", bta_pan_role);
+ BTIF_TRACE_DEBUG("bta_pan_role:0x%x", bta_pan_role);
if(bta_pan_role & PAN_ROLE_NAP_SERVER)
{
btpan_role |= BTPAN_ROLE_PANNAP;
@@ -200,7 +200,7 @@
static inline int btpan_role_to_bta(int btpan_role)
{
int bta_pan_role = PAN_ROLE_INACTIVE;
- BTIF_TRACE_DEBUG1("btpan_role:0x%x", btpan_role);
+ BTIF_TRACE_DEBUG("btpan_role:0x%x", btpan_role);
if(btpan_role & BTPAN_ROLE_PANNAP)
{
bta_pan_role |= PAN_ROLE_NAP_SERVER;
@@ -219,7 +219,7 @@
static bt_status_t btpan_enable(int local_role)
{
int bta_pan_role;
- BTIF_TRACE_DEBUG1("local_role:%d", local_role);
+ BTIF_TRACE_DEBUG("local_role:%d", local_role);
bta_pan_role = btpan_role_to_bta(local_role);
BTA_PanSetRole(bta_pan_role, &bta_panu_info, NULL, &bta_pan_nap_info);
btpan_dev_local_role = local_role;
@@ -228,13 +228,13 @@
static int btpan_get_local_role()
{
- BTIF_TRACE_DEBUG1("btpan_dev_local_role:%d", btpan_dev_local_role);
+ BTIF_TRACE_DEBUG("btpan_dev_local_role:%d", btpan_dev_local_role);
return btpan_dev_local_role;
}
static bt_status_t btpan_connect(const bt_bdaddr_t *bd_addr, int local_role, int remote_role)
{
- BTIF_TRACE_DEBUG2("local_role:%d, remote_role:%d", local_role, remote_role);
+ BTIF_TRACE_DEBUG("local_role:%d, remote_role:%d", local_role, remote_role);
int bta_local_role = btpan_role_to_bta(local_role);
int bta_remote_role = btpan_role_to_bta(remote_role);
btpan_new_conn(-1, bd_addr->address, bta_local_role, bta_remote_role);
@@ -244,7 +244,7 @@
static void btif_in_pan_generic_evt(UINT16 event, char *p_param)
{
- BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event);
+ BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
switch (event) {
case BTIF_PAN_CB_DISCONNECTING:
{
@@ -262,7 +262,7 @@
} break;
default:
{
- BTIF_TRACE_WARNING2("%s : Unknown event 0x%x", __FUNCTION__, event);
+ BTIF_TRACE_WARNING("%s : Unknown event 0x%x", __FUNCTION__, event);
}
break;
}
@@ -313,7 +313,7 @@
err = ioctl(sk, SIOCGIFHWADDR, &ifr);
if(err < 0)
{
- BTIF_TRACE_ERROR2("Could not get network hardware for interface:%s, errno:%s", devname, strerror(errno));
+ BTIF_TRACE_ERROR("Could not get network hardware for interface:%s, errno:%s", devname, strerror(errno));
close(sk);
return -1;
}
@@ -329,7 +329,7 @@
err = ioctl(sk, SIOCSIFHWADDR, (caddr_t)&ifr);
if (err < 0) {
- BTIF_TRACE_ERROR2("Could not set bt address for interface:%s, errno:%s", devname, strerror(errno));
+ BTIF_TRACE_ERROR("Could not set bt address for interface:%s, errno:%s", devname, strerror(errno));
close(sk);
return -1;
}
@@ -345,12 +345,12 @@
if (err < 0) {
- BTIF_TRACE_ERROR2("Could not bring up network interface:%s, errno:%d", devname, errno);
+ BTIF_TRACE_ERROR("Could not bring up network interface:%s, errno:%d", devname, errno);
close(sk);
return -1;
}
close(sk);
- BTIF_TRACE_DEBUG1("network interface: %s is up", devname);
+ BTIF_TRACE_DEBUG("network interface: %s is up", devname);
return 0;
}
@@ -395,7 +395,7 @@
//system("insmod /system/lib/modules/tun.ko");
if( (fd = open(clonedev, O_RDWR)) < 0 ) {
- BTIF_TRACE_DEBUG2("could not open %s, err:%d", clonedev, errno);
+ BTIF_TRACE_DEBUG("could not open %s, err:%d", clonedev, errno);
return fd;
}
@@ -407,7 +407,7 @@
/* try to create the device */
if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 )//|| tap_setup_ip(TAP_IF_NAME) == FALSE)
{
- BTIF_TRACE_DEBUG2("ioctl error:%d, errno:%s", err, strerror(errno));
+ BTIF_TRACE_DEBUG("ioctl error:%d, errno:%s", err, strerror(errno));
close(fd);
return err;
}
@@ -416,7 +416,7 @@
{
return fd;
}
- BTIF_TRACE_ERROR1("can not bring up tap interface:%s", TAP_IF_NAME);
+ BTIF_TRACE_ERROR("can not bring up tap interface:%s", TAP_IF_NAME);
close(fd);
return -1;
}
@@ -448,7 +448,7 @@
//btnet_send(btpan_cb.conn[i].sock.sock, &buffer, (len + sizeof(tETH_HDR)));
//dump_bin("packet to network", packet, len + sizeof(tETH_HDR));
int ret = write(tap_fd, packet, len + sizeof(tETH_HDR));
- BTIF_TRACE_DEBUG1("ret:%d", ret);
+ BTIF_TRACE_DEBUG("ret:%d", ret);
return ret;
}
return -1;
@@ -499,10 +499,10 @@
int i;
for(i = 0; i < MAX_PAN_CONNS; i++)
{
- BTIF_TRACE_DEBUG2("conns[%d]:%d", i, btpan_cb.conns[i].handle);
+ BTIF_TRACE_DEBUG("conns[%d]:%d", i, btpan_cb.conns[i].handle);
if(btpan_cb.conns[i].handle == -1)
{
- BTIF_TRACE_DEBUG3("handle:%d, local_role:%d, remote_role:%d", handle, local_role, remote_role);
+ BTIF_TRACE_DEBUG("handle:%d, local_role:%d, remote_role:%d", handle, local_role, remote_role);
btpan_cb.conns[i].handle = handle;
bdcpy(btpan_cb.conns[i].peer, addr);
@@ -511,13 +511,13 @@
return &btpan_cb.conns[i];
}
}
- BTIF_TRACE_DEBUG1("MAX_PAN_CONNS:%d exceeded, return NULL as failed", MAX_PAN_CONNS);
+ BTIF_TRACE_DEBUG("MAX_PAN_CONNS:%d exceeded, return NULL as failed", MAX_PAN_CONNS);
return NULL;
}
void btpan_close_handle(btpan_conn_t *p)
{
- BTIF_TRACE_DEBUG1("btpan_close_handle : close handle %d", p->handle);
+ BTIF_TRACE_DEBUG("btpan_close_handle : close handle %d", p->handle);
p->handle = -1;
p->local_role = -1;
p->remote_role = -1;
@@ -529,7 +529,7 @@
uint16_t proto = ntohs(hdr->h_proto);
if(proto == ETH_P_IP || proto == ETH_P_ARP || proto == ETH_P_IPV6)
return true;
- BTIF_TRACE_DEBUG1("unknown proto:%x", proto);
+ BTIF_TRACE_DEBUG("unknown proto:%x", proto);
return false;
}
@@ -564,7 +564,7 @@
switch(event)
{
case BTA_PAN_ENABLE_EVT:
- BTIF_TRACE_DEBUG0("BTA_PAN_ENABLE_EVT");
+ BTIF_TRACE_DEBUG("BTA_PAN_ENABLE_EVT");
break;
case BTA_PAN_SET_ROLE_EVT:
{
@@ -579,7 +579,7 @@
btpan_conn_t* conn;
bdstr_t bds;
bd2str((bt_bdaddr_t*)p_data->opening.bd_addr, &bds);
- BTIF_TRACE_DEBUG2("BTA_PAN_OPENING_EVT handle %d, addr: %s", p_data->opening.handle, bds);
+ BTIF_TRACE_DEBUG("BTA_PAN_OPENING_EVT handle %d, addr: %s", p_data->opening.handle, bds);
conn = btpan_find_conn_addr(p_data->opening.bd_addr);
asrt(conn != NULL);
@@ -592,7 +592,7 @@
(const bt_bdaddr_t*)p_data->opening.bd_addr, btpan_conn_local_role, btpan_remote_role);
}
else
- BTIF_TRACE_ERROR0("connection not found");
+ BTIF_TRACE_ERROR("connection not found");
break;
}
case BTA_PAN_OPEN_EVT:
@@ -639,11 +639,11 @@
btpan_cleanup_conn(conn);
}
else
- BTIF_TRACE_ERROR1("pan handle not found (%d)", p_data->close.handle);
+ BTIF_TRACE_ERROR("pan handle not found (%d)", p_data->close.handle);
break;
}
default:
- BTIF_TRACE_WARNING1("Unknown pan event %d", event);
+ BTIF_TRACE_WARNING("Unknown pan event %d", event);
break;
}
}
@@ -665,7 +665,7 @@
while (btif_is_enabled() && btpan_cb.flow) {
BT_HDR *buffer = (BT_HDR *)GKI_getpoolbuf(PAN_POOL_ID);
if (!buffer) {
- BTIF_TRACE_WARNING1("%s unable to allocate buffer for packet.", __func__);
+ BTIF_TRACE_WARNING("%s unable to allocate buffer for packet.", __func__);
break;
}
buffer->offset = PAN_MINIMUM_OFFSET;
@@ -680,11 +680,11 @@
ssize_t ret = read(fd, btpan_cb.congest_packet, sizeof(btpan_cb.congest_packet));
switch (ret) {
case -1:
- BTIF_TRACE_ERROR2("%s unable to read from driver: %s", __func__, strerror(errno));
+ BTIF_TRACE_ERROR("%s unable to read from driver: %s", __func__, strerror(errno));
GKI_freebuf(buffer);
return;
case 0:
- BTIF_TRACE_WARNING1("%s end of file reached.", __func__);
+ BTIF_TRACE_WARNING("%s end of file reached.", __func__);
GKI_freebuf(buffer);
return;
default:
@@ -708,7 +708,7 @@
if (forward_bnep(&hdr, buffer) != FORWARD_CONGEST)
btpan_cb.congest_packet_size = 0;
} else {
- BTIF_TRACE_WARNING2("%s dropping packet of length %d", __func__, buffer->len);
+ BTIF_TRACE_WARNING("%s dropping packet of length %d", __func__, buffer->len);
btpan_cb.congest_packet_size = 0;
GKI_freebuf(buffer);
}
diff --git a/btif/src/btif_rc.c b/btif/src/btif_rc.c
index 12b8498..a651518 100644
--- a/btif/src/btif_rc.c
+++ b/btif/src/btif_rc.c
@@ -62,10 +62,10 @@
#define MAX_CMD_QUEUE_LEN 8
#define CHECK_RC_CONNECTED \
- BTIF_TRACE_DEBUG1("## %s ##", __FUNCTION__); \
+ BTIF_TRACE_DEBUG("## %s ##", __FUNCTION__); \
if(btif_rc_cb.rc_connected == FALSE) \
{ \
- BTIF_TRACE_WARNING1("Function %s() called when RC is not connected", __FUNCTION__); \
+ BTIF_TRACE_WARNING("Function %s() called when RC is not connected", __FUNCTION__); \
return BT_STATUS_NOT_READY; \
}
@@ -80,7 +80,7 @@
{ \
if(btif_rc_cb.rc_pdu_info[index].is_rsp_pending == FALSE) \
{ \
- BTIF_TRACE_WARNING1("%s Not sending response as no PDU was registered", __FUNCTION__); \
+ BTIF_TRACE_WARNING("%s Not sending response as no PDU was registered", __FUNCTION__); \
return BT_STATUS_UNHANDLED; \
} \
send_metamsg_rsp(btif_rc_cb.rc_handle, btif_rc_cb.rc_pdu_info[index].label, \
@@ -232,7 +232,7 @@
int send_event (int fd, uint16_t type, uint16_t code, int32_t value)
{
struct uinput_event event;
- BTIF_TRACE_DEBUG4("%s type:%u code:%u value:%d", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s type:%u code:%u value:%d", __FUNCTION__,
type, code, value);
memset(&event, 0, sizeof(event));
event.type = type;
@@ -244,7 +244,7 @@
void send_key (int fd, uint16_t key, int pressed)
{
- BTIF_TRACE_DEBUG4("%s fd:%d key:%u pressed:%d", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s fd:%d key:%u pressed:%d", __FUNCTION__,
fd, key, pressed);
if (fd < 0)
@@ -252,7 +252,7 @@
return;
}
- BTIF_TRACE_DEBUG3("AVRCP: Send key %d (%d) fd=%d", key, pressed, fd);
+ BTIF_TRACE_DEBUG("AVRCP: Send key %d (%d) fd=%d", key, pressed, fd);
send_event(fd, EV_KEY, key, pressed);
send_event(fd, EV_SYN, SYN_REPORT, 0);
}
@@ -267,7 +267,7 @@
return 0;
}
}
- BTIF_TRACE_ERROR1("%s ERROR: uinput device is not in the system", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s ERROR: uinput device is not in the system", __FUNCTION__);
return -1;
}
@@ -284,7 +284,7 @@
break;
}
if (x == MAX_UINPUT_PATHS) {
- BTIF_TRACE_ERROR1("%s ERROR: uinput device open failed", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s ERROR: uinput device open failed", __FUNCTION__);
return -1;
}
memset(&dev, 0, sizeof(dev));
@@ -297,7 +297,7 @@
dev.id.version = 0x0000;
if (write(fd, &dev, sizeof(dev)) < 0) {
- BTIF_TRACE_ERROR1("%s Unable to write device information", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s Unable to write device information", __FUNCTION__);
close(fd);
return -1;
}
@@ -313,7 +313,7 @@
ioctl(fd, UI_SET_KEYBIT, x);
if (ioctl(fd, UI_DEV_CREATE, NULL) < 0) {
- BTIF_TRACE_ERROR1("%s Unable to create uinput device", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s Unable to create uinput device", __FUNCTION__);
close(fd);
return -1;
}
@@ -324,13 +324,13 @@
{
char *name = "AVRCP";
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
uinput_fd = uinput_create(name);
if (uinput_fd < 0) {
- BTIF_TRACE_ERROR3("%s AVRCP: Failed to initialize uinput for %s (%d)",
+ BTIF_TRACE_ERROR("%s AVRCP: Failed to initialize uinput for %s (%d)",
__FUNCTION__, name, uinput_fd);
} else {
- BTIF_TRACE_DEBUG3("%s AVRCP: Initialized uinput for %s (fd=%d)",
+ BTIF_TRACE_DEBUG("%s AVRCP: Initialized uinput for %s (fd=%d)",
__FUNCTION__, name, uinput_fd);
}
return uinput_fd;
@@ -338,7 +338,7 @@
void close_uinput (void)
{
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
if (uinput_fd > 0) {
ioctl(uinput_fd, UI_DEV_DESTROY);
@@ -371,11 +371,11 @@
{
rc_features |= BTRC_FEAT_METADATA;
}
- BTIF_TRACE_DEBUG2("%s: rc_features=0x%x", __FUNCTION__, rc_features);
+ BTIF_TRACE_DEBUG("%s: rc_features=0x%x", __FUNCTION__, rc_features);
HAL_CBACK(bt_rc_callbacks, remote_features_cb, &rc_addr, rc_features)
#if (AVRC_ADV_CTRL_INCLUDED == TRUE)
- BTIF_TRACE_DEBUG1("Checking for feature flags in btif_rc_handler with label %d",
+ BTIF_TRACE_DEBUG("Checking for feature flags in btif_rc_handler with label %d",
btif_rc_cb.rc_vol_label);
// Register for volume change on connect
if(btif_rc_cb.rc_features & BTA_AV_FEAT_ADV_CTRL &&
@@ -392,7 +392,7 @@
p_transaction=get_transaction_by_lbl(btif_rc_cb.rc_vol_label);
if(NULL!=p_transaction)
{
- BTIF_TRACE_DEBUG1("register_volumechange already in progress for label %d",
+ BTIF_TRACE_DEBUG("register_volumechange already in progress for label %d",
btif_rc_cb.rc_vol_label);
return;
}
@@ -420,7 +420,7 @@
***************************************************************************/
void handle_rc_connect (tBTA_AV_RC_OPEN *p_rc_open)
{
- BTIF_TRACE_DEBUG2("%s: rc_handle: %d", __FUNCTION__, p_rc_open->rc_handle);
+ BTIF_TRACE_DEBUG("%s: rc_handle: %d", __FUNCTION__, p_rc_open->rc_handle);
bt_status_t result = BT_STATUS_SUCCESS;
int i;
char bd_str[18];
@@ -457,7 +457,7 @@
}
else
{
- BTIF_TRACE_ERROR2("%s Connect failed with error code: %d",
+ BTIF_TRACE_ERROR("%s Connect failed with error code: %d",
__FUNCTION__, p_rc_open->status);
btif_rc_cb.rc_connected = FALSE;
}
@@ -477,7 +477,7 @@
bt_bdaddr_t rc_addr;
tBTA_AV_FEAT features;
#endif
- BTIF_TRACE_DEBUG2("%s: rc_handle: %d", __FUNCTION__, p_rc_close->rc_handle);
+ BTIF_TRACE_DEBUG("%s: rc_handle: %d", __FUNCTION__, p_rc_close->rc_handle);
btif_rc_cb.rc_handle = 0;
btif_rc_cb.rc_connected = FALSE;
@@ -517,7 +517,7 @@
const char *status;
int pressed, i;
- BTIF_TRACE_DEBUG2("%s: p_remote_cmd->rc_id=%d", __FUNCTION__, p_remote_cmd->rc_id);
+ BTIF_TRACE_DEBUG("%s: p_remote_cmd->rc_id=%d", __FUNCTION__, p_remote_cmd->rc_id);
/* If AVRC is open and peer sends PLAY but there is no AVDT, then we queue-up this PLAY */
if (p_remote_cmd)
@@ -527,7 +527,7 @@
{
if (p_remote_cmd->key_state == AVRC_STATE_PRESS)
{
- APPL_TRACE_WARNING1("%s: AVDT not open, queuing the PLAY command", __FUNCTION__);
+ APPL_TRACE_WARNING("%s: AVDT not open, queuing the PLAY command", __FUNCTION__);
btif_rc_cb.rc_pending_play = TRUE;
}
return;
@@ -535,7 +535,7 @@
if ((p_remote_cmd->rc_id == BTA_AV_RC_PAUSE) && (btif_rc_cb.rc_pending_play))
{
- APPL_TRACE_WARNING1("%s: Clear the pending PLAY on PAUSE received", __FUNCTION__);
+ APPL_TRACE_WARNING("%s: Clear the pending PLAY on PAUSE received", __FUNCTION__);
btif_rc_cb.rc_pending_play = FALSE;
return;
}
@@ -559,7 +559,7 @@
(btif_hf_call_terminated_recently() == TRUE) &&
(check_cod( (const bt_bdaddr_t*)&(btif_rc_cb.rc_addr), COD_AV_HEADSETS) != TRUE))
{
- BTIF_TRACE_DEBUG2("%s:Dropping the play/Pause command received right after call end cmd:%d",
+ BTIF_TRACE_DEBUG("%s:Dropping the play/Pause command received right after call end cmd:%d",
__FUNCTION__,p_remote_cmd->rc_id);
return;
}
@@ -571,7 +571,7 @@
for (i = 0; key_map[i].name != NULL; i++) {
if (p_remote_cmd->rc_id == key_map[i].avrcp) {
- BTIF_TRACE_DEBUG3("%s: %s %s", __FUNCTION__, key_map[i].name, status);
+ BTIF_TRACE_DEBUG("%s: %s %s", __FUNCTION__, key_map[i].name, status);
/* MusicPlayer uses a long_press_timeout of 1 second for PLAYPAUSE button
* and maps that to autoshuffle. So if for some reason release for PLAY/PAUSE
@@ -582,7 +582,7 @@
*/
if ((key_map[i].release_quirk == 1) && (pressed == 0))
{
- BTIF_TRACE_DEBUG2("%s: AVRC %s Release Faked earlier, drowned now",
+ BTIF_TRACE_DEBUG("%s: AVRC %s Release Faked earlier, drowned now",
__FUNCTION__, key_map[i].name);
return;
}
@@ -590,7 +590,7 @@
if ((key_map[i].release_quirk == 1) && (pressed == 1))
{
GKI_delay(30); // 30ms
- BTIF_TRACE_DEBUG2("%s: AVRC %s Release quirk enabled, send release now",
+ BTIF_TRACE_DEBUG("%s: AVRC %s Release quirk enabled, send release now",
__FUNCTION__, key_map[i].name);
send_key(uinput_fd, key_map[i].mapped_id, 0);
}
@@ -599,7 +599,7 @@
}
if (key_map[i].name == NULL)
- BTIF_TRACE_ERROR3("%s AVRCP: unknown button 0x%02X %s", __FUNCTION__,
+ BTIF_TRACE_ERROR("%s AVRCP: unknown button 0x%02X %s", __FUNCTION__,
p_remote_cmd->rc_id, status);
}
@@ -629,17 +629,17 @@
key_state = 0;
}
- BTIF_TRACE_DEBUG3("%s: rc_id=%d status=%s", __FUNCTION__, p_remote_rsp->rc_id, status);
+ BTIF_TRACE_DEBUG("%s: rc_id=%d status=%s", __FUNCTION__, p_remote_rsp->rc_id, status);
release_transaction(p_remote_rsp->label);
HAL_CBACK(bt_rc_ctrl_callbacks, passthrough_rsp_cb, p_remote_rsp->rc_id, key_state);
}
else
{
- BTIF_TRACE_ERROR1("%s DUT does not support AVRCP controller role", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s DUT does not support AVRCP controller role", __FUNCTION__);
}
#else
- BTIF_TRACE_ERROR1("%s AVRCP controller role is not enabled", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s AVRCP controller role is not enabled", __FUNCTION__);
#endif
}
@@ -676,16 +676,16 @@
tAVRC_STS status;
int param_len;
- BTIF_TRACE_EVENT1("+ %s", __FUNCTION__);
+ BTIF_TRACE_EVENT("+ %s", __FUNCTION__);
if (pmeta_msg->p_msg->hdr.opcode != AVRC_OP_VENDOR)
{
- BTIF_TRACE_WARNING1("Invalid opcode: %x", pmeta_msg->p_msg->hdr.opcode);
+ BTIF_TRACE_WARNING("Invalid opcode: %x", pmeta_msg->p_msg->hdr.opcode);
return;
}
if (pmeta_msg->len < 3)
{
- BTIF_TRACE_WARNING2("Invalid length.Opcode: 0x%x, len: 0x%x", pmeta_msg->p_msg->hdr.opcode,
+ BTIF_TRACE_WARNING("Invalid length.Opcode: 0x%x, len: 0x%x", pmeta_msg->p_msg->hdr.opcode,
pmeta_msg->len);
return;
}
@@ -702,14 +702,14 @@
}
else
{
- BTIF_TRACE_DEBUG3("%s:Discard vendor dependent rsp. code: %d label:%d.",
+ BTIF_TRACE_DEBUG("%s:Discard vendor dependent rsp. code: %d label:%d.",
__FUNCTION__, pmeta_msg->code, pmeta_msg->label);
}
return;
}
#else
{
- BTIF_TRACE_DEBUG3("%s:Received vendor dependent rsp. code: %d len: %d. Not processing it.",
+ BTIF_TRACE_DEBUG("%s:Received vendor dependent rsp. code: %d len: %d. Not processing it.",
__FUNCTION__, pmeta_msg->code, pmeta_msg->len);
return;
}
@@ -717,13 +717,13 @@
}
status=AVRC_ParsCommand(pmeta_msg->p_msg, &avrc_command, scratch_buf, sizeof(scratch_buf));
- BTIF_TRACE_DEBUG3("Received vendor command.code,PDU and label: %d, %d,%d",pmeta_msg->code,
+ BTIF_TRACE_DEBUG("Received vendor command.code,PDU and label: %d, %d,%d",pmeta_msg->code,
avrc_command.cmd.pdu, pmeta_msg->label);
if (status != AVRC_STS_NO_ERROR)
{
/* return error */
- BTIF_TRACE_WARNING2("%s: Error in parsing received metamsg command. status: 0x%02x",
+ BTIF_TRACE_WARNING("%s: Error in parsing received metamsg command. status: 0x%02x",
__FUNCTION__, status);
send_reject_response(pmeta_msg->rc_handle, pmeta_msg->label, avrc_command.pdu, status);
}
@@ -735,7 +735,7 @@
{
UINT8 event_id = avrc_command.reg_notif.event_id;
param_len = sizeof(tAVRC_REG_NOTIF_CMD);
- BTIF_TRACE_EVENT4("%s:New register notification received.event_id:%s,label:0x%x,code:%x",
+ BTIF_TRACE_EVENT("%s:New register notification received.event_id:%s,label:0x%x,code:%x",
__FUNCTION__,dump_rc_notification_event_id(event_id), pmeta_msg->label,pmeta_msg->code);
btif_rc_cb.rc_notif[event_id-1].bNotify = TRUE;
btif_rc_cb.rc_notif[event_id-1].label = pmeta_msg->label;
@@ -748,7 +748,7 @@
}
- BTIF_TRACE_EVENT2("%s: Passing received metamsg command to app. pdu: %s",
+ BTIF_TRACE_EVENT("%s: Passing received metamsg command to app. pdu: %s",
__FUNCTION__, dump_rc_pdu(avrc_command.cmd.pdu));
/* Since handle_rc_metamsg_cmd() itself is called from
@@ -768,12 +768,12 @@
***************************************************************************/
void btif_rc_handler(tBTA_AV_EVT event, tBTA_AV *p_data)
{
- BTIF_TRACE_DEBUG2 ("%s event:%s", __FUNCTION__, dump_rc_event(event));
+ BTIF_TRACE_DEBUG ("%s event:%s", __FUNCTION__, dump_rc_event(event));
switch (event)
{
case BTA_AV_RC_OPEN_EVT:
{
- BTIF_TRACE_DEBUG1("Peer_features:%x", p_data->rc_open.peer_features);
+ BTIF_TRACE_DEBUG("Peer_features:%x", p_data->rc_open.peer_features);
handle_rc_connect( &(p_data->rc_open) );
}
break;
@@ -784,7 +784,7 @@
break;
case BTA_AV_REMOTE_CMD_EVT:
{
- BTIF_TRACE_DEBUG2("CMD: rc_id:0x%x key_state:%d", p_data->remote_cmd.rc_id,
+ BTIF_TRACE_DEBUG("CMD: rc_id:0x%x key_state:%d", p_data->remote_cmd.rc_id,
p_data->remote_cmd.key_state);
handle_rc_passthrough_cmd( (&p_data->remote_cmd) );
}
@@ -792,7 +792,7 @@
#if (AVRC_CTLR_INCLUDED == TRUE)
case BTA_AV_REMOTE_RSP_EVT:
{
- BTIF_TRACE_DEBUG2("RSP: rc_id:0x%x key_state:%d", p_data->remote_rsp.rc_id,
+ BTIF_TRACE_DEBUG("RSP: rc_id:0x%x key_state:%d", p_data->remote_rsp.rc_id,
p_data->remote_rsp.key_state);
handle_rc_passthrough_rsp( (&p_data->remote_rsp) );
}
@@ -800,23 +800,23 @@
#endif
case BTA_AV_RC_FEAT_EVT:
{
- BTIF_TRACE_DEBUG1("Peer_features:%x", p_data->rc_feat.peer_features);
+ BTIF_TRACE_DEBUG("Peer_features:%x", p_data->rc_feat.peer_features);
btif_rc_cb.rc_features = p_data->rc_feat.peer_features;
handle_rc_features();
}
break;
case BTA_AV_META_MSG_EVT:
{
- BTIF_TRACE_DEBUG2("BTA_AV_META_MSG_EVT code:%d label:%d", p_data->meta_msg.code,
+ BTIF_TRACE_DEBUG("BTA_AV_META_MSG_EVT code:%d label:%d", p_data->meta_msg.code,
p_data->meta_msg.label);
- BTIF_TRACE_DEBUG3(" company_id:0x%x len:%d handle:%d", p_data->meta_msg.company_id,
+ BTIF_TRACE_DEBUG(" company_id:0x%x len:%d handle:%d", p_data->meta_msg.company_id,
p_data->meta_msg.len, p_data->meta_msg.rc_handle);
/* handle the metamsg command */
handle_rc_metamsg_cmd(&(p_data->meta_msg));
}
break;
default:
- BTIF_TRACE_DEBUG1("Unhandled RC event : 0x%x", event);
+ BTIF_TRACE_DEBUG("Unhandled RC event : 0x%x", event);
}
}
@@ -849,13 +849,13 @@
{
UNUSED(peer_addr);
- BTIF_TRACE_DEBUG2("%s: bSendToApp=%d", __FUNCTION__, bSendToApp);
+ BTIF_TRACE_DEBUG("%s: bSendToApp=%d", __FUNCTION__, bSendToApp);
if (btif_rc_cb.rc_pending_play)
{
if (bSendToApp)
{
tBTA_AV_REMOTE_CMD remote_cmd;
- APPL_TRACE_DEBUG1("%s: Sending queued PLAYED event to app", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s: Sending queued PLAYED event to app", __FUNCTION__);
memset (&remote_cmd, 0, sizeof(tBTA_AV_REMOTE_CMD));
remote_cmd.rc_handle = btif_rc_cb.rc_handle;
@@ -895,7 +895,7 @@
if (AVRC_STS_NO_ERROR == (status = AVRC_BldResponse(rc_handle, &avrc_rsp, &p_msg)) )
{
- BTIF_TRACE_DEBUG4("%s:Sending error notification to handle:%d. pdu:%s,status:0x%02x",
+ BTIF_TRACE_DEBUG("%s:Sending error notification to handle:%d. pdu:%s,status:0x%02x",
__FUNCTION__, rc_handle, dump_rc_pdu(pdu), status);
BTA_AvMetaRsp(rc_handle, label, ctype, p_msg);
}
@@ -921,11 +921,11 @@
if (!pmetamsg_resp)
{
- BTIF_TRACE_WARNING1("%s: Invalid response received from application", __FUNCTION__);
+ BTIF_TRACE_WARNING("%s: Invalid response received from application", __FUNCTION__);
return;
}
- BTIF_TRACE_EVENT5("+%s: rc_handle: %d, label: %d, code: 0x%02x, pdu: %s", __FUNCTION__,
+ BTIF_TRACE_EVENT("+%s: rc_handle: %d, label: %d, code: 0x%02x, pdu: %s", __FUNCTION__,
rc_handle, label, code, dump_rc_pdu(pmetamsg_resp->rsp.pdu));
if (pmetamsg_resp->rsp.status != AVRC_STS_NO_ERROR)
@@ -964,7 +964,7 @@
/* de-register this notification for a CHANGED response */
btif_rc_cb.rc_notif[event_id-1].bNotify = FALSE;
- BTIF_TRACE_DEBUG4("%s rc_handle: %d. event_id: 0x%02d bNotify:%u", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s rc_handle: %d. event_id: 0x%02d bNotify:%u", __FUNCTION__,
btif_rc_cb.rc_handle, event_id, bNotify);
if (bNotify)
{
@@ -974,7 +974,7 @@
if (AVRC_STS_NO_ERROR == (status = AVRC_BldResponse(btif_rc_cb.rc_handle,
pmetamsg_resp, &p_msg)) )
{
- BTIF_TRACE_DEBUG3("%s Sending notification to rc_handle: %d. event_id: 0x%02d",
+ BTIF_TRACE_DEBUG("%s Sending notification to rc_handle: %d. event_id: 0x%02d",
__FUNCTION__, btif_rc_cb.rc_handle, event_id);
bSent = TRUE;
BTA_AvMetaRsp(btif_rc_cb.rc_handle, btif_rc_cb.rc_notif[event_id-1].label,
@@ -982,7 +982,7 @@
}
else
{
- BTIF_TRACE_WARNING2("%s failed to build metamsg response. status: 0x%02x",
+ BTIF_TRACE_WARNING("%s failed to build metamsg response. status: 0x%02x",
__FUNCTION__, status);
}
@@ -990,7 +990,7 @@
if (!bSent)
{
- BTIF_TRACE_DEBUG2("%s: Notification not sent, as there are no RC connections or the \
+ BTIF_TRACE_DEBUG("%s: Notification not sent, as there are no RC connections or the \
CT has not subscribed for event_id: %s", __FUNCTION__, dump_rc_notification_event_id(event_id));
}
}
@@ -1009,7 +1009,7 @@
}
else
{
- BTIF_TRACE_ERROR2("%s: failed to build metamsg response. status: 0x%02x",
+ BTIF_TRACE_ERROR("%s: failed to build metamsg response. status: 0x%02x",
__FUNCTION__, status);
}
}
@@ -1045,7 +1045,7 @@
*******************************************************************************/
static void btif_rc_upstreams_evt(UINT16 event, tAVRC_COMMAND *pavrc_cmd, UINT8 ctype, UINT8 label)
{
- BTIF_TRACE_EVENT5("%s pdu: %s handle: 0x%x ctype:%x label:%x", __FUNCTION__,
+ BTIF_TRACE_EVENT("%s pdu: %s handle: 0x%x ctype:%x label:%x", __FUNCTION__,
dump_rc_pdu(pavrc_cmd->pdu), btif_rc_cb.rc_handle, ctype, label);
switch (event)
@@ -1104,7 +1104,7 @@
if(pavrc_cmd->reg_notif.event_id == BTRC_EVT_PLAY_POS_CHANGED &&
pavrc_cmd->reg_notif.param == 0)
{
- BTIF_TRACE_WARNING1("%s Device registering position changed with illegal param 0.",
+ BTIF_TRACE_WARNING("%s Device registering position changed with illegal param 0.",
__FUNCTION__);
send_reject_response (btif_rc_cb.rc_handle, label, pavrc_cmd->pdu, AVRC_STS_BAD_PARAM);
/* de-register this notification for a rejected response */
@@ -1118,7 +1118,7 @@
case AVRC_PDU_INFORM_DISPLAY_CHARSET:
{
tAVRC_RESPONSE avrc_rsp;
- BTIF_TRACE_EVENT1("%s() AVRC_PDU_INFORM_DISPLAY_CHARSET", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s() AVRC_PDU_INFORM_DISPLAY_CHARSET", __FUNCTION__);
if(btif_rc_cb.rc_connected == TRUE)
{
memset(&(avrc_rsp.inform_charset), 0, sizeof(tAVRC_RSP));
@@ -1152,7 +1152,7 @@
*******************************************************************************/
static void btif_rc_upstreams_rsp_evt(UINT16 event, tAVRC_RESPONSE *pavrc_resp, UINT8 ctype, UINT8 label)
{
- BTIF_TRACE_EVENT5("%s pdu: %s handle: 0x%x ctype:%x label:%x", __FUNCTION__,
+ BTIF_TRACE_EVENT("%s pdu: %s handle: 0x%x ctype:%x label:%x", __FUNCTION__,
dump_rc_pdu(pavrc_resp->pdu), btif_rc_cb.rc_handle, ctype, label);
#if (AVRC_ADV_CTRL_INCLUDED == TRUE)
@@ -1168,7 +1168,7 @@
case AVRC_PDU_SET_ABSOLUTE_VOLUME:
{
- BTIF_TRACE_DEBUG2("Set absolute volume change event received: volume %d,ctype %d",
+ BTIF_TRACE_DEBUG("Set absolute volume change event received: volume %d,ctype %d",
pavrc_resp->volume.volume,ctype);
if(AVRC_RSP_ACCEPT==ctype)
btif_rc_cb.rc_volume=pavrc_resp->volume.volume;
@@ -1197,7 +1197,7 @@
*******************************************************************************/
static bt_status_t init(btrc_callbacks_t* callbacks )
{
- BTIF_TRACE_EVENT1("## %s ##", __FUNCTION__);
+ BTIF_TRACE_EVENT("## %s ##", __FUNCTION__);
bt_status_t result = BT_STATUS_SUCCESS;
if (bt_rc_callbacks)
@@ -1223,7 +1223,7 @@
*******************************************************************************/
static bt_status_t init_ctrl(btrc_ctrl_callbacks_t* callbacks )
{
- BTIF_TRACE_EVENT1("## %s ##", __FUNCTION__);
+ BTIF_TRACE_EVENT("## %s ##", __FUNCTION__);
bt_status_t result = BT_STATUS_SUCCESS;
if (bt_rc_ctrl_callbacks)
@@ -1298,7 +1298,7 @@
element_attrs[i].name.charset_id = AVRC_CHARSET_ID_UTF8;
element_attrs[i].name.str_len = (UINT16)strlen((char *)p_attrs[i].text);
element_attrs[i].name.p_str = p_attrs[i].text;
- BTIF_TRACE_DEBUG5("%s attr_id:0x%x, charset_id:0x%x, str_len:%d, str:%s",
+ BTIF_TRACE_DEBUG("%s attr_id:0x%x, charset_id:0x%x, str_len:%d, str:%s",
__FUNCTION__, (unsigned int)element_attrs[i].attr_id,
element_attrs[i].name.charset_id, element_attrs[i].name.str_len,
element_attrs[i].name.p_str);
@@ -1329,10 +1329,10 @@
{
tAVRC_RESPONSE avrc_rsp;
CHECK_RC_CONNECTED
- BTIF_TRACE_EVENT2("## %s ## event_id:%s", __FUNCTION__, dump_rc_notification_event_id(event_id));
+ BTIF_TRACE_EVENT("## %s ## event_id:%s", __FUNCTION__, dump_rc_notification_event_id(event_id));
if (btif_rc_cb.rc_notif[event_id-1].bNotify == FALSE)
{
- BTIF_TRACE_ERROR1("Avrcp Event id not registered: event_id = %x", event_id);
+ BTIF_TRACE_ERROR("Avrcp Event id not registered: event_id = %x", event_id);
return BT_STATUS_NOT_READY;
}
memset(&(avrc_rsp.reg_notif), 0, sizeof(tAVRC_REG_NOTIF_RSP));
@@ -1350,7 +1350,7 @@
avrc_rsp.reg_notif.param.play_pos = p_param->song_pos;
break;
default:
- BTIF_TRACE_WARNING2("%s : Unhandled event ID : 0x%x", __FUNCTION__, event_id);
+ BTIF_TRACE_WARNING("%s : Unhandled event ID : 0x%x", __FUNCTION__, event_id);
return BT_STATUS_UNHANDLED;
}
@@ -1380,7 +1380,7 @@
***************************************************************************/
static bt_status_t set_volume(uint8_t volume)
{
- BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s", __FUNCTION__);
CHECK_RC_CONNECTED
tAVRC_STS status = BT_STATUS_UNSUPPORTED;
rc_transaction_t *p_transaction=NULL;
@@ -1388,7 +1388,7 @@
if(btif_rc_cb.rc_volume==volume)
{
status=BT_STATUS_DONE;
- BTIF_TRACE_ERROR2("%s: volume value already set earlier: 0x%02x",__FUNCTION__, volume);
+ BTIF_TRACE_ERROR("%s: volume value already set earlier: 0x%02x",__FUNCTION__, volume);
return status;
}
@@ -1398,7 +1398,7 @@
tAVRC_COMMAND avrc_cmd = {0};
BT_HDR *p_msg = NULL;
- BTIF_TRACE_DEBUG2("%s: Peer supports absolute volume. newVolume=%d", __FUNCTION__, volume);
+ BTIF_TRACE_DEBUG("%s: Peer supports absolute volume. newVolume=%d", __FUNCTION__, volume);
avrc_cmd.volume.opcode = AVRC_OP_VENDOR;
avrc_cmd.volume.pdu = AVRC_PDU_SET_ABSOLUTE_VOLUME;
avrc_cmd.volume.status = AVRC_STS_NO_ERROR;
@@ -1409,7 +1409,7 @@
bt_status_t tran_status=get_transaction(&p_transaction);
if(BT_STATUS_SUCCESS == tran_status && NULL!=p_transaction)
{
- BTIF_TRACE_DEBUG2("%s msgreq being sent out with label %d",
+ BTIF_TRACE_DEBUG("%s msgreq being sent out with label %d",
__FUNCTION__,p_transaction->lbl);
BTA_AvMetaCmd(btif_rc_cb.rc_handle,p_transaction->lbl, AVRC_CMD_CTRL, p_msg);
status = BT_STATUS_SUCCESS;
@@ -1418,14 +1418,14 @@
{
if(NULL!=p_msg)
GKI_freebuf(p_msg);
- BTIF_TRACE_ERROR2("%s: failed to obtain transaction details. status: 0x%02x",
+ BTIF_TRACE_ERROR("%s: failed to obtain transaction details. status: 0x%02x",
__FUNCTION__, tran_status);
status = BT_STATUS_FAIL;
}
}
else
{
- BTIF_TRACE_ERROR2("%s: failed to build absolute volume command. status: 0x%02x",
+ BTIF_TRACE_ERROR("%s: failed to build absolute volume command. status: 0x%02x",
__FUNCTION__, status);
status = BT_STATUS_FAIL;
}
@@ -1455,7 +1455,7 @@
bt_status_t tran_status;
rc_transaction_t *p_transaction=NULL;
- BTIF_TRACE_DEBUG2("%s called with label:%d",__FUNCTION__,lbl);
+ BTIF_TRACE_DEBUG("%s called with label:%d",__FUNCTION__,lbl);
avrc_cmd.cmd.opcode=0x00;
avrc_cmd.pdu = AVRC_PDU_REGISTER_NOTIFICATION;
@@ -1469,17 +1469,17 @@
if(NULL!=p_transaction)
{
BTA_AvMetaCmd(btif_rc_cb.rc_handle,p_transaction->lbl, AVRC_CMD_NOTIF, p_msg);
- BTIF_TRACE_DEBUG1("%s:BTA_AvMetaCmd called",__FUNCTION__);
+ BTIF_TRACE_DEBUG("%s:BTA_AvMetaCmd called",__FUNCTION__);
}
else
{
if(NULL!=p_msg)
GKI_freebuf(p_msg);
- BTIF_TRACE_ERROR2("%s transaction not obtained with label: %d",__FUNCTION__,lbl);
+ BTIF_TRACE_ERROR("%s transaction not obtained with label: %d",__FUNCTION__,lbl);
}
}
else
- BTIF_TRACE_ERROR2("%s failed to build command:%d",__FUNCTION__,BldResp);
+ BTIF_TRACE_ERROR("%s failed to build command:%d",__FUNCTION__,BldResp);
}
@@ -1503,7 +1503,7 @@
|| AVRC_RSP_REJ==pmeta_msg->code || AVRC_RSP_NOT_IMPL==pmeta_msg->code))
{
status=AVRC_ParsResponse(pmeta_msg->p_msg, &avrc_response, scratch_buf, sizeof(scratch_buf));
- BTIF_TRACE_DEBUG6("%s: code %d,event ID %d,PDU %x,parsing status %d, label:%d",
+ BTIF_TRACE_DEBUG("%s: code %d,event ID %d,PDU %x,parsing status %d, label:%d",
__FUNCTION__,pmeta_msg->code,avrc_response.reg_notif.event_id,avrc_response.reg_notif.pdu,
status, pmeta_msg->label);
@@ -1527,14 +1527,14 @@
&& btif_rc_cb.rc_vol_label!=pmeta_msg->label)
{
// Just discard the message, if the device sends back with an incorrect label
- BTIF_TRACE_DEBUG3("%s:Discarding register notfn in rsp.code: %d and label %d",
+ BTIF_TRACE_DEBUG("%s:Discarding register notfn in rsp.code: %d and label %d",
__FUNCTION__, pmeta_msg->code, pmeta_msg->label);
return;
}
}
else
{
- BTIF_TRACE_DEBUG3("%s:Received vendor dependent in adv ctrl rsp. code: %d len: %d. Not processing it.",
+ BTIF_TRACE_DEBUG("%s:Received vendor dependent in adv ctrl rsp. code: %d len: %d. Not processing it.",
__FUNCTION__, pmeta_msg->code, pmeta_msg->len);
return;
}
@@ -1553,7 +1553,7 @@
release_transaction(pmeta_msg->label);
}
- BTIF_TRACE_EVENT2("%s: Passing received metamsg response to app. pdu: %s",
+ BTIF_TRACE_EVENT("%s: Passing received metamsg response to app. pdu: %s",
__FUNCTION__, dump_rc_pdu(avrc_response.pdu));
btif_rc_upstreams_rsp_evt((uint16_t)avrc_response.rsp.pdu, &avrc_response, pmeta_msg->code,
pmeta_msg->label);
@@ -1571,7 +1571,7 @@
***************************************************************************/
static void cleanup()
{
- BTIF_TRACE_EVENT1("## %s ##", __FUNCTION__);
+ BTIF_TRACE_EVENT("## %s ##", __FUNCTION__);
close_uinput();
if (bt_rc_callbacks)
{
@@ -1588,7 +1588,7 @@
#if (AVRC_CTLR_INCLUDED == TRUE)
CHECK_RC_CONNECTED
rc_transaction_t *p_transaction=NULL;
- BTIF_TRACE_DEBUG3("%s: key-code: %d, key-state: %d", __FUNCTION__,
+ BTIF_TRACE_DEBUG("%s: key-code: %d, key-state: %d", __FUNCTION__,
key_code, key_state);
if (btif_rc_cb.rc_features & BTA_AV_FEAT_RCTG)
{
@@ -1599,21 +1599,21 @@
BTA_AvRemoteCmd(btif_rc_cb.rc_handle, p_transaction->lbl,
(tBTA_AV_RC)key_code, (tBTA_AV_STATE)key_state);
status = BT_STATUS_SUCCESS;
- BTIF_TRACE_DEBUG1("%s: succesfully sent passthrough command to BTA", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: succesfully sent passthrough command to BTA", __FUNCTION__);
}
else
{
status = BT_STATUS_FAIL;
- BTIF_TRACE_DEBUG1("%s: error in fetching transaction", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: error in fetching transaction", __FUNCTION__);
}
}
else
{
status = BT_STATUS_FAIL;
- BTIF_TRACE_DEBUG1("%s: feature not supported", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: feature not supported", __FUNCTION__);
}
#else
- BTIF_TRACE_DEBUG1("%s: feature not enabled", __FUNCTION__);
+ BTIF_TRACE_DEBUG("%s: feature not enabled", __FUNCTION__);
#endif
return status;
}
@@ -1652,7 +1652,7 @@
*******************************************************************************/
const btrc_interface_t *btif_rc_get_interface(void)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
return &bt_rc_interface;
}
@@ -1667,7 +1667,7 @@
*******************************************************************************/
const btrc_ctrl_interface_t *btif_rc_ctrl_get_interface(void)
{
- BTIF_TRACE_EVENT1("%s", __FUNCTION__);
+ BTIF_TRACE_EVENT("%s", __FUNCTION__);
return &bt_rc_ctrl_interface;
}
@@ -1748,7 +1748,7 @@
else
{
transaction = &(device.transaction[lbl]);
- BTIF_TRACE_DEBUG2("%s: Got transaction.label: %d",__FUNCTION__,lbl);
+ BTIF_TRACE_DEBUG("%s: Got transaction.label: %d",__FUNCTION__,lbl);
}
}
@@ -1776,7 +1776,7 @@
{
if (FALSE==device.transaction[i].in_use)
{
- BTIF_TRACE_DEBUG2("%s:Got transaction.label: %d",__FUNCTION__,device.transaction[i].lbl);
+ BTIF_TRACE_DEBUG("%s:Got transaction.label: %d",__FUNCTION__,device.transaction[i].lbl);
device.transaction[i].in_use = TRUE;
*ptransaction = &(device.transaction[i]);
result = BT_STATUS_SUCCESS;
@@ -1804,7 +1804,7 @@
/* If the transaction is in use... */
if (transaction != NULL)
{
- BTIF_TRACE_DEBUG2("%s: lbl: %d", __FUNCTION__, lbl);
+ BTIF_TRACE_DEBUG("%s: lbl: %d", __FUNCTION__, lbl);
initialize_transaction(lbl);
}
}
@@ -1840,7 +1840,7 @@
if (rc_white_addr_prefix[i][0] == peer_dev[0] &&
rc_white_addr_prefix[i][1] == peer_dev[1] &&
rc_white_addr_prefix[i][2] == peer_dev[2]) {
- BTIF_TRACE_DEBUG3("whitelist absolute volume for %02x:%02x:%02x",
+ BTIF_TRACE_DEBUG("whitelist absolute volume for %02x:%02x:%02x",
peer_dev[0], peer_dev[1], peer_dev[2]);
return FALSE;
}
@@ -1851,13 +1851,13 @@
if (dev_name_str != NULL) {
for (i = 0; i < whitelist_size; i++) {
if (strcmp(dev_name_str, rc_white_name[i]) == 0) {
- BTIF_TRACE_DEBUG1("whitelist absolute volume for %s", dev_name_str);
+ BTIF_TRACE_DEBUG("whitelist absolute volume for %s", dev_name_str);
return FALSE;
}
}
}
- BTIF_TRACE_WARNING4("blacklist absolute volume for %02x:%02x:%02x, name = %s",
+ BTIF_TRACE_WARNING("blacklist absolute volume for %02x:%02x:%02x, name = %s",
peer_dev[0], peer_dev[1], peer_dev[2], dev_name_str);
return TRUE;
}
diff --git a/btif/src/btif_sm.c b/btif/src/btif_sm.c
index cb4e5ad..e3ccbf8 100644
--- a/btif/src/btif_sm.c
+++ b/btif/src/btif_sm.c
@@ -79,7 +79,7 @@
if (p_handlers == NULL)
{
- BTIF_TRACE_ERROR1("%s : p_handlers is NULL", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s : p_handlers is NULL", __FUNCTION__);
return NULL;
}
@@ -108,7 +108,7 @@
if (p_cb == NULL)
{
- BTIF_TRACE_ERROR1("%s : Invalid handle", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s : Invalid handle", __FUNCTION__);
return;
}
GKI_os_free((void*)p_cb);
@@ -129,7 +129,7 @@
if (p_cb == NULL)
{
- BTIF_TRACE_ERROR1("%s : Invalid handle", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s : Invalid handle", __FUNCTION__);
return 0;
}
@@ -156,7 +156,7 @@
if (p_cb == NULL)
{
- BTIF_TRACE_ERROR1("%s : Invalid handle", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s : Invalid handle", __FUNCTION__);
return BT_STATUS_FAIL;
}
@@ -186,7 +186,7 @@
if (p_cb == NULL)
{
- BTIF_TRACE_ERROR1("%s : Invalid handle", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s : Invalid handle", __FUNCTION__);
return BT_STATUS_FAIL;
}
diff --git a/btif/src/btif_sock.c b/btif/src/btif_sock.c
index 621a91e..4136cda 100644
--- a/btif/src/btif_sock.c
+++ b/btif/src/btif_sock.c
@@ -71,22 +71,22 @@
{
//fix me, the process doesn't exit right now. don't set the init flag for now
//binit = 1;
- BTIF_TRACE_DEBUG0("btsock initializing...");
+ BTIF_TRACE_DEBUG("btsock initializing...");
btsock_thread_init();
int handle = btsock_thread_create(btsock_signaled, NULL);
if(handle >= 0 && btsock_rfc_init(handle) == BT_STATUS_SUCCESS)
{
- BTIF_TRACE_DEBUG0("btsock successfully initialized");
+ BTIF_TRACE_DEBUG("btsock successfully initialized");
return BT_STATUS_SUCCESS;
}
}
- else BTIF_TRACE_ERROR0("btsock interface already initialized");
+ else BTIF_TRACE_ERROR("btsock interface already initialized");
return BT_STATUS_FAIL;
}
void btif_sock_cleanup()
{
btsock_rfc_cleanup();
- BTIF_TRACE_DEBUG0("leaving");
+ BTIF_TRACE_DEBUG("leaving");
}
static bt_status_t btsock_listen(btsock_type_t type, const char* service_name,
@@ -94,7 +94,7 @@
{
if((service_uuid == NULL && channel <= 0) || sock_fd == NULL)
{
- BTIF_TRACE_ERROR3("invalid parameters, uuid:%p, channel:%d, sock_fd:%p", service_uuid, channel, sock_fd);
+ BTIF_TRACE_ERROR("invalid parameters, uuid:%p, channel:%d, sock_fd:%p", service_uuid, channel, sock_fd);
return BT_STATUS_PARM_INVALID;
}
*sock_fd = -1;
@@ -105,15 +105,15 @@
status = btsock_rfc_listen(service_name, service_uuid, channel, sock_fd, flags);
break;
case BTSOCK_L2CAP:
- BTIF_TRACE_ERROR1("bt l2cap socket type not supported, type:%d", type);
+ BTIF_TRACE_ERROR("bt l2cap socket type not supported, type:%d", type);
status = BT_STATUS_UNSUPPORTED;
break;
case BTSOCK_SCO:
- BTIF_TRACE_ERROR1("bt sco socket not supported, type:%d", type);
+ BTIF_TRACE_ERROR("bt sco socket not supported, type:%d", type);
status = BT_STATUS_UNSUPPORTED;
break;
default:
- BTIF_TRACE_ERROR1("unknown bt socket type:%d", type);
+ BTIF_TRACE_ERROR("unknown bt socket type:%d", type);
status = BT_STATUS_UNSUPPORTED;
break;
}
@@ -124,7 +124,7 @@
{
if((uuid == NULL && channel <= 0) || bd_addr == NULL || sock_fd == NULL)
{
- BTIF_TRACE_ERROR4("invalid parameters, bd_addr:%p, uuid:%p, channel:%d, sock_fd:%p",
+ BTIF_TRACE_ERROR("invalid parameters, bd_addr:%p, uuid:%p, channel:%d, sock_fd:%p",
bd_addr, uuid, channel, sock_fd);
return BT_STATUS_PARM_INVALID;
}
@@ -136,15 +136,15 @@
status = btsock_rfc_connect(bd_addr, uuid, channel, sock_fd, flags);
break;
case BTSOCK_L2CAP:
- BTIF_TRACE_ERROR1("bt l2cap socket type not supported, type:%d", type);
+ BTIF_TRACE_ERROR("bt l2cap socket type not supported, type:%d", type);
status = BT_STATUS_UNSUPPORTED;
break;
case BTSOCK_SCO:
- BTIF_TRACE_ERROR1("bt sco socket not supported, type:%d", type);
+ BTIF_TRACE_ERROR("bt sco socket not supported, type:%d", type);
status = BT_STATUS_UNSUPPORTED;
break;
default:
- BTIF_TRACE_ERROR1("unknown bt socket type:%d", type);
+ BTIF_TRACE_ERROR("unknown bt socket type:%d", type);
status = BT_STATUS_UNSUPPORTED;
break;
}
@@ -158,13 +158,13 @@
btsock_rfc_signaled(fd, flags, user_id);
break;
case BTSOCK_L2CAP:
- BTIF_TRACE_ERROR2("bt l2cap socket type not supported, fd:%d, flags:%d", fd, flags);
+ BTIF_TRACE_ERROR("bt l2cap socket type not supported, fd:%d, flags:%d", fd, flags);
break;
case BTSOCK_SCO:
- BTIF_TRACE_ERROR2("bt sco socket type not supported, fd:%d, flags:%d", fd, flags);
+ BTIF_TRACE_ERROR("bt sco socket type not supported, fd:%d, flags:%d", fd, flags);
break;
default:
- BTIF_TRACE_ERROR3("unknown socket type:%d, fd:%d, flags:%d", type, fd, flags);
+ BTIF_TRACE_ERROR("unknown socket type:%d, fd:%d, flags:%d", type, fd, flags);
break;
}
}
diff --git a/btif/src/btif_sock_rfc.c b/btif/src/btif_sock_rfc.c
index 799e626..3f2d7c3 100644
--- a/btif/src/btif_sock_rfc.c
+++ b/btif/src/btif_sock_rfc.c
@@ -56,7 +56,7 @@
#include <cutils/log.h>
#include <hardware/bluetooth.h>
-#define asrt(s) if(!(s)) APPL_TRACE_ERROR3("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define asrt(s) if(!(s)) APPL_TRACE_ERROR("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
extern void uuid_to_string(bt_uuid_t *p_uuid, char *str);
static inline void logu(const char* title, const uint8_t * p_uuid)
@@ -183,7 +183,7 @@
}
}
}
- APPL_TRACE_WARNING1("invalid rfc slot id: %d", id);
+ APPL_TRACE_WARNING("invalid rfc slot id: %d", id);
return NULL;
}
static inline rfc_slot_t* find_rfc_slot_by_pending_sdp()
@@ -214,7 +214,7 @@
if(rfc_slots[i].id && rfc_slots[i].f.doing_sdp_request)
return &rfc_slots[i];
}
- APPL_TRACE_DEBUG0("can not find any slot is requesting sdp");
+ APPL_TRACE_DEBUG("can not find any slot is requesting sdp");
return NULL;
}
@@ -231,7 +231,7 @@
return &rfc_slots[i];
else
{
- APPL_TRACE_ERROR0("invalid rfc slot id, cannot be 0");
+ APPL_TRACE_ERROR("invalid rfc slot id, cannot be 0");
break;
}
}
@@ -253,7 +253,7 @@
int fds[2] = {-1, -1};
if(socketpair(AF_LOCAL, SOCK_STREAM, 0, fds))
{
- APPL_TRACE_ERROR1("socketpair failed, errno:%d", errno);
+ APPL_TRACE_ERROR("socketpair failed, errno:%d", errno);
return NULL;
}
rs->fd = fds[0];
@@ -291,7 +291,7 @@
//now update listen rfc_handle of server slot
srv_rs->rfc_handle = new_listen_handle;
srv_rs->rfc_port_handle = BTA_JvRfcommGetPortHdl(new_listen_handle);
- BTIF_TRACE_DEBUG4("create_srv_accept__rfc_slot(open_handle: 0x%x, new_listen_handle:"
+ BTIF_TRACE_DEBUG("create_srv_accept__rfc_slot(open_handle: 0x%x, new_listen_handle:"
"0x%x) accept_rs->rfc_handle:0x%x, srv_rs_listen->rfc_handle:0x%x"
,open_handle, new_listen_handle, accept_rs->rfc_port_handle, srv_rs->rfc_port_handle);
asrt(accept_rs->rfc_port_handle != srv_rs->rfc_port_handle);
@@ -305,10 +305,10 @@
int* sock_fd, int flags)
{
- APPL_TRACE_DEBUG1("btsock_rfc_listen, service_name:%s", service_name);
+ APPL_TRACE_DEBUG("btsock_rfc_listen, service_name:%s", service_name);
if(sock_fd == NULL || (service_uuid == NULL && (channel < 1 || channel > 30)))
{
- APPL_TRACE_ERROR3("invalid rfc channel:%d or sock_fd:%p, uuid:%p", channel, sock_fd, service_uuid);
+ APPL_TRACE_ERROR("invalid rfc channel:%d or sock_fd:%p, uuid:%p", channel, sock_fd, service_uuid);
return BT_STATUS_PARM_INVALID;
}
*sock_fd = -1;
@@ -330,7 +330,7 @@
rfc_slot_t* rs = alloc_rfc_slot(NULL, service_name, service_uuid, channel, flags, TRUE);
if(rs)
{
- APPL_TRACE_DEBUG1("BTA_JvCreateRecordByUser:%s", service_name);
+ APPL_TRACE_DEBUG("BTA_JvCreateRecordByUser:%s", service_name);
BTA_JvCreateRecordByUser((void *)rs->id);
*sock_fd = rs->app_fd;
rs->app_fd = -1; //the fd ownership is transferred to app
@@ -345,7 +345,7 @@
{
if(sock_fd == NULL || (service_uuid == NULL && (channel < 1 || channel > 30)))
{
- APPL_TRACE_ERROR3("invalid rfc channel:%d or sock_fd:%p, uuid:%p", channel, sock_fd,
+ APPL_TRACE_ERROR("invalid rfc channel:%d or sock_fd:%p, uuid:%p", channel, sock_fd,
service_uuid);
return BT_STATUS_PARM_INVALID;
}
@@ -359,7 +359,7 @@
{
if(is_uuid_empty(service_uuid))
{
- APPL_TRACE_DEBUG1("connecting to rfcomm channel:%d without service discovery", channel);
+ APPL_TRACE_DEBUG("connecting to rfcomm channel:%d without service discovery", channel);
if(BTA_JvRfcommConnect(rs->security, rs->role, rs->scn, rs->addr.address,
rfcomm_cback, (void*)rs->id) == BTA_JV_SUCCESS)
{
@@ -410,13 +410,13 @@
{
if(BTM_TryAllocateSCN(rs->scn) == FALSE)
{
- APPL_TRACE_ERROR1("rfc channel:%d already in use", scn);
+ APPL_TRACE_ERROR("rfc channel:%d already in use", scn);
return FALSE;
}
}
else if((rs->scn = BTM_AllocateSCN()) == 0)
{
- APPL_TRACE_ERROR0("run out of rfc channels");
+ APPL_TRACE_ERROR("run out of rfc channels");
return FALSE;
}
if((rs->sdp_handle = add_rfc_sdp_rec(rs->service_name, rs->service_uuid, rs->scn)) <= 0)
@@ -480,7 +480,7 @@
}
static void cleanup_rfc_slot(rfc_slot_t* rs)
{
- APPL_TRACE_DEBUG4("cleanup slot:%d, fd:%d, scn:%d, sdp_handle:0x%x", rs->id, rs->fd, rs->scn, rs->sdp_handle);
+ APPL_TRACE_DEBUG("cleanup slot:%d, fd:%d, scn:%d, sdp_handle:0x%x", rs->id, rs->fd, rs->scn, rs->sdp_handle);
if(rs->fd != -1)
{
shutdown(rs->fd, 2);
@@ -499,7 +499,7 @@
}
if(rs->rfc_handle && !rs->f.closing && !rs->f.server)
{
- APPL_TRACE_DEBUG1("closing rfcomm connection, rfc_handle:0x%x", rs->rfc_handle);
+ APPL_TRACE_DEBUG("closing rfcomm connection, rfc_handle:0x%x", rs->rfc_handle);
BTA_JvRfcommClose(rs->rfc_handle, (void*)rs->id);
rs->rfc_handle = 0;
}
@@ -539,7 +539,7 @@
{
if(sock_send_fd(fd, (const uint8_t*)&cs, sizeof(cs), send_fd) == sizeof(cs))
return TRUE;
- else APPL_TRACE_ERROR2("sock_send_fd failed, fd:%d, send_fd:%d", fd, send_fd);
+ else APPL_TRACE_ERROR("sock_send_fd failed, fd:%d, send_fd:%d", fd, send_fd);
}
else if(sock_send_all(fd, (const uint8_t*)&cs, sizeof(cs)) == sizeof(cs))
{
@@ -577,7 +577,7 @@
if(!send_app_scn(rs))
{
//closed
- APPL_TRACE_DEBUG1("send_app_scn() failed, close rs->id:%d", rs->id);
+ APPL_TRACE_DEBUG("send_app_scn() failed, close rs->id:%d", rs->id);
cleanup_rfc_slot(rs);
}
}
@@ -598,9 +598,9 @@
//start monitor the socket
btsock_thread_add_fd(pth, srv_rs->fd, BTSOCK_RFCOMM, SOCK_THREAD_FD_EXCEPTION, srv_rs->id);
btsock_thread_add_fd(pth, accept_rs->fd, BTSOCK_RFCOMM, SOCK_THREAD_FD_RD, accept_rs->id);
- APPL_TRACE_DEBUG1("sending connect signal & app fd:%dto app server to accept() the connection",
+ APPL_TRACE_DEBUG("sending connect signal & app fd:%dto app server to accept() the connection",
accept_rs->app_fd);
- APPL_TRACE_DEBUG2("server fd:%d, scn:%d", srv_rs->fd, srv_rs->scn);
+ APPL_TRACE_DEBUG("server fd:%d, scn:%d", srv_rs->fd, srv_rs->scn);
send_app_connect_signal(srv_rs->fd, &accept_rs->addr, srv_rs->scn, 0, accept_rs->app_fd);
accept_rs->app_fd = -1; //the fd is closed after sent to app
new_listen_slot_id = srv_rs->id;
@@ -618,16 +618,16 @@
rs->rfc_port_handle = BTA_JvRfcommGetPortHdl(p_open->handle);
bd_copy(rs->addr.address, p_open->rem_bda, 0);
//notify app rfc is connected
- APPL_TRACE_DEBUG4("call send_app_connect_signal, slot id:%d, fd:%d, rfc scn:%d, server:%d",
+ APPL_TRACE_DEBUG("call send_app_connect_signal, slot id:%d, fd:%d, rfc scn:%d, server:%d",
rs->id, rs->fd, rs->scn, rs->f.server);
if(send_app_connect_signal(rs->fd, &rs->addr, rs->scn, 0, -1))
{
//start monitoring the socketpair to get call back when app writing data
- APPL_TRACE_DEBUG3("on_rfc_connect_ind, connect signal sent, slot id:%d, rfc scn:%d, server:%d",
+ APPL_TRACE_DEBUG("on_rfc_connect_ind, connect signal sent, slot id:%d, rfc scn:%d, server:%d",
rs->id, rs->scn, rs->f.server);
rs->f.connected = TRUE;
}
- else APPL_TRACE_ERROR0("send_app_connect_signal failed");
+ else APPL_TRACE_ERROR("send_app_connect_signal failed");
}
else if(rs)
cleanup_rfc_slot(rs);
@@ -640,7 +640,7 @@
rfc_slot_t* rs = find_rfc_slot_by_id(id);
if(rs)
{
- APPL_TRACE_DEBUG4("on_rfc_close, slot id:%d, fd:%d, rfc scn:%d, server:%d",
+ APPL_TRACE_DEBUG("on_rfc_close, slot id:%d, fd:%d, rfc scn:%d, server:%d",
rs->id, rs->fd, rs->scn, rs->f.server);
free_rfc_slot_scn(rs);
// rfc_handle already closed when receiving rfcomm close event from stack.
@@ -680,7 +680,7 @@
{
int rc;
void* new_user_data = NULL;
- APPL_TRACE_DEBUG1("event=%s", jv_evt[event]);
+ APPL_TRACE_DEBUG("event=%s", jv_evt[event]);
switch (event)
{
@@ -702,12 +702,12 @@
break;
case BTA_JV_RFCOMM_CLOSE_EVT:
- APPL_TRACE_DEBUG1("BTA_JV_RFCOMM_CLOSE_EVT: user_data:%d", (uint32_t)user_data);
+ APPL_TRACE_DEBUG("BTA_JV_RFCOMM_CLOSE_EVT: user_data:%d", (uint32_t)user_data);
on_rfc_close(&p_data->rfc_close, (uint32_t)user_data);
break;
case BTA_JV_RFCOMM_READ_EVT:
- APPL_TRACE_DEBUG0("BTA_JV_RFCOMM_READ_EVT not used");
+ APPL_TRACE_DEBUG("BTA_JV_RFCOMM_READ_EVT not used");
break;
case BTA_JV_RFCOMM_WRITE_EVT:
@@ -715,7 +715,7 @@
break;
case BTA_JV_RFCOMM_DATA_IND_EVT:
- APPL_TRACE_DEBUG0("BTA_JV_RFCOMM_DATA_IND_EVT not used");
+ APPL_TRACE_DEBUG("BTA_JV_RFCOMM_DATA_IND_EVT not used");
break;
case BTA_JV_RFCOMM_CONG_EVT:
@@ -723,7 +723,7 @@
on_rfc_outgoing_congest(&p_data->rfc_cong, (uint32_t)user_data);
break;
default:
- APPL_TRACE_ERROR2("unhandled event %d, slot id:%d", event, (uint32_t)user_data);
+ APPL_TRACE_ERROR("unhandled event %d, slot id:%d", event, (uint32_t)user_data);
break;
}
return new_user_data;
@@ -732,7 +732,7 @@
static void jv_dm_cback(tBTA_JV_EVT event, tBTA_JV *p_data, void *user_data)
{
uint32_t id = (uint32_t)user_data;
- APPL_TRACE_DEBUG2("jv_dm_cback: event:%d, slot id:%d", event, id);
+ APPL_TRACE_DEBUG("jv_dm_cback: event:%d, slot id:%d", event, id);
switch(event)
{
case BTA_JV_CREATE_RECORD_EVT:
@@ -747,7 +747,7 @@
}
else if(rs)
{
- APPL_TRACE_ERROR1("jv_dm_cback: cannot start server, slot found:%p", rs);
+ APPL_TRACE_ERROR("jv_dm_cback: cannot start server, slot found:%p", rs);
cleanup_rfc_slot(rs);
}
unlock_slot(&slot_lock);
@@ -759,7 +759,7 @@
lock_slot(&slot_lock);
if(p_data->disc_comp.status == BTA_JV_SUCCESS && p_data->disc_comp.scn)
{
- APPL_TRACE_DEBUG3("BTA_JV_DISCOVERY_COMP_EVT, slot id:%d, status:%d, scn:%d",
+ APPL_TRACE_DEBUG("BTA_JV_DISCOVERY_COMP_EVT, slot id:%d, status:%d, scn:%d",
id, p_data->disc_comp.status, p_data->disc_comp.scn);
rs = find_rfc_slot_by_id(id);
@@ -777,14 +777,14 @@
}
else if(rs)
{
- APPL_TRACE_ERROR3("DISCOVERY_COMP_EVT no pending sdp request, slot id:%d, \
+ APPL_TRACE_ERROR("DISCOVERY_COMP_EVT no pending sdp request, slot id:%d, \
flag sdp pending:%d, flag sdp doing:%d",
id, rs->f.pending_sdp_request, rs->f.doing_sdp_request);
}
}
else
{
- APPL_TRACE_ERROR3("DISCOVERY_COMP_EVT slot id:%d, failed to find channle, \
+ APPL_TRACE_ERROR("DISCOVERY_COMP_EVT slot id:%d, failed to find channle, \
status:%d, scn:%d", id, p_data->disc_comp.status,
p_data->disc_comp.scn);
rs = find_rfc_slot_by_id(id);
@@ -794,7 +794,7 @@
rs = find_rfc_slot_by_pending_sdp();
if(rs)
{
- APPL_TRACE_DEBUG0("BTA_JV_DISCOVERY_COMP_EVT, start another pending scn sdp request");
+ APPL_TRACE_DEBUG("BTA_JV_DISCOVERY_COMP_EVT, start another pending scn sdp request");
tSDP_UUID sdp_uuid;
sdp_uuid.len = 16;
memcpy(sdp_uuid.uu.uuid128, rs->service_uuid, sizeof(sdp_uuid.uu.uuid128));
@@ -806,7 +806,7 @@
break;
}
default:
- APPL_TRACE_DEBUG2("unhandled event:%d, slot id:%d", event, id);
+ APPL_TRACE_DEBUG("unhandled event:%d, slot id:%d", event, id);
break;
}
@@ -826,7 +826,7 @@
if(sent > 0 && sent < p_buf->len)
{
//sent partial
- APPL_TRACE_ERROR2("send partial, sent:%d, p_buf->len:%d", sent, p_buf->len);
+ APPL_TRACE_ERROR("send partial, sent:%d, p_buf->len:%d", sent, p_buf->len);
p_buf->offset += sent;
p_buf->len -= sent;
return SENT_PARTIAL;
@@ -835,10 +835,10 @@
if(sent < 0 &&
(errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR))
{
- APPL_TRACE_ERROR1("send none, EAGAIN or EWOULDBLOCK, errno:%d", errno);
+ APPL_TRACE_ERROR("send none, EAGAIN or EWOULDBLOCK, errno:%d", errno);
return SENT_NONE;
}
- APPL_TRACE_ERROR3("unknown send() error, sent:%d, p_buf->len:%d, errno:%d", sent, p_buf->len, errno);
+ APPL_TRACE_ERROR("unknown send() error, sent:%d, p_buf->len:%d, errno:%d", sent, p_buf->len, errno);
return SENT_FAILED;
}
static BOOLEAN flush_incoming_que_on_wr_signal(rfc_slot_t* rs)
@@ -863,7 +863,7 @@
//app is ready to receive data, tell stack to start the data flow
//fix me: need a jv flow control api to serialize the call in stack
- APPL_TRACE_DEBUG3("enable data flow, rfc_handle:0x%x, rfc_port_handle:0x%x, user_id:%d",
+ APPL_TRACE_DEBUG("enable data flow, rfc_handle:0x%x, rfc_port_handle:0x%x, user_id:%d",
rs->rfc_handle, rs->rfc_port_handle, rs->id);
extern int PORT_FlowControl_MaxCredit(UINT16 handle, BOOLEAN enable);
PORT_FlowControl_MaxCredit(rs->rfc_port_handle, TRUE);
@@ -875,7 +875,7 @@
rfc_slot_t* rs = find_rfc_slot_by_id(user_id);
if(rs)
{
- APPL_TRACE_DEBUG3("rfc slot id:%d, fd:%d, flags:%x", rs->id, fd, flags);
+ APPL_TRACE_DEBUG("rfc slot id:%d, fd:%d, flags:%x", rs->id, fd, flags);
BOOLEAN need_close = FALSE;
if(flags & SOCK_THREAD_FD_RD)
{
@@ -892,7 +892,7 @@
}
else
{
- APPL_TRACE_ERROR2("SOCK_THREAD_FD_RD signaled when rfc is not connected, \
+ APPL_TRACE_ERROR("SOCK_THREAD_FD_RD signaled when rfc is not connected, \
slot id:%d, channel:%d", rs->id, rs->scn);
need_close = TRUE;
}
@@ -904,7 +904,7 @@
if(!rs->f.connected || !flush_incoming_que_on_wr_signal(rs))
{
need_close = TRUE;
- APPL_TRACE_ERROR2("SOCK_THREAD_FD_WR signaled when rfc is not connected \
+ APPL_TRACE_ERROR("SOCK_THREAD_FD_WR signaled when rfc is not connected \
or app closed fd, slot id:%d, channel:%d", rs->id, rs->scn);
}
@@ -915,12 +915,12 @@
if(need_close || ioctl(rs->fd, FIONREAD, &size) != 0 || size == 0 )
{
//cleanup when no data pending
- APPL_TRACE_DEBUG3("SOCK_THREAD_FD_EXCEPTION, cleanup, flags:%x, need_close:%d, pending size:%d",
+ APPL_TRACE_DEBUG("SOCK_THREAD_FD_EXCEPTION, cleanup, flags:%x, need_close:%d, pending size:%d",
flags, need_close, size);
cleanup_rfc_slot(rs);
}
else
- APPL_TRACE_DEBUG3("SOCK_THREAD_FD_EXCEPTION, cleanup pending, flags:%x, need_close:%d, pending size:%d",
+ APPL_TRACE_DEBUG("SOCK_THREAD_FD_EXCEPTION, cleanup pending, flags:%x, need_close:%d, pending size:%d",
flags, need_close, size);
}
}
@@ -974,16 +974,16 @@
{
if(ioctl(rs->fd, FIONREAD, size) == 0)
{
- APPL_TRACE_DEBUG2("ioctl read avaiable size:%d, fd:%d", *size, rs->fd);
+ APPL_TRACE_DEBUG("ioctl read avaiable size:%d, fd:%d", *size, rs->fd);
ret = TRUE;
}
else
{
- APPL_TRACE_ERROR2("ioctl FIONREAD error, errno:%d, fd:%d", errno, rs->fd);
+ APPL_TRACE_ERROR("ioctl FIONREAD error, errno:%d, fd:%d", errno, rs->fd);
cleanup_rfc_slot(rs);
}
}
- else APPL_TRACE_ERROR1("bta_co_rfc_data_outgoing_size, invalid slot id:%d", id);
+ else APPL_TRACE_ERROR("bta_co_rfc_data_outgoing_size, invalid slot id:%d", id);
unlock_slot(&slot_lock);
return ret;
}
@@ -1000,12 +1000,12 @@
ret = TRUE;
else
{
- APPL_TRACE_ERROR4("recv error, errno:%d, fd:%d, size:%d, received:%d",
+ APPL_TRACE_ERROR("recv error, errno:%d, fd:%d, size:%d, received:%d",
errno, rs->fd, size, received);
cleanup_rfc_slot(rs);
}
}
- else APPL_TRACE_ERROR1("bta_co_rfc_data_outgoing, invalid slot id:%d", id);
+ else APPL_TRACE_ERROR("bta_co_rfc_data_outgoing, invalid slot id:%d", id);
unlock_slot(&slot_lock);
return ret;
}
diff --git a/btif/src/btif_sock_sdp.c b/btif/src/btif_sock_sdp.c
index e02a609..00671a0 100644
--- a/btif/src/btif_sock_sdp.c
+++ b/btif/src/btif_sock_sdp.c
@@ -114,7 +114,7 @@
}
}
}
- else APPL_TRACE_ERROR1("failed to create sdp record, service_name:%s", name);
+ else APPL_TRACE_ERROR("failed to create sdp record, service_name:%s", name);
return 0;
}
@@ -143,11 +143,11 @@
UINT32 sdp_handle = 0;
tBTA_PBS_CFG *p_bta_pbs_cfg = (tBTA_PBS_CFG *)&bta_pbs_cfg;
- APPL_TRACE_DEBUG2("add_pbap_sdd:scn %d, service name %s", scn, p_service_name);
+ APPL_TRACE_DEBUG("add_pbap_sdd:scn %d, service name %s", scn, p_service_name);
if ((sdp_handle = SDP_CreateRecord()) == 0)
{
- APPL_TRACE_ERROR0("PBS SDP: Unable to register PBS Service");
+ APPL_TRACE_ERROR("PBS SDP: Unable to register PBS Service");
return sdp_handle;
}
@@ -198,12 +198,12 @@
{
SDP_DeleteRecord(sdp_handle);
sdp_handle = 0;
- APPL_TRACE_ERROR0("bta_pbs_sdp_register FAILED");
+ APPL_TRACE_ERROR("bta_pbs_sdp_register FAILED");
}
else
{
bta_sys_add_uuid(pbs_service); /* UUID_SERVCLASS_PBAP_PSE */
- APPL_TRACE_DEBUG1("PBS: SDP Registered (handle 0x%08x)", sdp_handle);
+ APPL_TRACE_DEBUG("PBS: SDP Registered (handle 0x%08x)", sdp_handle);
}
return sdp_handle;
@@ -248,11 +248,11 @@
// TODO: To add support for EMAIL set below depending on the scn to either SMS or Email
const tBTA_MAPS_CFG *p_bta_maps_cfg = &bta_maps_cfg_sms;
- APPL_TRACE_DEBUG2("add_maps_sdd:scn %d, service name %s", scn, p_service_name);
+ APPL_TRACE_DEBUG("add_maps_sdd:scn %d, service name %s", scn, p_service_name);
if ((sdp_handle = SDP_CreateRecord()) == 0)
{
- APPL_TRACE_ERROR0("MAPS SDP: Unable to register MAPS Service");
+ APPL_TRACE_ERROR("MAPS SDP: Unable to register MAPS Service");
return sdp_handle;
}
@@ -304,12 +304,12 @@
{
SDP_DeleteRecord(sdp_handle);
sdp_handle = 0;
- APPL_TRACE_ERROR0("bta_mass_sdp_register FAILED");
+ APPL_TRACE_ERROR("bta_mass_sdp_register FAILED");
}
else
{
bta_sys_add_uuid(service); /* UUID_SERVCLASS_MESSAGE_ACCESS */
- APPL_TRACE_DEBUG1("MAPSS: SDP Registered (handle 0x%08x)", sdp_handle);
+ APPL_TRACE_DEBUG("MAPSS: SDP Registered (handle 0x%08x)", sdp_handle);
}
return sdp_handle;
@@ -353,7 +353,7 @@
UINT32 sdp_handle;
tBTA_OP_FMT_MASK formats = BTUI_OPS_FORMATS;
- APPL_TRACE_DEBUG2("scn %d, service name %s", scn, p_service_name);
+ APPL_TRACE_DEBUG("scn %d, service name %s", scn, p_service_name);
sdp_handle = SDP_CreateRecord();
@@ -416,7 +416,7 @@
tSDP_PROTOCOL_ELEM proto_elem_list[SPP_NUM_PROTO_ELEMS];
int sdp_handle;
- APPL_TRACE_DEBUG2("scn %d, service name %s", scn, service_name);
+ APPL_TRACE_DEBUG("scn %d, service name %s", scn, service_name);
/* register the service */
if ((sdp_handle = SDP_CreateRecord()) != FALSE)
@@ -450,12 +450,11 @@
}
-
static int add_rfc_sdp_by_uuid(const char* name, const uint8_t* uuid, int scn)
{
int handle = 0;
- APPL_TRACE_DEBUG2("name:%s, scn:%d", name, scn);
+ APPL_TRACE_DEBUG("name:%s, scn:%d", name, scn);
/*
Bluetooth Socket API relies on having preregistered bluez sdp records for HSAG, HFAG, OPP & PBAP
@@ -546,7 +545,7 @@
void del_rfc_sdp_rec(int handle)
{
- APPL_TRACE_DEBUG1("del_rfc_sdp_rec: handle:0x%x", handle);
+ APPL_TRACE_DEBUG("del_rfc_sdp_rec: handle:0x%x", handle);
if(handle != -1 && handle != 0)
BTA_JvDeleteRecord( handle );
}
diff --git a/btif/src/btif_sock_thread.c b/btif/src/btif_sock_thread.c
index 475b8de..0bff884 100644
--- a/btif/src/btif_sock_thread.c
+++ b/btif/src/btif_sock_thread.c
@@ -60,16 +60,16 @@
#include "btif_sock_util.h"
#include <cutils/log.h>
-#define asrt(s) if(!(s)) APPL_TRACE_ERROR3("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define asrt(s) if(!(s)) APPL_TRACE_ERROR("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
#define print_events(events) do { \
- APPL_TRACE_DEBUG1("print poll event:%x", events); \
- if (events & POLLIN) APPL_TRACE_DEBUG0( " POLLIN "); \
- if (events & POLLPRI) APPL_TRACE_DEBUG0( " POLLPRI "); \
- if (events & POLLOUT) APPL_TRACE_DEBUG0( " POLLOUT "); \
- if (events & POLLERR) APPL_TRACE_DEBUG0( " POLLERR "); \
- if (events & POLLHUP) APPL_TRACE_DEBUG0( " POLLHUP "); \
- if (events & POLLNVAL) APPL_TRACE_DEBUG0(" POLLNVAL "); \
- if (events & POLLRDHUP) APPL_TRACE_DEBUG0(" POLLRDHUP"); \
+ APPL_TRACE_DEBUG("print poll event:%x", events); \
+ if (events & POLLIN) APPL_TRACE_DEBUG( " POLLIN "); \
+ if (events & POLLPRI) APPL_TRACE_DEBUG( " POLLPRI "); \
+ if (events & POLLOUT) APPL_TRACE_DEBUG( " POLLOUT "); \
+ if (events & POLLERR) APPL_TRACE_DEBUG( " POLLERR "); \
+ if (events & POLLHUP) APPL_TRACE_DEBUG( " POLLHUP "); \
+ if (events & POLLNVAL) APPL_TRACE_DEBUG(" POLLNVAL "); \
+ if (events & POLLRDHUP) APPL_TRACE_DEBUG(" POLLRDHUP"); \
} while(0)
#define MAX_THREAD 8
@@ -116,7 +116,7 @@
{
int opts;
opts = fcntl(s, F_GETFL);
- if (opts<0) APPL_TRACE_ERROR1("set blocking (%s)", strerror(errno));
+ if (opts<0) APPL_TRACE_ERROR("set blocking (%s)", strerror(errno));
if(blocking)
opts &= ~O_NONBLOCK;
else opts |= O_NONBLOCK;
@@ -126,17 +126,17 @@
static inline int create_server_socket(const char* name)
{
int s = socket(AF_LOCAL, SOCK_STREAM, 0);
- APPL_TRACE_DEBUG1("covert name to android abstract name:%s", name);
+ APPL_TRACE_DEBUG("covert name to android abstract name:%s", name);
if(socket_local_server_bind(s, name, ANDROID_SOCKET_NAMESPACE_ABSTRACT) >= 0)
{
if(listen(s, 5) == 0)
{
- APPL_TRACE_DEBUG2("listen to local socket:%s, fd:%d", name, s);
+ APPL_TRACE_DEBUG("listen to local socket:%s, fd:%d", name, s);
return s;
}
- else APPL_TRACE_ERROR3("listen to local socket:%s, fd:%d failed, errno:%d", name, s, errno);
+ else APPL_TRACE_ERROR("listen to local socket:%s, fd:%d failed, errno:%d", name, s, errno);
}
- else APPL_TRACE_ERROR3("create local socket:%s fd:%d, failed, errno:%d", name, s, errno);
+ else APPL_TRACE_ERROR("create local socket:%s fd:%d, failed, errno:%d", name, s, errno);
close(s);
return -1;
}
@@ -146,10 +146,10 @@
set_socket_blocking(s, TRUE);
if(socket_local_client_connect(s, name, ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM) >= 0)
{
- APPL_TRACE_DEBUG2("connected to local socket:%s, fd:%d", name, s);
+ APPL_TRACE_DEBUG("connected to local socket:%s, fd:%d", name, s);
return s;
}
- else APPL_TRACE_ERROR3("connect to local socket:%s, fd:%d failed, errno:%d", name, s, errno);
+ else APPL_TRACE_ERROR("connect to local socket:%s, fd:%d failed, errno:%d", name, s, errno);
close(s);
return -1;
}
@@ -158,7 +158,7 @@
struct sockaddr_un client_address;
socklen_t clen;
int fd = accept(s, (struct sockaddr*)&client_address, &clen);
- APPL_TRACE_DEBUG2("accepted fd:%d for server fd:%d", fd, s);
+ APPL_TRACE_DEBUG("accepted fd:%d for server fd:%d", fd, s);
return fd;
}
static inline pthread_t create_thread(void *(*start_routine)(void *), void * arg)
@@ -169,7 +169,7 @@
pthread_t thread_id = -1;
if( pthread_create(&thread_id, &thread_attr, start_routine, arg)!=0 )
{
- APPL_TRACE_ERROR1("pthread_create : %s", strerror(errno));
+ APPL_TRACE_ERROR("pthread_create : %s", strerror(errno));
return -1;
}
return thread_id;
@@ -181,14 +181,14 @@
//revserd order to save guard uninitialized access to 0 index
for(i = MAX_THREAD - 1; i >=0; i--)
{
- APPL_TRACE_DEBUG2("ts[%d].used:%d", i, ts[i].used);
+ APPL_TRACE_DEBUG("ts[%d].used:%d", i, ts[i].used);
if(!ts[i].used)
{
ts[i].used = 1;
return i;
}
}
- APPL_TRACE_ERROR0("execeeded max thread count");
+ APPL_TRACE_ERROR("execeeded max thread count");
return -1;
}
static void free_thread_slot(int h)
@@ -198,12 +198,12 @@
close_cmd_fd(h);
ts[h].used = 0;
}
- else APPL_TRACE_ERROR1("invalid thread handle:%d", h);
+ else APPL_TRACE_ERROR("invalid thread handle:%d", h);
}
int btsock_thread_init()
{
static int initialized;
- APPL_TRACE_DEBUG1("in initialized:%d", initialized);
+ APPL_TRACE_DEBUG("in initialized:%d", initialized);
if(!initialized)
{
initialized = 1;
@@ -228,13 +228,13 @@
lock_slot(&thread_slot_lock);
int h = alloc_thread_slot();
unlock_slot(&thread_slot_lock);
- APPL_TRACE_DEBUG1("alloc_thread_slot ret:%d", h);
+ APPL_TRACE_DEBUG("alloc_thread_slot ret:%d", h);
if(h >= 0)
{
init_poll(h);
if((ts[h].thread_id = create_thread(sock_poll_thread, (void*)h)) != -1)
{
- APPL_TRACE_DEBUG2("h:%d, thread id:%d", h, ts[h].thread_id);
+ APPL_TRACE_DEBUG("h:%d, thread id:%d", h, ts[h].thread_id);
ts[h].callback = callback;
ts[h].cmd_callback = cmd_callback;
}
@@ -253,10 +253,10 @@
asrt(ts[h].cmd_fdr == -1 && ts[h].cmd_fdw == -1);
if(socketpair(AF_UNIX, SOCK_STREAM, 0, &ts[h].cmd_fdr) < 0)
{
- APPL_TRACE_ERROR1("socketpair failed: %s", strerror(errno));
+ APPL_TRACE_ERROR("socketpair failed: %s", strerror(errno));
return;
}
- APPL_TRACE_DEBUG3("h:%d, cmd_fdr:%d, cmd_fdw:%d", h, ts[h].cmd_fdr, ts[h].cmd_fdw);
+ APPL_TRACE_DEBUG("h:%d, cmd_fdr:%d, cmd_fdw:%d", h, ts[h].cmd_fdr, ts[h].cmd_fdw);
//add the cmd fd for read & write
add_poll(h, ts[h].cmd_fdr, 0, SOCK_THREAD_FD_RD, 0);
}
@@ -285,12 +285,12 @@
{
if(h < 0 || h >= MAX_THREAD)
{
- APPL_TRACE_ERROR1("invalid bt thread handle:%d", h);
+ APPL_TRACE_ERROR("invalid bt thread handle:%d", h);
return FALSE;
}
if(ts[h].cmd_fdw == -1)
{
- APPL_TRACE_ERROR0("cmd socket is not created. socket thread may not initialized");
+ APPL_TRACE_ERROR("cmd socket is not created. socket thread may not initialized");
return FALSE;
}
if(flags & SOCK_THREAD_ADD_FD_SYNC)
@@ -303,26 +303,26 @@
add_poll(h, fd, type, flags, user_id);
return TRUE;
}
- APPL_TRACE_DEBUG0("THREAD_ADD_FD_SYNC is not called in poll thread, fallback to async");
+ APPL_TRACE_DEBUG("THREAD_ADD_FD_SYNC is not called in poll thread, fallback to async");
}
sock_cmd_t cmd = {CMD_ADD_FD, fd, type, flags, user_id};
- APPL_TRACE_DEBUG2("adding fd:%d, flags:0x%x", fd, flags);
+ APPL_TRACE_DEBUG("adding fd:%d, flags:0x%x", fd, flags);
return send(ts[h].cmd_fdw, &cmd, sizeof(cmd), 0) == sizeof(cmd);
}
int btsock_thread_post_cmd(int h, int type, const unsigned char* data, int size, uint32_t user_id)
{
if(h < 0 || h >= MAX_THREAD)
{
- APPL_TRACE_ERROR1("invalid bt thread handle:%d", h);
+ APPL_TRACE_ERROR("invalid bt thread handle:%d", h);
return FALSE;
}
if(ts[h].cmd_fdw == -1)
{
- APPL_TRACE_ERROR0("cmd socket is not created. socket thread may not initialized");
+ APPL_TRACE_ERROR("cmd socket is not created. socket thread may not initialized");
return FALSE;
}
sock_cmd_t cmd = {CMD_USER_PRIVATE, 0, type, size, user_id};
- APPL_TRACE_DEBUG3("post cmd type:%d, size:%d, h:%d, ", type, size, h);
+ APPL_TRACE_DEBUG("post cmd type:%d, size:%d, h:%d, ", type, size, h);
sock_cmd_t* cmd_send = &cmd;
int size_send = sizeof(cmd);
if(data && size)
@@ -336,7 +336,7 @@
}
else
{
- APPL_TRACE_ERROR3("alloca failed at h:%d, cmd type:%d, size:%d", h, type, size_send);
+ APPL_TRACE_ERROR("alloca failed at h:%d, cmd type:%d, size:%d", h, type, size_send);
return FALSE;
}
}
@@ -346,12 +346,12 @@
{
if(h < 0 || h >= MAX_THREAD)
{
- APPL_TRACE_ERROR1("invalid bt thread handle:%d", h);
+ APPL_TRACE_ERROR("invalid bt thread handle:%d", h);
return FALSE;
}
if(ts[h].cmd_fdw == -1)
{
- APPL_TRACE_ERROR1("thread handle:%d, cmd socket is not created", h);
+ APPL_TRACE_ERROR("thread handle:%d, cmd socket is not created", h);
return FALSE;
}
sock_cmd_t cmd = {CMD_WAKEUP, 0, 0, 0, 0};
@@ -361,12 +361,12 @@
{
if(h < 0 || h >= MAX_THREAD)
{
- APPL_TRACE_ERROR1("invalid bt thread handle:%d", h);
+ APPL_TRACE_ERROR("invalid bt thread handle:%d", h);
return FALSE;
}
if(ts[h].cmd_fdw == -1)
{
- APPL_TRACE_ERROR0("cmd socket is not created");
+ APPL_TRACE_ERROR("cmd socket is not created");
return FALSE;
}
sock_cmd_t cmd = {CMD_EXIT, 0, 0, 0, 0};
@@ -410,7 +410,7 @@
ps->pfd.fd = fd;
ps->user_id = user_id;
if(ps->type != 0 && ps->type != type)
- APPL_TRACE_ERROR2("poll socket type should not changed! type was:%d, type now:%d", ps->type, type);
+ APPL_TRACE_ERROR("poll socket type should not changed! type was:%d, type now:%d", ps->type, type);
ps->type = type;
ps->flags = flags;
ps->pfd.events = flags2pevents(flags);
@@ -442,7 +442,7 @@
++ts[h].poll_count;
return;
}
- APPL_TRACE_ERROR1("exceeded max poll slot:%d!", MAX_POLL);
+ APPL_TRACE_ERROR("exceeded max poll slot:%d!", MAX_POLL);
}
static inline void remove_poll(int h, poll_slot_t* ps, int flags)
{
@@ -467,10 +467,10 @@
int fd = ts[h].cmd_fdr;
if(recv(fd, &cmd, sizeof(cmd), MSG_WAITALL) != sizeof(cmd))
{
- APPL_TRACE_ERROR1("recv cmd errno:%d", errno);
+ APPL_TRACE_ERROR("recv cmd errno:%d", errno);
return FALSE;
}
- APPL_TRACE_DEBUG1("cmd.id:%d", cmd.id);
+ APPL_TRACE_DEBUG("cmd.id:%d", cmd.id);
switch(cmd.id)
{
case CMD_ADD_FD:
@@ -486,7 +486,7 @@
case CMD_EXIT:
return FALSE;
default:
- APPL_TRACE_DEBUG1("unknown cmd: %d", cmd.id);
+ APPL_TRACE_DEBUG("unknown cmd: %d", cmd.id);
break;
}
return TRUE;
@@ -538,7 +538,7 @@
{
if(ps_i >= MAX_POLL)
{
- APPL_TRACE_ERROR4("exceed max poll range, ps_i:%d, MAX_POLL:%d, count:%d, ts[h].poll_count:%d",
+ APPL_TRACE_ERROR("exceed max poll range, ps_i:%d, MAX_POLL:%d, count:%d, ts[h].poll_count:%d",
ps_i, MAX_POLL, count, ts[h].poll_count);
return;
}
@@ -563,7 +563,7 @@
int ret = poll(pfds, ts[h].poll_count, -1);
if(ret == -1)
{
- APPL_TRACE_ERROR2("poll ret -1, exit the thread, errno:%d, err:%s", errno, strerror(errno));
+ APPL_TRACE_ERROR("poll ret -1, exit the thread, errno:%d, err:%s", errno, strerror(errno));
break;
}
if(ret != 0)
@@ -574,7 +574,7 @@
asrt(pfds[0].fd == ts[h].cmd_fdr);
if(!process_cmd_sock(h))
{
- APPL_TRACE_DEBUG1("h:%d, process_cmd_sock return false, exit...", h);
+ APPL_TRACE_DEBUG("h:%d, process_cmd_sock return false, exit...", h);
break;
}
if(ret == 1)
@@ -584,10 +584,10 @@
if(need_process_data_fd)
process_data_sock(h, pfds, ret);
}
- else {APPL_TRACE_DEBUG1("no data, select ret: %d", ret)};
+ else {APPL_TRACE_DEBUG("no data, select ret: %d", ret)};
}
ts[h].thread_id = -1;
- APPL_TRACE_DEBUG1("socket poll thread exiting, h:%d", h);
+ APPL_TRACE_DEBUG("socket poll thread exiting, h:%d", h);
return 0;
}
diff --git a/btif/src/btif_sock_util.c b/btif/src/btif_sock_util.c
index 5b5de69..42089ed 100644
--- a/btif/src/btif_sock_util.c
+++ b/btif/src/btif_sock_util.c
@@ -66,7 +66,7 @@
#include "bta_jv_co.h"
#include "port_api.h"
-#define asrt(s) if(!(s)) BTIF_TRACE_ERROR3("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
+#define asrt(s) if(!(s)) BTIF_TRACE_ERROR("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__)
int sock_send_all(int sock_fd, const uint8_t* buf, int len)
@@ -79,7 +79,7 @@
while(ret < 0 && errno == EINTR);
if(ret <= 0)
{
- BTIF_TRACE_ERROR3("sock fd:%d send errno:%d, ret:%d", sock_fd, errno, ret);
+ BTIF_TRACE_ERROR("sock fd:%d send errno:%d, ret:%d", sock_fd, errno, ret);
return -1;
}
buf += ret;
@@ -97,7 +97,7 @@
while(ret < 0 && errno == EINTR);
if(ret <= 0)
{
- BTIF_TRACE_ERROR3("sock fd:%d recv errno:%d, ret:%d", sock_fd, errno, ret);
+ BTIF_TRACE_ERROR("sock fd:%d recv errno:%d, ret:%d", sock_fd, errno, ret);
return -1;
}
buf += ret;
@@ -145,7 +145,7 @@
} while (ret < 0 && errno == EINTR);
if (ret < 0) {
- BTIF_TRACE_ERROR5("fd:%d, send_fd:%d, sendmsg ret:%d, errno:%d, %s",
+ BTIF_TRACE_ERROR("fd:%d, send_fd:%d, sendmsg ret:%d, errno:%d, %s",
sock_fd, send_fd, (int)ret, errno, strerror(errno));
ret_len = -1;
break;
@@ -157,7 +157,7 @@
// Wipes out any msg_control too
memset(&msg, 0, sizeof(msg));
}
- BTIF_TRACE_DEBUG1("close fd:%d after sent", send_fd);
+ BTIF_TRACE_DEBUG("close fd:%d after sent", send_fd);
close(send_fd);
return ret_len;
}
diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c
index d311b7b..0fcaef4 100644
--- a/btif/src/btif_storage.c
+++ b/btif/src/btif_storage.c
@@ -220,11 +220,11 @@
bdstr_t bdstr = {0};
if(remote_bd_addr)
bd2str(remote_bd_addr, &bdstr);
- BTIF_TRACE_DEBUG3("in, bd addr:%s, prop type:%d, len:%d", bdstr, prop->type, prop->len);
+ BTIF_TRACE_DEBUG("in, bd addr:%s, prop type:%d, len:%d", bdstr, prop->type, prop->len);
char value[1024];
if(prop->len <= 0 || prop->len > (int)sizeof(value) - 1)
{
- BTIF_TRACE_ERROR2("property type:%d, len:%d is invalid", prop->type, prop->len);
+ BTIF_TRACE_ERROR("property type:%d, len:%d is invalid", prop->type, prop->len);
return FALSE;
}
switch(prop->type)
@@ -306,7 +306,7 @@
} break;
default:
- BTIF_TRACE_ERROR1("Unknow prop type:%d", prop->type);
+ BTIF_TRACE_ERROR("Unknow prop type:%d", prop->type);
return FALSE;
}
return TRUE;
@@ -316,10 +316,10 @@
bdstr_t bdstr = {0};
if(remote_bd_addr)
bd2str(remote_bd_addr, &bdstr);
- BTIF_TRACE_DEBUG3("in, bd addr:%s, prop type:%d, len:%d", bdstr, prop->type, prop->len);
+ BTIF_TRACE_DEBUG("in, bd addr:%s, prop type:%d, len:%d", bdstr, prop->type, prop->len);
if(prop->len <= 0)
{
- BTIF_TRACE_ERROR2("property type:%d, len:%d is invalid", prop->type, prop->len);
+ BTIF_TRACE_ERROR("property type:%d, len:%d is invalid", prop->type, prop->len);
return FALSE;
}
int ret = FALSE;
@@ -421,7 +421,7 @@
} break;
default:
- BTIF_TRACE_ERROR1("Unknow prop type:%d", prop->type);
+ BTIF_TRACE_ERROR("Unknow prop type:%d", prop->type);
return FALSE;
}
return ret;
@@ -478,7 +478,7 @@
*******************************************************************************/
static bt_status_t btif_in_fetch_bonded_devices(btif_bonded_devices_t *p_bonded_devices, int add)
{
- BTIF_TRACE_DEBUG1("in add:%d", add);
+ BTIF_TRACE_DEBUG("in add:%d", add);
memset(p_bonded_devices, 0, sizeof(btif_bonded_devices_t));
char kname[128], vname[128];
@@ -493,7 +493,7 @@
do
{
kpos = btif_config_next_key(kpos, "Remote", kname, &kname_size);
- BTIF_TRACE_DEBUG2("Remote device:%s, size:%d", kname, kname_size);
+ BTIF_TRACE_DEBUG("Remote device:%s, size:%d", kname, kname_size);
int type = BTIF_CFG_TYPE_BIN;
LINK_KEY link_key;
int size = sizeof(link_key);
@@ -530,23 +530,23 @@
#if (BLE_INCLUDED == TRUE)
bt_linkkey_file_found = FALSE;
#else
- BTIF_TRACE_ERROR1("bounded device:%s, LinkKeyType or PinLength is invalid", kname);
+ BTIF_TRACE_ERROR("bounded device:%s, LinkKeyType or PinLength is invalid", kname);
#endif
}
}
#if (BLE_INCLUDED == TRUE)
if(!(btif_in_fetch_bonded_ble_device(kname,add, p_bonded_devices)) && (!bt_linkkey_file_found))
{
- BTIF_TRACE_DEBUG1("Remote device:%s, no link key or ble key found", kname);
+ BTIF_TRACE_DEBUG("Remote device:%s, no link key or ble key found", kname);
}
#else
if(!bt_linkkey_file_found)
- BTIF_TRACE_DEBUG1("Remote device:%s, no link key", kname);
+ BTIF_TRACE_DEBUG("Remote device:%s, no link key", kname);
#endif
kname_size = sizeof(kname);
kname[0] = 0;
} while(kpos != -1);
- BTIF_TRACE_DEBUG0("out");
+ BTIF_TRACE_DEBUG("out");
return BT_STATUS_SUCCESS;
}
@@ -595,7 +595,7 @@
btif_in_fetch_bonded_devices(&bonded_devices, 0);
- BTIF_TRACE_DEBUG2("%s: Number of bonded devices: %d Property:BT_PROPERTY_ADAPTER_BONDED_DEVICES", __FUNCTION__, bonded_devices.num_devices);
+ BTIF_TRACE_DEBUG("%s: Number of bonded devices: %d Property:BT_PROPERTY_ADAPTER_BONDED_DEVICES", __FUNCTION__, bonded_devices.num_devices);
if (bonded_devices.num_devices > 0)
{
@@ -614,7 +614,7 @@
uint32_t i;
tBTA_SERVICE_MASK service_mask = btif_get_enabled_services_mask();
- BTIF_TRACE_ERROR2("%s service_mask:0x%x", __FUNCTION__, service_mask);
+ BTIF_TRACE_ERROR("%s service_mask:0x%x", __FUNCTION__, service_mask);
for (i=0; i < BTA_MAX_SERVICE_ID; i++)
{
/* This should eventually become a function when more services are enabled */
@@ -798,7 +798,7 @@
{
bdstr_t bdstr;
bd2str(remote_bd_addr, &bdstr);
- BTIF_TRACE_DEBUG1("in bd addr:%s", bdstr);
+ BTIF_TRACE_DEBUG("in bd addr:%s", bdstr);
int ret = 1;
if(btif_config_exist("Remote", bdstr, "LinkKeyType"))
ret &= btif_config_remove("Remote", bdstr, "LinkKeyType");
@@ -896,7 +896,7 @@
free(devices_list);
}
- BTIF_TRACE_EVENT2("%s: %d bonded devices found", __FUNCTION__, bonded_devices.num_devices);
+ BTIF_TRACE_EVENT("%s: %d bonded devices found", __FUNCTION__, bonded_devices.num_devices);
{
for (i = 0; i < bonded_devices.num_devices; i++)
@@ -1043,7 +1043,7 @@
{
bdstr_t bdstr;
bd2str(remote_bd_addr, &bdstr);
- BTIF_TRACE_DEBUG2(" %s in bd addr:%s",__FUNCTION__, bdstr);
+ BTIF_TRACE_DEBUG(" %s in bd addr:%s",__FUNCTION__, bdstr);
int ret = 1;
if(btif_config_exist("Remote", bdstr, "LE_KEY_PENC"))
ret &= btif_config_remove("Remote", bdstr, "LE_KEY_PENC");
@@ -1175,7 +1175,7 @@
return BT_STATUS_FAIL;
if(device_type == BT_DEVICE_TYPE_BLE)
{
- BTIF_TRACE_DEBUG2("%s %s found a BLE device", __FUNCTION__,remote_bd_addr);
+ BTIF_TRACE_DEBUG("%s %s found a BLE device", __FUNCTION__,remote_bd_addr);
str2bd(remote_bd_addr, &bd_addr);
bdcpy(bta_bd_addr, bd_addr.address);
if (btif_storage_get_remote_addr_type(&bd_addr, &addr_type) != BT_STATUS_SUCCESS)
@@ -1199,15 +1199,15 @@
p = (tBTA_LE_KEY_VALUE *)buf;
for (i=0; i<16; i++)
{
- BTIF_TRACE_DEBUG2("penc_key.ltk[%d]=0x%02x",i,p->penc_key.ltk[i]);
+ BTIF_TRACE_DEBUG("penc_key.ltk[%d]=0x%02x",i,p->penc_key.ltk[i]);
}
for (i=0; i<8; i++)
{
- BTIF_TRACE_DEBUG2("penc_key.rand[%d]=0x%02x",i,p->penc_key.rand[i]);
+ BTIF_TRACE_DEBUG("penc_key.rand[%d]=0x%02x",i,p->penc_key.rand[i]);
}
- BTIF_TRACE_DEBUG1("p->penc_key.ediv=0x%04x",p->penc_key.ediv);
- BTIF_TRACE_DEBUG1("p->penc_key.sec_level=0x%02x",p->penc_key.sec_level);
- BTIF_TRACE_DEBUG1("p->penc_key.key_size=0x%02x",p->penc_key.key_size);
+ BTIF_TRACE_DEBUG("p->penc_key.ediv=0x%04x",p->penc_key.ediv);
+ BTIF_TRACE_DEBUG("p->penc_key.sec_level=0x%02x",p->penc_key.sec_level);
+ BTIF_TRACE_DEBUG("p->penc_key.key_size=0x%02x",p->penc_key.key_size);
BTA_DmAddBleKey (bta_bd_addr, (tBTA_LE_KEY_VALUE *)buf, BTIF_DM_LE_KEY_PENC);
}
key_found = TRUE;
@@ -1229,7 +1229,7 @@
p = (tBTA_LE_KEY_VALUE *)buf;
for (i=0; i<16; i++)
{
- BTIF_TRACE_DEBUG2("p->pid_key[%d]=0x%02x",i,p->pid_key.irk[i]);
+ BTIF_TRACE_DEBUG("p->pid_key[%d]=0x%02x",i,p->pid_key.irk[i]);
}
BTA_DmAddBleKey (bta_bd_addr, (tBTA_LE_KEY_VALUE *)buf, BTIF_DM_LE_KEY_PID);
@@ -1254,10 +1254,10 @@
p = (tBTA_LE_KEY_VALUE *)buf;
for (i=0; i<16; i++)
{
- BTIF_TRACE_DEBUG2("p->pcsrk_key.csrk[%d]=0x%02x",i, p->psrk_key.csrk[i]);
+ BTIF_TRACE_DEBUG("p->pcsrk_key.csrk[%d]=0x%02x",i, p->psrk_key.csrk[i]);
}
- BTIF_TRACE_DEBUG1("p->pcsrk_key.counter=0x%08x",p->psrk_key.counter);
- BTIF_TRACE_DEBUG1("p->pcsrk_key.sec_level=0x%02x",p->psrk_key.sec_level);
+ BTIF_TRACE_DEBUG("p->pcsrk_key.counter=0x%08x",p->psrk_key.counter);
+ BTIF_TRACE_DEBUG("p->pcsrk_key.sec_level=0x%02x",p->psrk_key.sec_level);
BTA_DmAddBleKey (bta_bd_addr, (tBTA_LE_KEY_VALUE *)buf, BTIF_DM_LE_KEY_PCSRK);
}
@@ -1278,9 +1278,9 @@
is_device_added = TRUE;
}
p = (tBTA_LE_KEY_VALUE *)buf;
- BTIF_TRACE_DEBUG1("p->lenc_key.div=0x%04x",p->lenc_key.div);
- BTIF_TRACE_DEBUG1("p->lenc_key.key_size=0x%02x",p->lenc_key.key_size);
- BTIF_TRACE_DEBUG1("p->lenc_key.sec_level=0x%02x",p->lenc_key.sec_level);
+ BTIF_TRACE_DEBUG("p->lenc_key.div=0x%04x",p->lenc_key.div);
+ BTIF_TRACE_DEBUG("p->lenc_key.key_size=0x%02x",p->lenc_key.key_size);
+ BTIF_TRACE_DEBUG("p->lenc_key.sec_level=0x%02x",p->lenc_key.sec_level);
BTA_DmAddBleKey (bta_bd_addr, (tBTA_LE_KEY_VALUE *)buf, BTIF_DM_LE_KEY_LENC);
}
@@ -1301,9 +1301,9 @@
is_device_added = TRUE;
}
p = (tBTA_LE_KEY_VALUE *)buf;
- BTIF_TRACE_DEBUG1("p->lcsrk_key.div=0x%04x",p->lcsrk_key.div);
- BTIF_TRACE_DEBUG1("p->lcsrk_key.counter=0x%08x",p->lcsrk_key.counter);
- BTIF_TRACE_DEBUG1("p->lcsrk_key.sec_level=0x%02x",p->lcsrk_key.sec_level);
+ BTIF_TRACE_DEBUG("p->lcsrk_key.div=0x%04x",p->lcsrk_key.div);
+ BTIF_TRACE_DEBUG("p->lcsrk_key.counter=0x%08x",p->lcsrk_key.counter);
+ BTIF_TRACE_DEBUG("p->lcsrk_key.sec_level=0x%02x",p->lcsrk_key.sec_level);
BTA_DmAddBleKey (bta_bd_addr, (tBTA_LE_KEY_VALUE *)buf, BTIF_DM_LE_KEY_LCSRK);
}
@@ -1373,7 +1373,7 @@
UINT16 ssr_min_tout, UINT16 dl_len, UINT8 *dsc_list)
{
bdstr_t bdstr;
- BTIF_TRACE_DEBUG0("btif_storage_add_hid_device_info:");
+ BTIF_TRACE_DEBUG("btif_storage_add_hid_device_info:");
bd2str(remote_bd_addr, &bdstr);
btif_config_set_int("Remote", bdstr, "HidAttrMask", attr_mask);
btif_config_set_int("Remote", bdstr, "HidSubClass", sub_class);
@@ -1420,7 +1420,7 @@
do
{
kpos = btif_config_next_key(kpos, "Remote", kname, &kname_size);
- BTIF_TRACE_DEBUG2("Remote device:%s, size:%d", kname, kname_size);
+ BTIF_TRACE_DEBUG("Remote device:%s, size:%d", kname, kname_size);
int value;
if(btif_in_fetch_bonded_device(kname) == BT_STATUS_SUCCESS)
{
@@ -1555,7 +1555,7 @@
{
if ((read_size != value_size) || (read_type != BTIF_CFG_TYPE_BIN) )
{
- BTIF_TRACE_ERROR4("%s value_size=%d read_size=%d read_type=%d",
+ BTIF_TRACE_ERROR("%s value_size=%d read_size=%d read_type=%d",
__FUNCTION__, value_size, read_size, read_type);
bt_status = BT_STATUS_FAIL;
}
@@ -1563,7 +1563,7 @@
}
- BTIF_TRACE_DEBUG3("%s status=%d value_size=%d", __FUNCTION__, bt_status, value_size);
+ BTIF_TRACE_DEBUG("%s status=%d value_size=%d", __FUNCTION__, bt_status, value_size);
return bt_status;
}
@@ -1771,7 +1771,7 @@
}
else
{
- BTIF_TRACE_ERROR1("%s NULL BD Address", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s NULL BD Address", __FUNCTION__);
return BT_STATUS_FAIL;
}
@@ -1803,7 +1803,7 @@
}
else
{
- BTIF_TRACE_ERROR1("%s NULL BD Address", __FUNCTION__);
+ BTIF_TRACE_ERROR("%s NULL BD Address", __FUNCTION__);
return FALSE;
}
diff --git a/embdrv/sbc/encoder/srce/sbc_encoder.c b/embdrv/sbc/encoder/srce/sbc_encoder.c
index f111ed0..c58f3fc 100644
--- a/embdrv/sbc/encoder/srce/sbc_encoder.c
+++ b/embdrv/sbc/encoder/srce/sbc_encoder.c
@@ -391,7 +391,7 @@
EncMaxShiftCounter=((ENC_VX_BUFFER_SIZE-8*10*2)>>4)<<3;
}
- APPL_TRACE_EVENT2("SBC_Encoder_Init : bitrate %d, bitpool %d",
+ APPL_TRACE_EVENT("SBC_Encoder_Init : bitrate %d, bitpool %d",
pstrEncParams->u16BitRate, pstrEncParams->s16BitPool);
SbcAnalysisInit();
diff --git a/include/bt_trace.h b/include/bt_trace.h
index 4f8f4a3..927a22c 100644
--- a/include/bt_trace.h
+++ b/include/bt_trace.h
@@ -885,149 +885,22 @@
extern UINT8 btif_trace_level;
/* define traces for application */
-#define BTIF_TRACE_ERROR0(m) {if (btif_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, (m));}
-#define BTIF_TRACE_ERROR1(m,p1) {if (btif_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1));}
-#define BTIF_TRACE_ERROR2(m,p1,p2) {if (btif_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define BTIF_TRACE_ERROR3(m,p1,p2,p3) {if (btif_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define BTIF_TRACE_ERROR4(m,p1,p2,p3,p4) {if (btif_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define BTIF_TRACE_ERROR5(m,p1,p2,p3,p4,p5) {if (btif_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define BTIF_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6) {if (btif_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
-
-#define BTIF_TRACE_WARNING0(m) {if (btif_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, (m));}
-#define BTIF_TRACE_WARNING1(m,p1) {if (btif_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1));}
-#define BTIF_TRACE_WARNING2(m,p1,p2) {if (btif_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define BTIF_TRACE_WARNING3(m,p1,p2,p3) {if (btif_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define BTIF_TRACE_WARNING4(m,p1,p2,p3,p4) {if (btif_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define BTIF_TRACE_WARNING5(m,p1,p2,p3,p4,p5) {if (btif_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define BTIF_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6) {if (btif_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
-
-#define BTIF_TRACE_API0(m) {if (btif_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, (m));}
-#define BTIF_TRACE_API1(m,p1) {if (btif_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1));}
-#define BTIF_TRACE_API2(m,p1,p2) {if (btif_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define BTIF_TRACE_API3(m,p1,p2,p3) {if (btif_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define BTIF_TRACE_API4(m,p1,p2,p3,p4) {if (btif_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define BTIF_TRACE_API5(m,p1,p2,p3,p4,p5) {if (btif_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define BTIF_TRACE_API6(m,p1,p2,p3,p4,p5,p6) {if (btif_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
-
-#define BTIF_TRACE_EVENT0(m) {if (btif_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, (m));}
-#define BTIF_TRACE_EVENT1(m,p1) {if (btif_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1));}
-#define BTIF_TRACE_EVENT2(m,p1,p2) {if (btif_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define BTIF_TRACE_EVENT3(m,p1,p2,p3) {if (btif_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define BTIF_TRACE_EVENT4(m,p1,p2,p3,p4) {if (btif_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define BTIF_TRACE_EVENT5(m,p1,p2,p3,p4,p5) {if (btif_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define BTIF_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6) {if (btif_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
-
-#define BTIF_TRACE_DEBUG0(m) {if (btif_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, (m));}
-#define BTIF_TRACE_DEBUG1(m,p1) {if (btif_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1));}
-#define BTIF_TRACE_DEBUG2(m,p1,p2) {if (btif_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define BTIF_TRACE_DEBUG3(m,p1,p2,p3) {if (btif_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define BTIF_TRACE_DEBUG4(m,p1,p2,p3,p4) {if (btif_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define BTIF_TRACE_DEBUG5(m,p1,p2,p3,p4,p5) {if (btif_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define BTIF_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6) {if (btif_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
-
-#define BTIF_TRACE_VERBOSE0(m) {if (btif_trace_level >= BT_TRACE_LEVEL_VERBOSE) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, (m));}
-#define BTIF_TRACE_VERBOSE1(m,p1) {if (btif_trace_level >= BT_TRACE_LEVEL_VERBOSE) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1));}
-#define BTIF_TRACE_VERBOSE2(m,p1,p2) {if (btif_trace_level >= BT_TRACE_LEVEL_VERBOSE) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define BTIF_TRACE_VERBOSE3(m,p1,p2,p3) {if (btif_trace_level >= BT_TRACE_LEVEL_VERBOSE) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define BTIF_TRACE_VERBOSE4(m,p1,p2,p3,p4) {if (btif_trace_level >= BT_TRACE_LEVEL_VERBOSE) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define BTIF_TRACE_VERBOSE5(m,p1,p2,p3,p4,p5) {if (btif_trace_level >= BT_TRACE_LEVEL_VERBOSE) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define BTIF_TRACE_VERBOSE6(m,p1,p2,p3,p4,p5,p6) {if (btif_trace_level >= BT_TRACE_LEVEL_VERBOSE) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
+#define BTIF_TRACE_ERROR(...) {if (btif_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, ##__VA_ARGS__);}
+#define BTIF_TRACE_WARNING(...) {if (btif_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, ##__VA_ARGS__);}
+#define BTIF_TRACE_API(...) {if (btif_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, ##__VA_ARGS__);}
+#define BTIF_TRACE_EVENT(...) {if (btif_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, ##__VA_ARGS__);}
+#define BTIF_TRACE_DEBUG(...) {if (btif_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, ##__VA_ARGS__);}
+#define BTIF_TRACE_VERBOSE(...) {if (btif_trace_level >= BT_TRACE_LEVEL_VERBOSE) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, ##__VA_ARGS__);}
#else
/* define traces for Application */
-#define BTIF_TRACE_ERROR0(m)
-#define BTIF_TRACE_ERROR1(m,p1)
-#define BTIF_TRACE_ERROR2(m,p1,p2)
-#define BTIF_TRACE_ERROR3(m,p1,p2,p3)
-#define BTIF_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-#define BTIF_TRACE_ERROR7(m,p1,p2,p3,p4,p5,p6,p7)
-
-
-#define BTIF_TRACE_WARNING0(m)
-#define BTIF_TRACE_WARNING1(m,p1)
-#define BTIF_TRACE_WARNING2(m,p1,p2)
-#define BTIF_TRACE_WARNING3(m,p1,p2,p3)
-#define BTIF_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-#define BTIF_TRACE_WARNING7(m,p1,p2,p3,p4,p5,p6,p7)
-
-
-#define BTIF_TRACE_API0(m)
-#define BTIF_TRACE_API1(m,p1)
-#define BTIF_TRACE_API2(m,p1,p2)
-#define BTIF_TRACE_API3(m,p1,p2,p3)
-#define BTIF_TRACE_API4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define BTIF_TRACE_EVENT0(m)
-#define BTIF_TRACE_EVENT1(m,p1)
-#define BTIF_TRACE_EVENT2(m,p1,p2)
-#define BTIF_TRACE_EVENT3(m,p1,p2,p3)
-#define BTIF_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define BTIF_TRACE_DEBUG0(m)
-#define BTIF_TRACE_DEBUG1(m,p1)
-#define BTIF_TRACE_DEBUG2(m,p1,p2)
-#define BTIF_TRACE_DEBUG3(m,p1,p2,p3)
-#define BTIF_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-#define BTIF_TRACE_DEBUG7(m,p1,p2,p3,p4,p5,p6,p7)
-#define BTIF_TRACE_DEBUG8(m,p1,p2,p3,p4,p5,p6,p7,p8)
-
-
-
-
-#define BTIF_TRACE_VERBOSE0(m)
-#define BTIF_TRACE_VERBOSE1(m,p1)
-#define BTIF_TRACE_VERBOSE2(m,p1,p2)
-#define BTIF_TRACE_VERBOSE3(m,p1,p2,p3)
-#define BTIF_TRACE_VERBOSE4(m,p1,p2,p3,p4)
-#define BTIF_TRACE_VERBOSE5(m,p1,p2,p3,p4,p5)
-#define BTIF_TRACE_VERBOSE6(m,p1,p2,p3,p4,p5,p6)
+#define BTIF_TRACE_ERROR(...)
+#define BTIF_TRACE_WARNING(...)
+#define BTIF_TRACE_API(...)
+#define BTIF_TRACE_EVENT(...)
+#define BTIF_TRACE_DEBUG(...)
+#define BTIF_TRACE_VERBOSE(...)
#endif
@@ -1035,147 +908,22 @@
#if (BT_USE_TRACES == TRUE || BT_TRACE_APPL == TRUE)
/* define traces for application */
-#define APPL_TRACE_ERROR0(m) {if (appl_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, (m));}
-#define APPL_TRACE_ERROR1(m,p1) {if (appl_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1));}
-#define APPL_TRACE_ERROR2(m,p1,p2) {if (appl_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define APPL_TRACE_ERROR3(m,p1,p2,p3) {if (appl_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define APPL_TRACE_ERROR4(m,p1,p2,p3,p4) {if (appl_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define APPL_TRACE_ERROR5(m,p1,p2,p3,p4,p5) {if (appl_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define APPL_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6) {if (appl_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
-
-#define APPL_TRACE_WARNING0(m) {if (appl_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, (m));}
-#define APPL_TRACE_WARNING1(m,p1) {if (appl_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1));}
-#define APPL_TRACE_WARNING2(m,p1,p2) {if (appl_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define APPL_TRACE_WARNING3(m,p1,p2,p3) {if (appl_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define APPL_TRACE_WARNING4(m,p1,p2,p3,p4) {if (appl_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define APPL_TRACE_WARNING5(m,p1,p2,p3,p4,p5) {if (appl_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define APPL_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6) {if (appl_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
-
-#define APPL_TRACE_API0(m) {if (appl_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, (m));}
-#define APPL_TRACE_API1(m,p1) {if (appl_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1));}
-#define APPL_TRACE_API2(m,p1,p2) {if (appl_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define APPL_TRACE_API3(m,p1,p2,p3) {if (appl_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define APPL_TRACE_API4(m,p1,p2,p3,p4) {if (appl_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define APPL_TRACE_API5(m,p1,p2,p3,p4,p5) {if (appl_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define APPL_TRACE_API6(m,p1,p2,p3,p4,p5,p6) {if (appl_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
-
-#define APPL_TRACE_EVENT0(m) {if (appl_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, (m));}
-#define APPL_TRACE_EVENT1(m,p1) {if (appl_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1));}
-#define APPL_TRACE_EVENT2(m,p1,p2) {if (appl_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define APPL_TRACE_EVENT3(m,p1,p2,p3) {if (appl_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define APPL_TRACE_EVENT4(m,p1,p2,p3,p4) {if (appl_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define APPL_TRACE_EVENT5(m,p1,p2,p3,p4,p5) {if (appl_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define APPL_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6) {if (appl_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
-
-#define APPL_TRACE_DEBUG0(m) {if (appl_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, (m));}
-#define APPL_TRACE_DEBUG1(m,p1) {if (appl_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1));}
-#define APPL_TRACE_DEBUG2(m,p1,p2) {if (appl_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2));}
-#define APPL_TRACE_DEBUG3(m,p1,p2,p3) {if (appl_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define APPL_TRACE_DEBUG4(m,p1,p2,p3,p4) {if (appl_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define APPL_TRACE_DEBUG5(m,p1,p2,p3,p4,p5) {if (appl_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define APPL_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6) {if (appl_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, \
- (m), (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
-
-#define APPL_TRACE_VERBOSE0(m) {if (appl_trace_level >= BT_TRACE_LEVEL_VERBOSE)\
- LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, (m));}
-#define APPL_TRACE_VERBOSE1(m,p1) {if (appl_trace_level >= BT_TRACE_LEVEL_VERBOSE)\
- LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, (m), \
- (UINT32)(p1));}
-#define APPL_TRACE_VERBOSE2(m,p1,p2) {if (appl_trace_level >= BT_TRACE_LEVEL_VERBOSE)\
- LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, (m), \
- (UINT32)(p1), (UINT32)(p2));}
-#define APPL_TRACE_VERBOSE3(m,p1,p2,p3) {if (appl_trace_level >= BT_TRACE_LEVEL_VERBOSE)\
- LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, (m), \
- (UINT32)(p1), (UINT32)(p2), (UINT32)(p3));}
-#define APPL_TRACE_VERBOSE4(m,p1,p2,p3,p4) {if (appl_trace_level >= BT_TRACE_LEVEL_VERBOSE)\
- LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, (m), \
- (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4));}
-#define APPL_TRACE_VERBOSE5(m,p1,p2,p3,p4,p5) {if (appl_trace_level >= BT_TRACE_LEVEL_VERBOSE)\
- LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, (m), \
- (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5));}
-#define APPL_TRACE_VERBOSE6(m,p1,p2,p3,p4,p5,p6) {if (appl_trace_level >= BT_TRACE_LEVEL_VERBOSE)\
- LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, (m), \
- (UINT32)(p1), (UINT32)(p2), (UINT32)(p3), (UINT32)(p4), (UINT32)(p5), (UINT32)(p6));}
+#define APPL_TRACE_ERROR(...) {if (appl_trace_level >= BT_TRACE_LEVEL_ERROR) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_ERROR, ##__VA_ARGS__);}
+#define APPL_TRACE_WARNING(...) {if (appl_trace_level >= BT_TRACE_LEVEL_WARNING) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_WARNING, ##__VA_ARGS__);}
+#define APPL_TRACE_API(...) {if (appl_trace_level >= BT_TRACE_LEVEL_API) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_API, ##__VA_ARGS__);}
+#define APPL_TRACE_EVENT(...) {if (appl_trace_level >= BT_TRACE_LEVEL_EVENT) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_EVENT, ##__VA_ARGS__);}
+#define APPL_TRACE_DEBUG(...) {if (appl_trace_level >= BT_TRACE_LEVEL_DEBUG) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, ##__VA_ARGS__);}
+#define APPL_TRACE_VERBOSE(...) {if (appl_trace_level >= BT_TRACE_LEVEL_VERBOSE) LogMsg(TRACE_CTRL_GENERAL | TRACE_LAYER_NONE | TRACE_ORG_APPL | TRACE_TYPE_DEBUG, ##__VA_ARGS__);}
#else
/* define traces for Application */
-#define APPL_TRACE_ERROR0(m)
-#define APPL_TRACE_ERROR1(m,p1)
-#define APPL_TRACE_ERROR2(m,p1,p2)
-#define APPL_TRACE_ERROR3(m,p1,p2,p3)
-#define APPL_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define APPL_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define APPL_TRACE_WARNING0(m)
-#define APPL_TRACE_WARNING1(m,p1)
-#define APPL_TRACE_WARNING2(m,p1,p2)
-#define APPL_TRACE_WARNING3(m,p1,p2,p3)
-#define APPL_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define APPL_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define APPL_TRACE_API0(m)
-#define APPL_TRACE_API1(m,p1)
-#define APPL_TRACE_API2(m,p1,p2)
-#define APPL_TRACE_API3(m,p1,p2,p3)
-#define APPL_TRACE_API4(m,p1,p2,p3,p4)
-#define APPL_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define APPL_TRACE_EVENT0(m)
-#define APPL_TRACE_EVENT1(m,p1)
-#define APPL_TRACE_EVENT2(m,p1,p2)
-#define APPL_TRACE_EVENT3(m,p1,p2,p3)
-#define APPL_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define APPL_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define APPL_TRACE_DEBUG0(m)
-#define APPL_TRACE_DEBUG1(m,p1)
-#define APPL_TRACE_DEBUG2(m,p1,p2)
-#define APPL_TRACE_DEBUG3(m,p1,p2,p3)
-#define APPL_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define APPL_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-#define APPL_TRACE_VERBOSE0(m)
-#define APPL_TRACE_VERBOSE1(m,p1)
-#define APPL_TRACE_VERBOSE2(m,p1,p2)
-#define APPL_TRACE_VERBOSE3(m,p1,p2,p3)
-#define APPL_TRACE_VERBOSE4(m,p1,p2,p3,p4)
-#define APPL_TRACE_VERBOSE5(m,p1,p2,p3,p4,p5)
-#define APPL_TRACE_VERBOSE6(m,p1,p2,p3,p4,p5,p6)
+#define APPL_TRACE_ERROR(...)
+#define APPL_TRACE_WARNING(...)
+#define APPL_TRACE_API(...)
+#define APPL_TRACE_EVENT(...)
+#define APPL_TRACE_DEBUG(...)
+#define APPL_TRACE_VERBOSE(...)
#endif
diff --git a/main/bte_main.c b/main/bte_main.c
index 7395481..0a35e00 100644
--- a/main/bte_main.c
+++ b/main/bte_main.c
@@ -135,7 +135,7 @@
if ( (bt_hc_if = (bt_hc_interface_t *) bt_hc_get_interface()) \
== NULL)
{
- APPL_TRACE_ERROR0("!!! Failed to get BtHostControllerInterface !!!");
+ APPL_TRACE_ERROR("!!! Failed to get BtHostControllerInterface !!!");
}
memset(&preload_retry_cb, 0, sizeof(bt_preload_retry_cb_t));
@@ -191,7 +191,7 @@
******************************************************************************/
void bte_main_enable()
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
/* Initialize BTE control block */
BTE_Init();
@@ -219,7 +219,7 @@
******************************************************************************/
void bte_main_disable(void)
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
preload_stop_wait_timer();
bte_hci_disable();
@@ -267,14 +267,14 @@
******************************************************************************/
static void bte_hci_enable(void)
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
preload_start_wait_timer();
if (bt_hc_if)
{
int result = bt_hc_if->init(&hc_callbacks, btif_local_bd_addr.address);
- APPL_TRACE_EVENT1("libbt-hci init returns %d", result);
+ APPL_TRACE_EVENT("libbt-hci init returns %d", result);
assert(result == BT_HC_STATUS_SUCCESS);
@@ -282,7 +282,7 @@
bt_hc_if->logging(BT_HC_LOGGING_ON, hci_logfile);
#if (defined (BT_CLEAN_TURN_ON_DISABLED) && BT_CLEAN_TURN_ON_DISABLED == TRUE)
- APPL_TRACE_DEBUG1("%s Not Turninig Off the BT before Turninig ON", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s Not Turninig Off the BT before Turninig ON", __FUNCTION__);
/* Do not power off the chip before powering on if BT_CLEAN_TURN_ON_DISABLED flag
is defined and set to TRUE to avoid below mentioned issue.
@@ -316,7 +316,7 @@
******************************************************************************/
static void bte_hci_disable(void)
{
- APPL_TRACE_DEBUG1("%s", __FUNCTION__);
+ APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (bt_hc_if)
{
@@ -340,7 +340,7 @@
{
UNUSED(arg);
- APPL_TRACE_ERROR2("...preload_wait_timeout (retried:%d/max-retry:%d)...",
+ APPL_TRACE_ERROR("...preload_wait_timeout (retried:%d/max-retry:%d)...",
preload_retry_cb.retry_counts,
PRELOAD_MAX_RETRY_ATTEMPTS);
@@ -395,7 +395,7 @@
status = timer_settime(preload_retry_cb.timer_id, 0, &ts, 0);
if (status == -1)
- APPL_TRACE_ERROR0("Failed to fire preload watchdog timer");
+ APPL_TRACE_ERROR("Failed to fire preload watchdog timer");
}
}
@@ -451,7 +451,7 @@
(enable == TRUE) ? BT_HC_LPM_ENABLE : BT_HC_LPM_DISABLE \
);
- APPL_TRACE_EVENT2("HC lib lpm enable=%d return %d", enable, result);
+ APPL_TRACE_EVENT("HC lib lpm enable=%d return %d", enable, result);
}
/******************************************************************************
@@ -470,7 +470,7 @@
if ((bt_hc_if) && (lpm_enabled == TRUE))
result = bt_hc_if->lpm(BT_HC_LPM_WAKE_DEASSERT);
- APPL_TRACE_DEBUG1("HC lib lpm deassertion return %d", result);
+ APPL_TRACE_DEBUG("HC lib lpm deassertion return %d", result);
}
/******************************************************************************
@@ -489,7 +489,7 @@
if ((bt_hc_if) && (lpm_enabled == TRUE))
result = bt_hc_if->lpm(BT_HC_LPM_WAKE_ASSERT);
- APPL_TRACE_DEBUG1("HC lib lpm assertion return %d", result);
+ APPL_TRACE_DEBUG("HC lib lpm assertion return %d", result);
}
#endif // HCILP_INCLUDED
@@ -524,7 +524,7 @@
}
else
{
- APPL_TRACE_ERROR0("Invalid Controller ID. Discarding message.");
+ APPL_TRACE_ERROR("Invalid Controller ID. Discarding message.");
GKI_freebuf(p_msg);
}
}
@@ -564,7 +564,7 @@
{
UNUSED(transac);
- APPL_TRACE_EVENT1("HC preload_cb %d [0:SUCCESS 1:FAIL]", result);
+ APPL_TRACE_EVENT("HC preload_cb %d [0:SUCCESS 1:FAIL]", result);
if (result == BT_HC_PRELOAD_SUCCESS)
{
@@ -589,7 +589,7 @@
{
UNUSED(transac);
- APPL_TRACE_EVENT1("HC postload_cb %d", result);
+ APPL_TRACE_EVENT("HC postload_cb %d", result);
}
/******************************************************************************
@@ -604,7 +604,7 @@
******************************************************************************/
static void lpm_cb(bt_hc_lpm_request_result_t result)
{
- APPL_TRACE_EVENT1("HC lpm_result_cb %d", result);
+ APPL_TRACE_EVENT("HC lpm_result_cb %d", result);
lpm_enabled = (result == BT_HC_LPM_ENABLED) ? TRUE : FALSE;
}
@@ -620,7 +620,7 @@
******************************************************************************/
static void hostwake_ind(bt_hc_low_power_event_t event)
{
- APPL_TRACE_EVENT1("HC hostwake_ind %d", event);
+ APPL_TRACE_EVENT("HC hostwake_ind %d", event);
}
/******************************************************************************
@@ -638,13 +638,13 @@
BT_HDR *p_hdr = NULL;
/*
- APPL_TRACE_DEBUG1("HC alloc size=%d", size);
+ APPL_TRACE_DEBUG("HC alloc size=%d", size);
*/
/* Requested buffer size cannot exceed GKI_MAX_BUF_SIZE. */
if (size > GKI_MAX_BUF_SIZE)
{
- APPL_TRACE_ERROR2("HCI DATA SIZE %d greater than MAX %d",
+ APPL_TRACE_ERROR("HCI DATA SIZE %d greater than MAX %d",
size, GKI_MAX_BUF_SIZE);
return NULL;
}
@@ -653,7 +653,7 @@
if (p_hdr == NULL)
{
- APPL_TRACE_WARNING1("alloc returns NO BUFFER! (sz %d)", size);
+ APPL_TRACE_WARNING("alloc returns NO BUFFER! (sz %d)", size);
}
return ((char *) p_hdr);
@@ -710,7 +710,7 @@
UNUSED(len);
/*
- APPL_TRACE_DEBUG2("HC data_ind event=0x%04X (len=%d)", p_msg->event, len);
+ APPL_TRACE_DEBUG("HC data_ind event=0x%04X (len=%d)", p_msg->event, len);
*/
GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, transac);
@@ -741,7 +741,7 @@
{
UNUSED(p_buf);
/*
- APPL_TRACE_DEBUG2("HC tx_result %d (event=%04X)", result, \
+ APPL_TRACE_DEBUG("HC tx_result %d (event=%04X)", result, \
((BT_HDR *)transac)->event);
*/
diff --git a/stack/l2cap/l2c_utils.c b/stack/l2cap/l2c_utils.c
index bbcb3ea..6871981 100644
--- a/stack/l2cap/l2c_utils.c
+++ b/stack/l2cap/l2c_utils.c
@@ -2478,7 +2478,7 @@
UINT8 command[HCI_BRCM_ACL_PRIORITY_PARAM_SIZE];
UINT8 vs_param;
- APPL_TRACE_EVENT1("SET ACL PRIORITY %d", priority);
+ APPL_TRACE_EVENT("SET ACL PRIORITY %d", priority);
/* Find the link control block for the acl channel */
if ((p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_BR_EDR)) == NULL)
diff --git a/udrv/ulinux/uipc.c b/udrv/ulinux/uipc.c
index 158a053..ef57a13 100644
--- a/udrv/ulinux/uipc.c
+++ b/udrv/ulinux/uipc.c
@@ -64,8 +64,8 @@
#define UIPC_DISCONNECTED (-1)
-#define UIPC_LOCK() /*BTIF_TRACE_EVENT1(" %s lock", __FUNCTION__);*/ pthread_mutex_lock(&uipc_main.mutex);
-#define UIPC_UNLOCK() /*BTIF_TRACE_EVENT1("%s unlock", __FUNCTION__);*/ pthread_mutex_unlock(&uipc_main.mutex);
+#define UIPC_LOCK() /*BTIF_TRACE_EVENT(" %s lock", __FUNCTION__);*/ pthread_mutex_lock(&uipc_main.mutex);
+#define UIPC_UNLOCK() /*BTIF_TRACE_EVENT("%s unlock", __FUNCTION__);*/ pthread_mutex_unlock(&uipc_main.mutex);
#define SAFE_FD_ISSET(fd, set) (((fd) == -1) ? FALSE : FD_ISSET((fd), (set)))
@@ -147,23 +147,23 @@
{
int s = socket(AF_LOCAL, SOCK_STREAM, 0);
- BTIF_TRACE_EVENT1("create_server_socket %s", name);
+ BTIF_TRACE_EVENT("create_server_socket %s", name);
if(socket_local_server_bind(s, name, ANDROID_SOCKET_NAMESPACE_ABSTRACT) < 0)
{
- BTIF_TRACE_EVENT1("socket failed to create (%s)", strerror(errno));
+ BTIF_TRACE_EVENT("socket failed to create (%s)", strerror(errno));
close(s);
return -1;
}
if(listen(s, 5) < 0)
{
- BTIF_TRACE_EVENT1("listen failed", strerror(errno));
+ BTIF_TRACE_EVENT("listen failed", strerror(errno));
close(s);
return -1;
}
- BTIF_TRACE_EVENT1("created socket fd %d", s);
+ BTIF_TRACE_EVENT("created socket fd %d", s);
return s;
}
@@ -174,7 +174,7 @@
int fd;
socklen_t len = sizeof(struct sockaddr_un);
- BTIF_TRACE_EVENT1("accept fd %d", sfd);
+ BTIF_TRACE_EVENT("accept fd %d", sfd);
/* make sure there is data to process */
pfd.fd = sfd;
@@ -182,19 +182,19 @@
if (poll(&pfd, 1, 0) == 0)
{
- BTIF_TRACE_EVENT0("accept poll timeout");
+ BTIF_TRACE_EVENT("accept poll timeout");
return -1;
}
- //BTIF_TRACE_EVENT1("poll revents 0x%x", pfd.revents);
+ //BTIF_TRACE_EVENT("poll revents 0x%x", pfd.revents);
if ((fd = accept(sfd, (struct sockaddr *)&remote, &len)) == -1)
{
- BTIF_TRACE_ERROR1("sock accept failed (%s)", strerror(errno));
+ BTIF_TRACE_ERROR("sock accept failed (%s)", strerror(errno));
return -1;
}
- //BTIF_TRACE_EVENT1("new fd %d", fd);
+ //BTIF_TRACE_EVENT("new fd %d", fd);
return fd;
}
@@ -211,7 +211,7 @@
const pthread_mutexattr_t attr = PTHREAD_MUTEX_RECURSIVE;
pthread_mutex_init(&uipc_main.mutex, &attr);
- BTIF_TRACE_EVENT0("### uipc_main_init ###");
+ BTIF_TRACE_EVENT("### uipc_main_init ###");
/* setup interrupt socket pair */
if (socketpair(AF_UNIX, SOCK_STREAM, 0, uipc_main.signal_fds) < 0)
@@ -240,7 +240,7 @@
{
int i;
- BTIF_TRACE_EVENT0("uipc_main_cleanup");
+ BTIF_TRACE_EVENT("uipc_main_cleanup");
close(uipc_main.signal_fds[0]);
close(uipc_main.signal_fds[1]);
@@ -259,7 +259,7 @@
for (i=0; i<UIPC_CH_NUM; i++)
{
- //BTIF_TRACE_EVENT2("CHECK TASK FLAGS %x %x", uipc_main.ch[i].task_evt_flags, UIPC_TASK_FLAG_DISCONNECT_CHAN);
+ //BTIF_TRACE_EVENT("CHECK TASK FLAGS %x %x", uipc_main.ch[i].task_evt_flags, UIPC_TASK_FLAG_DISCONNECT_CHAN);
if (uipc_main.ch[i].task_evt_flags & UIPC_TASK_FLAG_DISCONNECT_CHAN)
{
uipc_main.ch[i].task_evt_flags &= ~UIPC_TASK_FLAG_DISCONNECT_CHAN;
@@ -277,28 +277,28 @@
if (ch_id >= UIPC_CH_NUM)
return -1;
- //BTIF_TRACE_EVENT2("CHECK SRVFD %d (ch %d)", uipc_main.ch[ch_id].srvfd, ch_id);
+ //BTIF_TRACE_EVENT("CHECK SRVFD %d (ch %d)", uipc_main.ch[ch_id].srvfd, ch_id);
if (SAFE_FD_ISSET(uipc_main.ch[ch_id].srvfd, &uipc_main.read_set))
{
- BTIF_TRACE_EVENT1("INCOMING CONNECTION ON CH %d", ch_id);
+ BTIF_TRACE_EVENT("INCOMING CONNECTION ON CH %d", ch_id);
uipc_main.ch[ch_id].fd = accept_server_socket(uipc_main.ch[ch_id].srvfd);
- BTIF_TRACE_EVENT1("NEW FD %d", uipc_main.ch[ch_id].fd);
+ BTIF_TRACE_EVENT("NEW FD %d", uipc_main.ch[ch_id].fd);
if ((uipc_main.ch[ch_id].fd > 0) && uipc_main.ch[ch_id].cback)
{
/* if we have a callback we should add this fd to the active set
and notify user with callback event */
- BTIF_TRACE_EVENT1("ADD FD %d TO ACTIVE SET", uipc_main.ch[ch_id].fd);
+ BTIF_TRACE_EVENT("ADD FD %d TO ACTIVE SET", uipc_main.ch[ch_id].fd);
FD_SET(uipc_main.ch[ch_id].fd, &uipc_main.active_set);
uipc_main.max_fd = MAX(uipc_main.max_fd, uipc_main.ch[ch_id].fd);
}
if (uipc_main.ch[ch_id].fd < 0)
{
- BTIF_TRACE_ERROR2("FAILED TO ACCEPT CH %d (%s)", ch_id, strerror(errno));
+ BTIF_TRACE_ERROR("FAILED TO ACCEPT CH %d (%s)", ch_id, strerror(errno));
return -1;
}
@@ -306,11 +306,11 @@
uipc_main.ch[ch_id].cback(ch_id, UIPC_OPEN_EVT);
}
- //BTIF_TRACE_EVENT2("CHECK FD %d (ch %d)", uipc_main.ch[ch_id].fd, ch_id);
+ //BTIF_TRACE_EVENT("CHECK FD %d (ch %d)", uipc_main.ch[ch_id].fd, ch_id);
if (SAFE_FD_ISSET(uipc_main.ch[ch_id].fd, &uipc_main.read_set))
{
- //BTIF_TRACE_EVENT1("INCOMING DATA ON CH %d", ch_id);
+ //BTIF_TRACE_EVENT("INCOMING DATA ON CH %d", ch_id);
if (uipc_main.ch[ch_id].cback)
uipc_main.ch[ch_id].cback(ch_id, UIPC_RX_DATA_READY_EVT);
@@ -323,7 +323,7 @@
if (SAFE_FD_ISSET(uipc_main.signal_fds[0], &uipc_main.read_set))
{
char sig_recv = 0;
- //BTIF_TRACE_EVENT0("UIPC INTERRUPT");
+ //BTIF_TRACE_EVENT("UIPC INTERRUPT");
recv(uipc_main.signal_fds[0], &sig_recv, sizeof(sig_recv), MSG_WAITALL);
}
}
@@ -331,7 +331,7 @@
static inline void uipc_wakeup_locked(void)
{
char sig_on = 1;
- BTIF_TRACE_EVENT0("UIPC SEND WAKE UP");
+ BTIF_TRACE_EVENT("UIPC SEND WAKE UP");
send(uipc_main.signal_fds[1], &sig_on, sizeof(sig_on), 0);
}
@@ -339,7 +339,7 @@
{
int fd;
- BTIF_TRACE_EVENT1("SETUP CHANNEL SERVER %d", ch_id);
+ BTIF_TRACE_EVENT("SETUP CHANNEL SERVER %d", ch_id);
if (ch_id >= UIPC_CH_NUM)
return -1;
@@ -350,12 +350,12 @@
if (fd < 0)
{
- BTIF_TRACE_ERROR2("failed to setup %s", name, strerror(errno));
+ BTIF_TRACE_ERROR("failed to setup %s", name, strerror(errno));
UIPC_UNLOCK();
return -1;
}
- BTIF_TRACE_EVENT1("ADD SERVER FD TO ACTIVE SET %d", fd);
+ BTIF_TRACE_EVENT("ADD SERVER FD TO ACTIVE SET %d", fd);
FD_SET(fd, &uipc_main.active_set);
uipc_main.max_fd = MAX(uipc_main.max_fd, fd);
@@ -386,14 +386,14 @@
while (1)
{
ret = poll(&pfd, 1, 1);
- BTIF_TRACE_EVENT3("uipc_flush_ch_locked polling : fd %d, rxev %x, ret %d", pfd.fd, pfd.revents, ret);
+ BTIF_TRACE_EVENT("uipc_flush_ch_locked polling : fd %d, rxev %x, ret %d", pfd.fd, pfd.revents, ret);
if (pfd.revents & (POLLERR|POLLHUP))
return;
if (ret <= 0)
{
- BTIF_TRACE_EVENT1("uipc_flush_ch_locked : error (%d)", ret);
+ BTIF_TRACE_EVENT("uipc_flush_ch_locked : error (%d)", ret);
return;
}
read(pfd.fd, &buf, 1);
@@ -423,14 +423,14 @@
{
int wakeup = 0;
- BTIF_TRACE_EVENT1("CLOSE CHANNEL %d", ch_id);
+ BTIF_TRACE_EVENT("CLOSE CHANNEL %d", ch_id);
if (ch_id >= UIPC_CH_NUM)
return -1;
if (uipc_main.ch[ch_id].srvfd != UIPC_DISCONNECTED)
{
- BTIF_TRACE_EVENT1("CLOSE SERVER (FD %d)", uipc_main.ch[ch_id].srvfd);
+ BTIF_TRACE_EVENT("CLOSE SERVER (FD %d)", uipc_main.ch[ch_id].srvfd);
close(uipc_main.ch[ch_id].srvfd);
FD_CLR(uipc_main.ch[ch_id].srvfd, &uipc_main.active_set);
uipc_main.ch[ch_id].srvfd = UIPC_DISCONNECTED;
@@ -439,7 +439,7 @@
if (uipc_main.ch[ch_id].fd != UIPC_DISCONNECTED)
{
- BTIF_TRACE_EVENT1("CLOSE CONNECTION (FD %d)", uipc_main.ch[ch_id].fd);
+ BTIF_TRACE_EVENT("CLOSE CONNECTION (FD %d)", uipc_main.ch[ch_id].fd);
close(uipc_main.ch[ch_id].fd);
FD_CLR(uipc_main.ch[ch_id].fd, &uipc_main.active_set);
uipc_main.ch[ch_id].fd = UIPC_DISCONNECTED;
@@ -462,7 +462,7 @@
{
if (uipc_main.ch[ch_id].srvfd == UIPC_DISCONNECTED)
{
- BTIF_TRACE_EVENT1("CHANNEL %d ALREADY CLOSED", ch_id);
+ BTIF_TRACE_EVENT("CHANNEL %d ALREADY CLOSED", ch_id);
return;
}
@@ -488,12 +488,12 @@
if (result == 0)
{
- BTIF_TRACE_EVENT0("select timeout");
+ BTIF_TRACE_EVENT("select timeout");
continue;
}
else if (result < 0)
{
- BTIF_TRACE_EVENT1("select failed %s", strerror(errno));
+ BTIF_TRACE_EVENT("select failed %s", strerror(errno));
continue;
}
@@ -518,13 +518,13 @@
UIPC_UNLOCK();
}
- BTIF_TRACE_EVENT0("UIPC READ THREAD EXITING");
+ BTIF_TRACE_EVENT("UIPC READ THREAD EXITING");
uipc_main_cleanup();
uipc_main.tid = 0;
- BTIF_TRACE_EVENT0("UIPC READ THREAD DONE");
+ BTIF_TRACE_EVENT("UIPC READ THREAD DONE");
}
@@ -534,7 +534,7 @@
if (pthread_create(&uipc_main.tid, (const pthread_attr_t *) NULL, (void*)uipc_read_task, NULL) < 0)
{
- BTIF_TRACE_ERROR1("uipc_thread_create pthread_create failed:%d", errno);
+ BTIF_TRACE_ERROR("uipc_thread_create pthread_create failed:%d", errno);
return -1;
}
@@ -569,7 +569,7 @@
{
UNUSED(p_data);
- BTIF_TRACE_DEBUG0("UIPC_Init");
+ BTIF_TRACE_DEBUG("UIPC_Init");
memset(&uipc_main, 0, sizeof(tUIPC_MAIN));
@@ -589,7 +589,7 @@
*******************************************************************************/
UDRV_API BOOLEAN UIPC_Open(tUIPC_CH_ID ch_id, tUIPC_RCV_CBACK *p_cback)
{
- BTIF_TRACE_DEBUG2("UIPC_Open : ch_id %d, p_cback %x", ch_id, p_cback);
+ BTIF_TRACE_DEBUG("UIPC_Open : ch_id %d, p_cback %x", ch_id, p_cback);
UIPC_LOCK();
@@ -601,7 +601,7 @@
if (uipc_main.ch[ch_id].srvfd != UIPC_DISCONNECTED)
{
- BTIF_TRACE_EVENT1("CHANNEL %d ALREADY OPEN", ch_id);
+ BTIF_TRACE_EVENT("CHANNEL %d ALREADY OPEN", ch_id);
UIPC_UNLOCK();
return 0;
}
@@ -634,7 +634,7 @@
UDRV_API void UIPC_Close(tUIPC_CH_ID ch_id)
{
- BTIF_TRACE_DEBUG1("UIPC_Close : ch_id %d", ch_id);
+ BTIF_TRACE_DEBUG("UIPC_Close : ch_id %d", ch_id);
/* special case handling uipc shutdown */
if (ch_id != UIPC_CH_ID_ALL)
@@ -645,9 +645,9 @@
}
else
{
- BTIF_TRACE_DEBUG0("UIPC_Close : waiting for shutdown to complete");
+ BTIF_TRACE_DEBUG("UIPC_Close : waiting for shutdown to complete");
uipc_stop_main_server_thread();
- BTIF_TRACE_DEBUG0("UIPC_Close : shutdown complete");
+ BTIF_TRACE_DEBUG("UIPC_Close : shutdown complete");
}
}
@@ -665,7 +665,7 @@
{
UNUSED(p_msg);
- BTIF_TRACE_DEBUG1("UIPC_SendBuf : ch_id %d NOT IMPLEMENTED", ch_id);
+ BTIF_TRACE_DEBUG("UIPC_SendBuf : ch_id %d NOT IMPLEMENTED", ch_id);
UIPC_LOCK();
@@ -691,13 +691,13 @@
int n;
UNUSED(msg_evt);
- BTIF_TRACE_DEBUG2("UIPC_Send : ch_id:%d %d bytes", ch_id, msglen);
+ BTIF_TRACE_DEBUG("UIPC_Send : ch_id:%d %d bytes", ch_id, msglen);
UIPC_LOCK();
if (write(uipc_main.ch[ch_id].fd, p_buf, msglen) < 0)
{
- BTIF_TRACE_ERROR1("failed to write (%s)", strerror(errno));
+ BTIF_TRACE_ERROR("failed to write (%s)", strerror(errno));
}
UIPC_UNLOCK();
@@ -718,7 +718,7 @@
{
UNUSED(p_msg);
- BTIF_TRACE_DEBUG1("UIPC_ReadBuf : ch_id:%d NOT IMPLEMENTED", ch_id);
+ BTIF_TRACE_DEBUG("UIPC_ReadBuf : ch_id:%d NOT IMPLEMENTED", ch_id);
UIPC_LOCK();
UIPC_UNLOCK();
@@ -744,17 +744,17 @@
if (ch_id >= UIPC_CH_NUM)
{
- BTIF_TRACE_ERROR1("UIPC_Read : invalid ch id %d", ch_id);
+ BTIF_TRACE_ERROR("UIPC_Read : invalid ch id %d", ch_id);
return 0;
}
if (fd == UIPC_DISCONNECTED)
{
- BTIF_TRACE_ERROR1("UIPC_Read : channel %d closed", ch_id);
+ BTIF_TRACE_ERROR("UIPC_Read : channel %d closed", ch_id);
return 0;
}
- //BTIF_TRACE_DEBUG4("UIPC_Read : ch_id %d, len %d, fd %d, polltmo %d", ch_id, len,
+ //BTIF_TRACE_DEBUG("UIPC_Read : ch_id %d, len %d, fd %d, polltmo %d", ch_id, len,
// fd, uipc_main.ch[ch_id].read_poll_tmo_ms);
while (n_read < (int)len)
@@ -766,15 +766,15 @@
a read for more than poll timeout */
if (poll(&pfd, 1, uipc_main.ch[ch_id].read_poll_tmo_ms) == 0)
{
- BTIF_TRACE_EVENT1("poll timeout (%d ms)", uipc_main.ch[ch_id].read_poll_tmo_ms);
+ BTIF_TRACE_EVENT("poll timeout (%d ms)", uipc_main.ch[ch_id].read_poll_tmo_ms);
break;
}
- //BTIF_TRACE_EVENT1("poll revents %x", pfd.revents);
+ //BTIF_TRACE_EVENT("poll revents %x", pfd.revents);
if (pfd.revents & (POLLHUP|POLLNVAL) )
{
- BTIF_TRACE_EVENT0("poll : channel detached remotely");
+ BTIF_TRACE_EVENT("poll : channel detached remotely");
UIPC_LOCK();
uipc_close_locked(ch_id);
UIPC_UNLOCK();
@@ -783,11 +783,11 @@
n = recv(fd, p_buf+n_read, len-n_read, 0);
- //BTIF_TRACE_EVENT1("read %d bytes", n);
+ //BTIF_TRACE_EVENT("read %d bytes", n);
if (n == 0)
{
- BTIF_TRACE_EVENT0("UIPC_Read : channel detached remotely");
+ BTIF_TRACE_EVENT("UIPC_Read : channel detached remotely");
UIPC_LOCK();
uipc_close_locked(ch_id);
UIPC_UNLOCK();
@@ -796,7 +796,7 @@
if (n < 0)
{
- BTIF_TRACE_EVENT1("UIPC_Read : read failed (%s)", strerror(errno));
+ BTIF_TRACE_EVENT("UIPC_Read : read failed (%s)", strerror(errno));
return 0;
}
@@ -819,7 +819,7 @@
UDRV_API extern BOOLEAN UIPC_Ioctl(tUIPC_CH_ID ch_id, UINT32 request, void *param)
{
- BTIF_TRACE_DEBUG2("#### UIPC_Ioctl : ch_id %d, request %d ####", ch_id, request);
+ BTIF_TRACE_DEBUG("#### UIPC_Ioctl : ch_id %d, request %d ####", ch_id, request);
UIPC_LOCK();
@@ -830,7 +830,7 @@
break;
case UIPC_REG_CBACK:
- //BTIF_TRACE_EVENT3("register callback ch %d srvfd %d, fd %d", ch_id, uipc_main.ch[ch_id].srvfd, uipc_main.ch[ch_id].fd);
+ //BTIF_TRACE_EVENT("register callback ch %d srvfd %d, fd %d", ch_id, uipc_main.ch[ch_id].srvfd, uipc_main.ch[ch_id].fd);
uipc_main.ch[ch_id].cback = (tUIPC_RCV_CBACK*)param;
break;
@@ -849,11 +849,11 @@
case UIPC_SET_READ_POLL_TMO:
uipc_main.ch[ch_id].read_poll_tmo_ms = (int)param;
- BTIF_TRACE_EVENT2("UIPC_SET_READ_POLL_TMO : CH %d, TMO %d ms", ch_id, uipc_main.ch[ch_id].read_poll_tmo_ms );
+ BTIF_TRACE_EVENT("UIPC_SET_READ_POLL_TMO : CH %d, TMO %d ms", ch_id, uipc_main.ch[ch_id].read_poll_tmo_ms );
break;
default:
- BTIF_TRACE_EVENT1("UIPC_Ioctl : request not handled (%d)", request);
+ BTIF_TRACE_EVENT("UIPC_Ioctl : request not handled (%d)", request);
break;
}
diff --git a/vnd/ble/bta_vendor.c b/vnd/ble/bta_vendor.c
index 3b41aa4..3201c0b 100644
--- a/vnd/ble/bta_vendor.c
+++ b/vnd/ble/bta_vendor.c
@@ -133,7 +133,7 @@
{
BOOLEAN st = TRUE;
- APPL_TRACE_EVENT1("bta_vendor_evt_hdlr :0x%04x", event);
+ APPL_TRACE_EVENT("bta_vendor_evt_hdlr :0x%04x", event);
switch (event)
{
@@ -148,7 +148,7 @@
#endif
default:
- APPL_TRACE_EVENT1("Unknown BTA VS event: %d", event);
+ APPL_TRACE_EVENT("Unknown BTA VS event: %d", event);
st = FALSE;
break;
}
@@ -295,7 +295,7 @@
*******************************************************************************/
void BTA_BrcmInit (void)
{
- APPL_TRACE_API0("BTA_BrcmInit");
+ APPL_TRACE_API("BTA_BrcmInit");
bta_sys_cb.p_vs_evt_hdlr = bta_vendor_evt_hdlr;
#if BLE_INCLUDED == TRUE && BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
btm_ble_vendor_init();