audio policy: add support for custom mixes
Add support for custom mixes in AudioPolicyManager.
Two methods are added to register or unregister a list of custom mixes
with their attributes and format.
getOutputForAttr() and getInputForAttr() first look for a match in
registered mixes before defaulting to normal output/input selection
Remote submix device connection disconnection now takes address into
account to identify the correspnoding custom mix.
Bug: 16009464.
Change-Id: I3f1c2a485a0fb71b1f984ed0adc9b68aa971e408
diff --git a/include/media/AudioPolicyHelper.h b/include/media/AudioPolicyHelper.h
index 3ed0b74..79231be 100644
--- a/include/media/AudioPolicyHelper.h
+++ b/include/media/AudioPolicyHelper.h
@@ -63,7 +63,7 @@
static void stream_type_to_audio_attributes(audio_stream_type_t streamType,
audio_attributes_t *attr) {
- attr->flags = 0x0;
+ memset(attr, 0, sizeof(audio_attributes_t));
switch (streamType) {
case AUDIO_STREAM_DEFAULT: