summaryrefslogtreecommitdiff
path: root/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
diff options
context:
space:
mode:
authorAlice Kuo <aliceypkuo@google.com>2022-03-30 00:05:53 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-03-30 00:05:53 +0000
commit67fa92a1e596b848f18a05edde4feaba0dc49deb (patch)
tree732cce8469b62c723ab97c73ef109c802c2744b7 /bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
parent0d0dc1e23bbfb9d4e4ff4d41cb995e4e1fe59e23 (diff)
parent0dac5667f56d63dae0a0f428ca666b18d4f14017 (diff)
Merge "Add A2dp decode software and offload session type" am: 0dac5667f5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2046263 Change-Id: I1a18b01b94e683bfcd9c7ecb8722804dcf9a2ad4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp')
-rw-r--r--bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp6
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;