Skip to content

Commit 8713de3

Browse files
committed
fix(bt/bluedroid): fix hfp ag external codec datapath issue
Closes #17480
1 parent 53f96d8 commit 8713de3

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

components/bt/host/bluedroid/bta/hf_ag/bta_ag_sco.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,8 @@ static void bta_ag_sco_read_cback(UINT16 sco_inx, BT_HDR *p_data, tBTM_SCO_DATA_
345345
APPL_TRACE_DEBUG("bta_ag_sco_read_cback: status(%d)", status);
346346
}
347347

348-
#if (BTA_HFP_EXT_CODEC == FALSE)
349348
/* Callout function must free the data. */
350349
bta_ag_sco_co_in_data(p_data, status);
351-
#endif
352350
}
353351
#endif
354352
/*******************************************************************************

components/bt/host/bluedroid/btc/profile/std/hf_ag/bta_ag_co.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,8 @@ uint32_t bta_ag_sco_co_out_data(UINT8 *p_buf)
567567
return 0;
568568
}
569569

570+
#endif
571+
570572
/*******************************************************************************
571573
**
572574
** Function bta_ag_sco_co_in_data
@@ -618,7 +620,6 @@ void bta_ag_sco_co_in_data(BT_HDR *p_buf, tBTM_SCO_DATA_FLAG status)
618620
}
619621
btc_hf_audio_data_cb_to_app((uint8_t *)p_new_buf, (uint8_t *)p_data, BTM_MSBC_FRAME_SIZE, bta_ag_co_cb.is_bad_frame);
620622
bta_ag_co_cb.is_bad_frame = false;
621-
memset(bta_ag_co_cb.decode_msbc_data, 0, BTM_MSBC_FRAME_SIZE);
622623
}
623624
bta_ag_co_cb.rx_first_pkt = !bta_ag_co_cb.rx_first_pkt;
624625
}
@@ -684,7 +685,6 @@ void bta_ag_sco_co_in_data(BT_HDR *p_buf, tBTM_SCO_DATA_FLAG status)
684685
osi_free(p_buf);
685686
#endif
686687
}
687-
#endif
688688

689689
#endif /* #if (BTM_SCO_HCI_INCLUDED == TRUE) */
690690
#endif /* #if (BTA_AG_INCLUDED == TRUE) */

0 commit comments

Comments
 (0)