Add soft_audio_configuration_changed_cb_ to handle the streamMap changed
Based on the stream status and Bluetooth Audio Session to switch the
different configuration_changed_cb_ notifcation.
audio_configuration_changed_cb_ for the context type handover case
soft_audio_configuration_changed_cb_ for the streamMap changed during
media stream case
Bug: 231084798
Test: LE audio offload later join and disappear with downmix enable
Change-Id: I199c2b765b128875fb2c66abb1a500e4a6c820b7
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h b/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
index 0782c82..881c6c1 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
+++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h
@@ -95,6 +95,25 @@
}
/***
+ * 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.