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
(cherry picked from https://android-review.googlesource.com/q/commit:f83b974f39b7e8ba61d201014d781eccd4c8b09a)
Merged-In: Iaab5dfa00587b5db6c9cb472dcec6a8e3f6417e0
Change-Id: Iaab5dfa00587b5db6c9cb472dcec6a8e3f6417e0
diff --git a/media/libaudiohal/impl/DeviceHalHidl.h b/media/libaudiohal/impl/DeviceHalHidl.h
index afaad51..ddeb7de 100644
--- a/media/libaudiohal/impl/DeviceHalHidl.h
+++ b/media/libaudiohal/impl/DeviceHalHidl.h
@@ -29,6 +29,10 @@
class DeviceHalHidl : public DeviceHalInterface, public CoreConversionHelperHidl
{
public:
+ status_t getAudioPorts(std::vector<media::audio::common::AudioPort> *ports) override;
+
+ status_t getAudioRoutes(std::vector<media::AudioRoute> *routes) override;
+
// Sets the value of 'devices' to a bitmask of 1 or more values of audio_devices_t.
status_t getSupportedDevices(uint32_t *devices) override;