audiopolicy: Implement API for querying A2DP offload formats
Add support in AudioPolicyManager to return supported encoding
formats for A2DP on the primary HAL. Current implementation is
to query prop defined and convert this to a list of audio formats
Bug: 111812273
Test: make
Change-Id: Ic3ea72e19aa4c0bd4c156f62e45e6225f9ce6b11
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h
index 4b42a34..fb1f7cb 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.h
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h
@@ -241,6 +241,9 @@
bool reported);
virtual status_t setSurroundFormatEnabled(audio_format_t audioFormat, bool enabled);
+ virtual status_t getHwOffloadEncodingFormatsSupportedForA2DP(
+ std::vector<audio_format_t> *formats);
+
// return the strategy corresponding to a given stream type
routing_strategy getStrategy(audio_stream_type_t stream) const;