From eac56539adf766177bfdc3226c8e101c2446078e Mon Sep 17 00:00:00 2001 From: Milanka Ringwald Date: Tue, 20 Apr 2021 16:15:04 +0200 Subject: [PATCH] hfp_hf: emit HFP_SUBEVENT_IN_BAND_RING_TONE event --- src/classic/hfp_hf.c | 2 ++ test/pts/hfp_hf_test.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/classic/hfp_hf.c b/src/classic/hfp_hf.c index 699d279f6..248ef29ff 100644 --- a/src/classic/hfp_hf.c +++ b/src/classic/hfp_hf.c @@ -1115,6 +1115,8 @@ static void hfp_hf_handle_rfcomm_command(hfp_connection_t * hfp_connection){ hfp_connection->command = HFP_CMD_NONE; hfp_hf_handle_suggested_codec(hfp_connection); break; + case HFP_CMD_CHANGE_IN_BAND_RING_TONE_SETTING: + hfp_emit_event(hfp_connection, HFP_SUBEVENT_IN_BAND_RING_TONE, get_bit(hfp_connection->remote_supported_features, HFP_AGSF_IN_BAND_RING_TONE)); default: break; } diff --git a/test/pts/hfp_hf_test.c b/test/pts/hfp_hf_test.c index 576d180a1..5a4e194df 100644 --- a/test/pts/hfp_hf_test.c +++ b/test/pts/hfp_hf_test.c @@ -464,6 +464,10 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * even case HCI_EVENT_HFP_META: switch (hci_event_hfp_meta_get_subevent_code(event)) { + case HFP_SUBEVENT_IN_BAND_RING_TONE: + printf("IN_BAND_RING_TONE status %d\n", hfp_subevent_in_band_ring_tone_get_status(event)); + break; + case HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED: acl_handle = hfp_subevent_service_level_connection_established_get_acl_handle(event); hfp_subevent_service_level_connection_established_get_bd_addr(event, device_addr);