Merge "libaudiohal: Fix initialization of SinkMetadata for HAL V7" am: 1b8e0f7dd5 am: 412ec213b5 am: 7516d6d11d

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1580726

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52fb2ca5efdd4f81479cc4c858ca936c88ceca64
diff --git a/media/libaudiohal/impl/DeviceHalHidl.cpp b/media/libaudiohal/impl/DeviceHalHidl.cpp
index a8fbe58..b9a3e29 100644
--- a/media/libaudiohal/impl/DeviceHalHidl.cpp
+++ b/media/libaudiohal/impl/DeviceHalHidl.cpp
@@ -265,6 +265,10 @@
     (void)outputDevice;
     (void)outputDeviceAddress;
 #else
+#if MAJOR_VERSION >= 7
+    (void)HidlUtils::audioChannelMaskFromHal(
+            AUDIO_CHANNEL_NONE, true /*isInput*/, &sinkMetadata.tracks[0].channelMask);
+#endif
     if (outputDevice != AUDIO_DEVICE_NONE) {
         DeviceAddress hidlOutputDevice;
         if (status_t status = CoreUtils::deviceAddressFromHal(