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/PatchPanel.cpp b/services/audioflinger/PatchPanel.cpp
index f57470f..35f17c1 100644
--- a/services/audioflinger/PatchPanel.cpp
+++ b/services/audioflinger/PatchPanel.cpp
@@ -260,6 +260,7 @@
                     if (patch->sinks[0].config_mask & AUDIO_PORT_CONFIG_FLAGS) {
                         flags = patch->sinks[0].flags.output;
                     }
+                    audio_attributes_t attributes = AUDIO_ATTRIBUTES_INITIALIZER;
                     const sp<IAfThreadBase> thread = mAfPatchPanelCallback->openOutput_l(
                                                             patch->sinks[0].ext.device.hw_module,
                                                             &output,
@@ -267,7 +268,8 @@
                                                             &mixerConfig,
                                                             outputDevice,
                                                             outputDeviceAddress,
-                                                            flags);
+                                                            flags,
+                                                            attributes);
                     ALOGV("mAfPatchPanelCallback->openOutput_l() returned %p", thread.get());
                     if (thread == 0) {
                         status = NO_MEMORY;