summaryrefslogtreecommitdiff
path: root/system/audio_hal_interface/aidl/a2dp_encoding.cc
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2022-03-11 19:27:17 +0000
committerScott Lobdell <slobdell@google.com>2022-03-11 19:57:09 +0000
commitc9218ef1b82430a07d94f74c212a30e7ccc52975 (patch)
tree241b7fdeb6bdf1cf3af925ba8996f18faa8973d9 /system/audio_hal_interface/aidl/a2dp_encoding.cc
parenta26bda4d37221f2f7ef750b413502091e3bcddd4 (diff)
parent480d2270b269a0e47bf475eb439111f3f966e2a9 (diff)
Merge TP1A.220225.003
Change-Id: Id71ac466dbfe3707fe2e544ce22b1da8f474ec2b
Diffstat (limited to 'system/audio_hal_interface/aidl/a2dp_encoding.cc')
-rw-r--r--system/audio_hal_interface/aidl/a2dp_encoding.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/audio_hal_interface/aidl/a2dp_encoding.cc b/system/audio_hal_interface/aidl/a2dp_encoding.cc
index 551398c00d..da1cb432d6 100644
--- a/system/audio_hal_interface/aidl/a2dp_encoding.cc
+++ b/system/audio_hal_interface/aidl/a2dp_encoding.cc
@@ -208,6 +208,7 @@ uint16_t remote_delay = 0;
bool btaudio_a2dp_disabled = false;
bool is_configured = false;
+bool is_low_latency_mode_allowed = false;
BluetoothAudioCtrlAck a2dp_ack_to_bt_audio_ctrl_ack(tA2DP_CTRL_ACK ack) {
switch (ack) {
@@ -470,6 +471,7 @@ void start_session() {
LOG(ERROR) << __func__ << ": BluetoothAudio HAL is not enabled";
return;
}
+ active_hal_interface->SetLowLatencyModeAllowed(is_low_latency_mode_allowed);
active_hal_interface->StartSession();
}
@@ -552,6 +554,16 @@ void set_remote_delay(uint16_t delay_report) {
->SetRemoteDelay(delay_report);
}
+// Set low latency buffer mode allowed or disallowed
+void set_low_latency_mode_allowed(bool allowed) {
+ is_low_latency_mode_allowed = allowed;
+ if (!is_hal_enabled()) {
+ LOG(ERROR) << __func__ << ": BluetoothAudio HAL is not enabled";
+ return;
+ }
+ active_hal_interface->SetLowLatencyModeAllowed(allowed);
+}
+
} // namespace a2dp
} // namespace aidl
} // namespace audio