summaryrefslogtreecommitdiff
path: root/system/audio_hal_interface/aidl/a2dp_encoding.cc
diff options
context:
space:
mode:
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