summaryrefslogtreecommitdiff
path: root/bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp
diff options
context:
space:
mode:
authorChen Chen <cncn@google.com>2022-02-14 18:29:52 -0800
committerChen Chen <cncn@google.com>2022-02-15 15:20:29 -0800
commitc92270e1d65af7fb173da090e8801ae6401f1812 (patch)
tree1a7ef1939954065d67b86b4dbcd298360d58d5b4 /bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp
parentb66f1308ac19476466411cc4b49e001cac570d57 (diff)
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. Test: build Bug: 214615268 Tag: #feature Change-Id: I895a7fc6dd5d1567dce64ddcf967550f5cac882b
Diffstat (limited to 'bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp')
-rw-r--r--bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp b/bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp
index 5a413e07a8..d2f58f345b 100644
--- a/bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp
@@ -61,7 +61,10 @@ bool A2dpSoftwareAudioProvider::isValid(const SessionType& sessionType) {
ndk::ScopedAStatus A2dpSoftwareAudioProvider::startSession(
const std::shared_ptr<IBluetoothAudioPort>& host_if,
- const AudioConfiguration& audio_config, DataMQDesc* _aidl_return) {
+ const AudioConfiguration& audio_config,
+ const std::vector<LatencyMode>& latency_modes,
+ DataMQDesc* _aidl_return) {
+ latency_modes_ = latency_modes;
if (audio_config.getTag() != AudioConfiguration::pcmConfig) {
LOG(WARNING) << __func__ << " - Invalid Audio Configuration="
<< audio_config.toString();
@@ -77,8 +80,8 @@ ndk::ScopedAStatus A2dpSoftwareAudioProvider::startSession(
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
- return BluetoothAudioProvider::startSession(host_if, audio_config,
- _aidl_return);
+ return BluetoothAudioProvider::startSession(
+ host_if, audio_config, latency_modes, _aidl_return);
}
ndk::ScopedAStatus A2dpSoftwareAudioProvider::onSessionReady(