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
This commit is contained in:
Alice Kuo
2022-03-28 13:28:43 +08:00
parent 950b7b8026
commit adcceec9ad
11 changed files with 576 additions and 167 deletions

View File

@@ -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;