libaudiohal@aidl: Implement microphone info retrieval
Implement DeviceHalAidl::getMicrophones and
StreamInHalAidl::getActiveMicrophones.
Bug: 205884982
Test: atest android.media.audio.cts.AudioRecordTest
Test: atest android.media.audio.cts.AudioManagerTest
(both w/AIDL enabled)
Change-Id: I4f07cd9b2273ab93d9d0cda1349a50730c30b528
diff --git a/media/libaudiohal/impl/StreamHalAidl.h b/media/libaudiohal/impl/StreamHalAidl.h
index 85efb35..157e8bb 100644
--- a/media/libaudiohal/impl/StreamHalAidl.h
+++ b/media/libaudiohal/impl/StreamHalAidl.h
@@ -334,6 +334,8 @@
status_t filterAndUpdateOffloadMetadata(AudioParameter ¶meters);
};
+class MicrophoneInfoProvider;
+
class StreamInHalAidl : public StreamInHalInterface, public StreamHalAidl {
public:
// Set the input gain for the audio driver.
@@ -369,11 +371,13 @@
legacy2aidl_SinkMetadata(const StreamInHalInterface::SinkMetadata& legacy);
const std::shared_ptr<::aidl::android::hardware::audio::core::IStreamIn> mStream;
+ const wp<MicrophoneInfoProvider> mMicInfoProvider;
// Can not be constructed directly by clients.
StreamInHalAidl(
const audio_config& config, StreamContextAidl&& context, int32_t nominalLatency,
- const std::shared_ptr<::aidl::android::hardware::audio::core::IStreamIn>& stream);
+ const std::shared_ptr<::aidl::android::hardware::audio::core::IStreamIn>& stream,
+ const sp<MicrophoneInfoProvider>& micInfoProvider);
~StreamInHalAidl() override = default;
};