summaryrefslogtreecommitdiff
path: root/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
diff options
context:
space:
mode:
Diffstat (limited to 'bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h')
-rw-r--r--bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h b/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
index 451a31fb7e..5b838b0b3f 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
+++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
@@ -98,11 +98,12 @@ class BluetoothAudioSessionControl {
stop
* stream, to check position, and to update metadata.
***/
- static bool StartStream(const SessionType& session_type) {
+ static bool StartStream(const SessionType& session_type,
+ bool low_latency = false) {
std::shared_ptr<BluetoothAudioSession> session_ptr =
BluetoothAudioSessionInstance::GetSessionInstance(session_type);
if (session_ptr != nullptr) {
- return session_ptr->StartStream();
+ return session_ptr->StartStream(low_latency);
}
return false;
}
@@ -154,6 +155,25 @@ class BluetoothAudioSessionControl {
}
}
+ static std::vector<LatencyMode> GetSupportedLatencyModes(
+ const SessionType& session_type) {
+ std::shared_ptr<BluetoothAudioSession> session_ptr =
+ BluetoothAudioSessionInstance::GetSessionInstance(session_type);
+ if (session_ptr != nullptr) {
+ return session_ptr->GetSupportedLatencyModes();
+ }
+ return std::vector<LatencyMode>();
+ }
+
+ static void SetLatencyMode(const SessionType& session_type,
+ const LatencyMode& latency_mode) {
+ std::shared_ptr<BluetoothAudioSession> session_ptr =
+ BluetoothAudioSessionInstance::GetSessionInstance(session_type);
+ if (session_ptr != nullptr) {
+ session_ptr->SetLatencyMode(latency_mode);
+ }
+ }
+
/***
* The control API writes stream to FMQ
***/
@@ -185,4 +205,4 @@ class BluetoothAudioSessionControl {
} // namespace bluetooth
} // namespace hardware
} // namespace android
-} // namespace aidl \ No newline at end of file
+} // namespace aidl