--- profiles/audio/hfp-hf.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/profiles/audio/hfp-hf.c b/profiles/audio/hfp-hf.c index 287523f28..5e3c9fcba 100644 --- a/profiles/audio/hfp-hf.c +++ b/profiles/audio/hfp-hf.c @@ -407,6 +407,26 @@ static void cops_cb(struct hfp_context *context, void *user_data) telephony_set_operator_name(dev->telephony, name); } +static void clip_resp(enum hfp_result result, enum hfp_error cme_err, + void *user_data) +{ + struct hfp_device *dev = user_data; + + DBG(""); + + if (result != HFP_RESULT_OK) { + error("hf-client: CLIP error: %d", result); + return; + } + + if ((dev->hfp_hf_features & HFP_HF_FEAT_ECNR) && + (dev->features & HFP_AG_FEAT_ECNR)) { + if (!hfp_hf_send_command(dev->hf, cmd_complete_cb, dev, + "AT+NREC=0")) + info("hf-client: Could not send AT+NREC=0"); + } +} + static void cops_status_resp(enum hfp_result result, enum hfp_error cme_err, void *user_data) { @@ -419,7 +439,7 @@ static void cops_status_resp(enum hfp_result result, enum hfp_error cme_err, return; } - if (!hfp_hf_send_command(dev->hf, cmd_complete_cb, dev, "AT+CLIP=1")) + if (!hfp_hf_send_command(dev->hf, clip_resp, dev, "AT+CLIP=1")) info("hf-client: Could not send AT+CLIP=1"); } -- 2.43.0