diff options
author | Josh Wu <joshwu@google.com> | 2022-01-21 21:51:21 -0800 |
---|---|---|
committer | Josh Wu <joshwu@google.com> | 2022-01-23 08:30:13 -0800 |
commit | 75462aafb547968431e2413dd74aacfb079c0e6c (patch) | |
tree | b749a4c1aaa4e3409e43caff9343169fccb985dc /bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h | |
parent | b1ab40b8d66844f067ad45340a0fa666df031334 (diff) |
BtAudio: Improve LE offload compatability
Bug: 203490261
Test: m android.hardware.bluetooth.audio-V1-impl
Change-Id: I7dd37cb697b03bb5fe0bdc467f8e190575e0e2e1
Diffstat (limited to 'bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h')
-rw-r--r-- | bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h b/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h index a3ed42894c..aff01e5a26 100644 --- a/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h +++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioSessionControl.h @@ -79,11 +79,15 @@ class BluetoothAudioSessionControl { BluetoothAudioSessionInstance::GetSessionInstance(session_type); if (session_ptr != nullptr) { return session_ptr->GetAudioConfig(); - } else if (session_type == - SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH) { - return BluetoothAudioSession::invalidOffloadAudioConfiguration; - } else { - return BluetoothAudioSession::invalidSoftwareAudioConfiguration; + } + switch (session_type) { + case SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH: + return AudioConfiguration(CodecConfiguration{}); + case SessionType::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH: + case SessionType::LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH: + return AudioConfiguration(LeAudioConfiguration{}); + default: + return AudioConfiguration(PcmConfiguration{}); } } |