Merge "libaudiohal: Fix initialization of SinkMetadata for HAL V7" am: 1b8e0f7dd5

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I78b712e83dec248402d6196e45bfe20ac7df1de4
diff --git a/media/libaudiohal/impl/DeviceHalHidl.cpp b/media/libaudiohal/impl/DeviceHalHidl.cpp
index 7b6d1f8..da16477 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(