libaudiohal: Align use of get_audio_port_v7 with default wrapper

Use the same logic when calling get_audio_port_v7
as the default wrapper, with separation for pre-V7
and V7 versions of the code.

Bug: 160352965
Test: check audio on device
      also, use a modified APM config with USB Audio on 'usb' module
Change-Id: I5a6e2164b43d086aec6ffad5300edbade04cca1f
Merged-In: I5a6e2164b43d086aec6ffad5300edbade04cca1f
diff --git a/media/libaudiohal/impl/DeviceHalHidl.h b/media/libaudiohal/impl/DeviceHalHidl.h
index d342d4a..2c847cf 100644
--- a/media/libaudiohal/impl/DeviceHalHidl.h
+++ b/media/libaudiohal/impl/DeviceHalHidl.h
@@ -107,6 +107,9 @@
     // Fills the list of supported attributes for a given audio port.
     virtual status_t getAudioPort(struct audio_port *port);
 
+    // Fills the list of supported attributes for a given audio port.
+    virtual status_t getAudioPort(struct audio_port_v7 *port);
+
     // Set audio port configuration.
     virtual status_t setAudioPortConfig(const struct audio_port_config *config);
 
@@ -128,6 +131,8 @@
 
     // The destructor automatically closes the device.
     virtual ~DeviceHalHidl();
+
+    template <typename HalPort> status_t getAudioPortImpl(HalPort *port);
 };
 
 } // namespace CPP_VERSION