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
Change-Id: Ic9a739f1de50485304187be5c4b603955afabbf8
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h
index f899cd5..9fc5db5 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.h
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h
@@ -1153,7 +1153,8 @@
const audio_config_t *config,
audio_output_flags_t flags,
const DeviceVector &devices,
- audio_io_handle_t *output);
+ audio_io_handle_t *output,
+ audio_attributes_t attributes);
/**
* @brief Queries if some kind of spatialization will be performed if the audio playback