summaryrefslogtreecommitdiff
path: root/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2023-01-15 14:37:41 -0800
committerLinux Build Service Account <lnxbuild@localhost>2023-01-15 14:37:41 -0800
commit2bc41ae7df3e9f757055dbc9f48d745af725dac0 (patch)
tree142a3767bf6b65065cde85b8917a869ef74c4c6b /bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
parentf177343e18479a9420a73aa1a1be56cce1714253 (diff)
parent32336a56e5d1852850d84aea35ab584ed6ce84a2 (diff)
Merge 32336a56e5d1852850d84aea35ab584ed6ce84a2 on remote branch
Change-Id: I37ba79726c479d04e9162c56d714be12964d0ad5
Diffstat (limited to 'bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h')
-rw-r--r--bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h b/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
index 0782c824e1..881c6c10b2 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
+++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
@@ -95,6 +95,25 @@ class BluetoothAudioSessionControl {
}
/***
+ * The control API for the bluetooth_audio module to get current
+ * LE audio connection map
+ ***/
+ static const AudioConfiguration GetLeAudioConnectionMap(
+ const SessionType& session_type) {
+ std::shared_ptr<BluetoothAudioSession> session_ptr =
+ BluetoothAudioSessionInstance::GetSessionInstance(session_type);
+ if ((session_type ==
+ SessionType::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH ||
+ session_type ==
+ SessionType::LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH) &&
+ session_ptr != nullptr) {
+ return session_ptr->GetLeAudioConnectionMap();
+ }
+
+ return AudioConfiguration(LeAudioConfiguration{});
+ }
+
+ /***
* Those control APIs for the bluetooth_audio module to start / suspend /
stop
* stream, to check position, and to update metadata.