diff options
author | Alice Kuo <aliceypkuo@google.com> | 2022-03-28 13:28:43 +0800 |
---|---|---|
committer | Alice Kuo <aliceypkuo@google.com> | 2022-03-29 15:09:50 +0800 |
commit | adcceec9ad9734941cb5fa8b2783833927d53818 (patch) | |
tree | 3263b7d2da2a227b3f1de902ef866ca1c0da1ddc /bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp | |
parent | 950b7b802616756666ddae9909686107c6309f62 (diff) |
Add A2dp decode software and offload session type
1. Add the interface
2. Add the default implementation
3. Add VTS
Bug: 206601670
Test: atest VtsHalBluetoothAudioTargetTest
Change-Id: I54d8037eeb09312c9f1fb75d2167cc50ac7cae8c
Diffstat (limited to 'bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp')
-rw-r--r-- | bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp b/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp index 8fd1ab5cae..fc54c70158 100644 --- a/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp +++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp @@ -323,7 +323,8 @@ BluetoothAudioCodecs::GetSoftwarePcmCapabilities() { std::vector<CodecCapabilities> BluetoothAudioCodecs::GetA2dpOffloadCodecCapabilities( const SessionType& session_type) { - if (session_type != SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH) { + if (session_type != SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH && + session_type != SessionType::A2DP_HARDWARE_OFFLOAD_DECODING_DATAPATH) { return {}; } std::vector<CodecCapabilities> offload_a2dp_codec_capabilities = @@ -389,7 +390,8 @@ bool BluetoothAudioCodecs::IsSoftwarePcmConfigurationValid( bool BluetoothAudioCodecs::IsOffloadCodecConfigurationValid( const SessionType& session_type, const CodecConfiguration& codec_config) { - if (session_type != SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH) { + if (session_type != SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH && + session_type != SessionType::A2DP_HARDWARE_OFFLOAD_DECODING_DATAPATH) { LOG(ERROR) << __func__ << ": Invalid SessionType=" << toString(session_type); return false; |