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/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 46f4068..ca6f718 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -337,7 +337,8 @@
audio_config_base_t* mixerConfig,
audio_devices_t deviceType,
const String8& address,
- audio_output_flags_t flags) final REQUIRES(mutex());
+ audio_output_flags_t flags,
+ audio_attributes_t attributes) final REQUIRES(mutex());
const DefaultKeyedVector<audio_module_handle_t, AudioHwDevice*>&
getAudioHwDevs_l() const final REQUIRES(mutex()) { return mAudioHwDevs; }
void updateDownStreamPatches_l(const struct audio_patch* patch,