Send the Audio Usage down from AudioPolicyManager

Store audioUsgae in AudioAttributes and send it down to
AudioFlinger::openOutput_l. Then extract audioUsage and store in
SourceMetadata to pass it down to the HAL layer.

Bug: 297875432
Test: Add a fake audio usage in attribute in AudioFlinger::openoutput(), then test by checking the log message. The fake usage does get pass down to the DeviceHalAidl::openOutputStream().
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f6e304f9c5066ae829a91dcd98bc6045a13a8b30)
Merged-In: Ic9a739f1de50485304187be5c4b603955afabbf8
Change-Id: Ic9a739f1de50485304187be5c4b603955afabbf8
diff --git a/services/audioflinger/datapath/SpdifStreamOut.cpp b/services/audioflinger/datapath/SpdifStreamOut.cpp
index 65a4eec..d3983b0 100644
--- a/services/audioflinger/datapath/SpdifStreamOut.cpp
+++ b/services/audioflinger/datapath/SpdifStreamOut.cpp
@@ -45,7 +45,8 @@
         audio_io_handle_t handle,
         audio_devices_t devices,
         struct audio_config *config,
-        const char *address)
+        const char *address,
+        const std::vector<playback_track_metadata_v7_t>& sourceMetadata)
 {
     struct audio_config customConfig = *config;
 
@@ -75,7 +76,8 @@
             handle,
             devices,
             &customConfig,
-            address);
+            address,
+            sourceMetadata);
 
     ALOGI("SpdifStreamOut::open() status = %d", status);