diff options
author | Chen Chen <cncn@google.com> | 2022-02-11 00:53:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-02-11 00:53:24 +0000 |
commit | 9e09eec46bba14859fb0924c1c00cff827c8b682 (patch) | |
tree | c185a3882ce96c9d8f5f05c3ee9c0008cadbfa2c /bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp | |
parent | 3e8d4a1e8e65f8695a1c031a2da561ac59699aa9 (diff) | |
parent | 81f38e55c1916d4e08f40bd8b68492011df839bb (diff) |
Merge "Spatial Audio: Implement setLowLatencyAllowed functions in BluetoothAudioSession"
Diffstat (limited to 'bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp')
-rw-r--r-- | bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp index dd29011625..967b6f3825 100644 --- a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp +++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp @@ -416,6 +416,22 @@ void BluetoothAudioSession::ReportControlStatus(bool start_resp, } } +void BluetoothAudioSession::ReportLowLatencyModeAllowedChanged(bool allowed) { + std::lock_guard<std::recursive_mutex> guard(mutex_); + if (observers_.empty()) { + LOG(WARNING) << __func__ << " - SessionType=" << toString(session_type_) + << " has NO port state observer"; + return; + } + for (auto& observer : observers_) { + uint16_t cookie = observer.first; + std::shared_ptr<PortStatusCallbacks> callback = observer.second; + LOG(INFO) << __func__ << " - allowed=" + << allowed ? " allowed" : " disallowed"; + callback->low_latency_mode_allowed_cb_(cookie, allowed); + } +} + bool BluetoothAudioSession::GetPresentationPosition( PresentationPosition& presentation_position) { std::lock_guard<std::recursive_mutex> guard(mutex_); |