LeAudio/multicodec: Fix the async data path getter API
Just like the returned data path configurations are split for each direction,
the function arguments should also have the directional context. The vendor
module might need to know which connection handles in the stream map are for
the sink and which are for the source direction, to provide the proper
data path configurations for each direction.
Bug: 308428217
Bug: 307258939
Test: m android.hardware.bluetooth.audio-update-api
Change-Id: I270b6f4631869e2180580c886f0b58bd777d2123
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp b/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
index bdba898..8d03fae 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
@@ -229,14 +229,17 @@
};
ndk::ScopedAStatus BluetoothAudioProvider::getLeAudioAseDatapathConfiguration(
- const ::aidl::android::hardware::bluetooth::audio::AudioContext& in_context,
- const std::vector<::aidl::android::hardware::bluetooth::audio::
- LeAudioConfiguration::StreamMap>& in_streamMap,
+ const std::optional<::aidl::android::hardware::bluetooth::audio::
+ IBluetoothAudioProvider::StreamConfig>&
+ in_sinkConfig,
+ const std::optional<::aidl::android::hardware::bluetooth::audio::
+ IBluetoothAudioProvider::StreamConfig>&
+ in_sourceConfig,
::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
LeAudioDataPathConfigurationPair* _aidl_return) {
/* TODO: Implement */
- (void)in_context;
- (void)in_streamMap;
+ (void)in_sinkConfig;
+ (void)in_sourceConfig;
(void)_aidl_return;
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProvider.h b/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
index 5064869..2c21440 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
@@ -71,10 +71,12 @@
::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
LeAudioAseQosConfigurationPair* _aidl_return) override;
ndk::ScopedAStatus getLeAudioAseDatapathConfiguration(
- const ::aidl::android::hardware::bluetooth::audio::AudioContext&
- in_context,
- const std::vector<::aidl::android::hardware::bluetooth::audio::
- LeAudioConfiguration::StreamMap>& in_streamMap,
+ const std::optional<::aidl::android::hardware::bluetooth::audio::
+ IBluetoothAudioProvider::StreamConfig>&
+ in_sinkConfig,
+ const std::optional<::aidl::android::hardware::bluetooth::audio::
+ IBluetoothAudioProvider::StreamConfig>&
+ in_sourceConfig,
::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
LeAudioDataPathConfigurationPair* _aidl_return) override;
ndk::ScopedAStatus onSinkAseMetadataChanged(