Always log TWS+ SCO state machine changes
Remove BTA_AG_SCO_DEBUG macro which is not
used. Always log TWS+ SCO state machine
changes to help debug SCO state machine
issues.
CRs-Fixed: 2598260
Change-Id: I47a01ea908b212d04231829afd8ff1b169625662
diff --git a/system_bt_ext/bta/tws_plus/ag/bta_ag_twsp_sco.cc b/system_bt_ext/bta/tws_plus/ag/bta_ag_twsp_sco.cc
index aee4c0c..849aa1c 100644
--- a/system_bt_ext/bta/tws_plus/ag/bta_ag_twsp_sco.cc
+++ b/system_bt_ext/bta/tws_plus/ag/bta_ag_twsp_sco.cc
@@ -60,10 +60,6 @@
#if (TWS_AG_ENABLED == TRUE)
-#ifndef BTA_AG_SCO_DEBUG
-#define BTA_AG_SCO_DEBUG FALSE
-#endif
-
void send_twsp_esco_setup (const RawAddress& left_eb_addr, const RawAddress& rght_eb_addr,
uint8_t selected_mic);
void print_bdaddr(const RawAddress& addr);
@@ -198,13 +194,11 @@
//PONTING TO SECONDARY sco cb
tBTA_AG_SCO_CB* p_sco = &bta_ag_cb.twsp_sec_sco;
tBTA_AG_SCB *other_scb = NULL;
-#if (BTA_AG_SCO_DEBUG == TRUE)
uint8_t in_state = p_sco->state;
-#endif
- APPL_TRACE_EVENT("%s: SCO Index 0x%04x, State %d, Event %d", __func__,
+ APPL_TRACE_IMP("%s: SCO Index 0x%04x, State %d, Event %d", __func__,
p_scb->sco_idx, p_sco->state, event);
- APPL_TRACE_EVENT("%s: TWS+ peer p_scb: %x", __func__, p_scb);
+ APPL_TRACE_IMP("%s: TWS+ peer p_scb: %x", __func__, p_scb);
switch (p_sco->state) {
case BTA_AG_SCO_SHUTDOWN_ST:
@@ -488,14 +482,12 @@
default:
break;
}
-#if (BTA_AG_SCO_DEBUG == TRUE)
if (p_sco->state != in_state) {
- APPL_TRACE_EVENT("BTA AG TWS SCO State Change: [%s] -> [%s] after Event [%s]",
+ APPL_TRACE_IMP("BTA AG TWS 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));
}
-#endif
}
void print_bdaddr(const RawAddress& addr) {