diff options
author | Alice Kuo <aliceypkuo@google.com> | 2022-08-25 02:45:02 +0800 |
---|---|---|
committer | Alice Kuo <aliceypkuo@google.com> | 2022-09-20 19:50:59 +0800 |
commit | adeb7aa0e1fa5608ae41144fb0b056c0d3d274f6 (patch) | |
tree | 60b55c9305eca65e35697ca5da65dbc37b90db50 /bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h | |
parent | 8f4f7fbe6de40e24ca6521850e0316402170b05d (diff) |
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
Merged-In: I199c2b765b128875fb2c66abb1a500e4a6c820b7
(cherry picked from commit 851ef342ede367375ea46215cfdf3a449e7b8ef4)
Diffstat (limited to 'bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h')
-rw-r--r-- | bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h | 19 |
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. |