From 80702f974ddb5c630bf5dd81eed9f27699da2a0c Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 16 Mar 2022 10:37:51 +0100 Subject: [PATCH] hfp_ag: activate all AG indicators upon service level connection establishment --- CHANGELOG.md | 3 ++- src/classic/hfp_ag.c | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26fc875ec..73fa0319e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - GAP: support periodic advertising with ENABLE_LE_PERIODIC_ADVERTISING ### Fixed - +- HFP AG: activate all AG indicators upon service level connection establishment + ### Changed diff --git a/src/classic/hfp_ag.c b/src/classic/hfp_ag.c index 3619e7b7c..747a8eebb 100644 --- a/src/classic/hfp_ag.c +++ b/src/classic/hfp_ag.c @@ -648,7 +648,13 @@ static int codecs_exchange_state_machine(hfp_connection_t * hfp_connection){ static void hfp_ag_slc_established(hfp_connection_t * hfp_connection){ hfp_connection->state = HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED; hfp_emit_slc_connection_event(hfp_connection->local_role, 0, hfp_connection->acl_handle, hfp_connection->remote_addr); - + + // HFP 4.35: "When [...] a new Service Level Connection is established all indicators are activated by default." + uint16_t i; + for (i=0;iag_indicators_nr;i++){ + hfp_connection->ag_indicators[i].enabled = 1; + } + // if active call exist, set per-hfp_connection state active, too (when audio is on) if (hfp_gsm_call_status() == HFP_CALL_STATUS_ACTIVE_OR_HELD_CALL_IS_PRESENT){ hfp_connection->call_state = HFP_CALL_W4_AUDIO_CONNECTION_FOR_ACTIVE;