libaudiohal: Implement retrieval of APM configuration
Add the following interface methods:
- DevicesFactoryHalInterface::getDeviceNames
- DevicesFactoryHalInterface::getSurroundSoundConfig
- DevicesFactoryHalInterface::getEngineConfig
- DeviceHalInterface::getAudioPorts
- DeviceHalInterface::getAudioRoutes
These methods are implemented for the AIDL adapter.
The HIDL adapter does not implement them, and this is
how the framework will know that it needs to fall back
to use the XML config.
Bug: 205884982
Test: m
Change-Id: Iaab5dfa00587b5db6c9cb472dcec6a8e3f6417e0
diff --git a/media/libaudiohal/impl/DevicesFactoryHalAidl.h b/media/libaudiohal/impl/DevicesFactoryHalAidl.h
index cb627bc..21957bc 100644
--- a/media/libaudiohal/impl/DevicesFactoryHalAidl.h
+++ b/media/libaudiohal/impl/DevicesFactoryHalAidl.h
@@ -26,7 +26,9 @@
{
public:
explicit DevicesFactoryHalAidl(
- std::shared_ptr<::aidl::android::hardware::audio::core::IConfig> iConfig);
+ std::shared_ptr<::aidl::android::hardware::audio::core::IConfig> config);
+
+ status_t getDeviceNames(std::vector<std::string> *names) override;
// Opens a device with the specified name. To close the device, it is
// necessary to release references to the returned object.
@@ -38,8 +40,12 @@
android::detail::AudioHalVersionInfo getHalVersion() const override;
+ status_t getSurroundSoundConfig(media::SurroundSoundConfig *config) override;
+
+ status_t getEngineConfig(media::audio::common::AudioHalEngineConfig *config) override;
+
private:
- const std::shared_ptr<::aidl::android::hardware::audio::core::IConfig> mIConfig;
+ const std::shared_ptr<::aidl::android::hardware::audio::core::IConfig> mConfig;
~DevicesFactoryHalAidl() = default;
};