From afa71c7e53b5277ba7e16a5a3963a75d6cda768b Mon Sep 17 00:00:00 2001 From: Jakub Pyszczak Date: Wed, 5 May 2021 12:58:41 +0200 Subject: [PATCH] [EGD-6051] Receiving notifications on bt Any notification could be heard via bt audio device while it's connected to the pure. If any notification is being played and bt device would disconnect, playback will be stopped. Disabled bluetooth low power as it was causing issues with the playback. JIRA for the low power bug https://appnroll.atlassian.net/browse/EGD-6681 . --- module-bluetooth/Bluetooth/btstack_config.h | 2 +- module-services/service-audio/ServiceAudio.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/module-bluetooth/Bluetooth/btstack_config.h b/module-bluetooth/Bluetooth/btstack_config.h index 6c57b2ababf555e7f8f7407ecc156c3af6ef87fb..6d2004313627e35a3c41cf16fa754f0163f453f6 100644 --- a/module-bluetooth/Bluetooth/btstack_config.h +++ b/module-bluetooth/Bluetooth/btstack_config.h @@ -35,7 +35,7 @@ #define ENABLE_LOG_DEBUG #define ENABLE_SCO_OVER_HCI #define ENABLE_SDP_DES_DUMP -#define ENABLE_EHCILL +// #define ENABLE_EHCILL // BTstack configuration. buffers, sizes, ... #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy diff --git a/module-services/service-audio/ServiceAudio.cpp b/module-services/service-audio/ServiceAudio.cpp index 9d5b47e2b057c8f7b71aa686267a90c2fd2d70ad..27c9f02268edfa6e89aec6d32d86601a91d3b747 100644 --- a/module-services/service-audio/ServiceAudio.cpp +++ b/module-services/service-audio/ServiceAudio.cpp @@ -364,6 +364,12 @@ std::unique_ptr ServiceAudio::HandleSendEvent(std::shared_ if (newState != bluetoothConnected) { LOG_DEBUG("Bluetooth connection status changed: %s", newState ? "connected" : "disconnected"); bluetoothConnected = newState; + HandleStop({audio::PlaybackType::Alarm, + audio::PlaybackType::CallRingtone, + audio::PlaybackType::Meditation, + audio::PlaybackType::Notifications, + audio::PlaybackType::TextMessageRingtone}, + audio::Token()); } }