Merge "Close a newly opened direct output if its parameters are invalid" into jb-mr1-aah-dev
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp
index 906c3fc..a082239 100644
--- a/audio/AudioPolicyManagerBase.cpp
+++ b/audio/AudioPolicyManagerBase.cpp
@@ -1672,6 +1672,7 @@
((profile->mFormats[0] == 0) &&
(profile->mChannelMasks.size() < 2))) {
ALOGW("checkOutputsForDevice() direct output missing param");
+ mpClientInterface->closeOutput(output);
output = 0;
} else {
addOutput(output, desc);