项目需求,可能考虑到通话时打开anc assist会增加功耗,会续航会有影响,那么我们初步的设想就是通话时关闭anc assist,通话结束根据anc状态打开anc assist
config\best2300a_ibrt_anc\target.mk
KBUILD_CPPFLAGS += \
-DCLOSE_ANC_ASSIST_FOR_TALK
通话时关闭抗风噪功能
services\bt_app\app_hfp.cpp
static void hfp_audio_connected_handler(hf_chan_handle_t chan, struct hfp_context *ctx)
{
#if defined(CLOSE_ANC_ASSIST_FOR_TALK)
#if defined(ANC_ASSIST_ENABLED)
app_anc_assist_close(ANC_ASSIST_USER_ANC);
#endif
#endif
#ifdef __BT_ONE_BRING_TWO__
enum BT_DEVICE_ID_T anotherDevice = (BT_DEVICE_ID_1 == chan_id_flag.id)?BT_DEVICE_ID_2:BT_DEVICE_ID_1;
#endif
#if defined(HFP_1_6_ENABLE)
hf_chan_handle_t chan_tmp;
#endif
#ifdef __AI_VOICE__
ai_function_handle(CALLBACK_STOP_SPEECH, NULL, 0);
ai_function_handle(CALLBACK_AI_APP_KEEPALIVE_POST_HANDLER, NULL, 0); // check
#endif
if(ctx-&g