Codec Extensibility A2DP Specific AIDL
Test: m
Bug: 297037759
Change-Id: If9a73d2791781ad948ce76b55b9d29f7eba655e4
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp b/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
index f9b18f8..fe77d86 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
@@ -164,6 +164,42 @@
return ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus BluetoothAudioProvider::parseA2dpConfiguration(
+ const CodecId& codec_id, const std::vector<uint8_t>& configuration,
+ CodecParameters* codec_parameters, A2dpStatus* _aidl_return) {
+ if (stack_iface_ == nullptr) {
+ LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
+ << " has NO session";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+
+ *_aidl_return = A2dpStatus::OK;
+
+ (void)codec_id;
+ (void)configuration;
+ (void)codec_parameters;
+
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothAudioProvider::getA2dpConfiguration(
+ const std::vector<A2dpRemoteCapabilities>& remote_a2dp_capabilities,
+ const A2dpConfigurationHint& hint,
+ std::optional<audio::A2dpConfiguration>* _aidl_return) {
+ if (stack_iface_ == nullptr) {
+ LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
+ << " has NO session";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+
+ *_aidl_return = std::nullopt;
+
+ (void)remote_a2dp_capabilities;
+ (void)hint;
+
+ return ndk::ScopedAStatus::ok();
+}
+
} // namespace audio
} // namespace bluetooth
} // namespace hardware
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProvider.h b/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
index b6e07a1..27ab13f 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
@@ -50,6 +50,14 @@
const AudioConfiguration& audio_config);
ndk::ScopedAStatus setLowLatencyModeAllowed(bool allowed);
+ ndk::ScopedAStatus parseA2dpConfiguration(
+ const CodecId& codec_id, const std::vector<uint8_t>& configuration,
+ CodecParameters* codec_parameters, A2dpStatus* _aidl_return);
+ ndk::ScopedAStatus getA2dpConfiguration(
+ const std::vector<A2dpRemoteCapabilities>& remote_a2dp_capabilities,
+ const A2dpConfigurationHint& hint,
+ std::optional<audio::A2dpConfiguration>* _aidl_return);
+
virtual bool isValid(const SessionType& sessionType) = 0;
protected: