summaryrefslogtreecommitdiff
path: root/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
diff options
context:
space:
mode:
authorChen Chen <cncn@google.com>2022-02-16 19:38:24 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-02-16 19:38:24 +0000
commit5cde687f02d46c1a7b2dccd1548579ece9dd573a (patch)
treeb134951ee66ceaccdcfe069e9135b51676238205 /bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
parent0f7d41913658132823980112d6f704b6489396d2 (diff)
parentc92270e1d65af7fb173da090e8801ae6401f1812 (diff)
Merge "SpatialAudio: Set low latency allowed signal at startSession The logic is that to send FREE and LOW_LATENCY to audio at startSession, if bt receives setLowLatencyModeAllowed(true) before start session. If the parameter false, or bt doesn't receive the signal at all, then bt sends FREE to audio."
Diffstat (limited to 'bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp')
-rw-r--r--bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp b/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
index 8090d265a6..0dd814828c 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
@@ -34,11 +34,15 @@ BluetoothAudioProvider::BluetoothAudioProvider() {
ndk::ScopedAStatus BluetoothAudioProvider::startSession(
const std::shared_ptr<IBluetoothAudioPort>& host_if,
- const AudioConfiguration& audio_config, DataMQDesc* _aidl_return) {
+ const AudioConfiguration& audio_config,
+ const std::vector<LatencyMode>& latencyModes,
+ DataMQDesc* _aidl_return) {
if (host_if == nullptr) {
*_aidl_return = DataMQDesc();
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
+
+ latency_modes_ = latencyModes;
audio_config_ = std::make_unique<AudioConfiguration>(audio_config);
stack_iface_ = host_if;