policy_hal: allows reusing output for non offload request
Don't check for reuse and don't close previous output if multiple
concurrent offload decode is supported and new offload request comes.
Change-Id: I8f428ba3e6dfa4783589e9da997bdf3e35e64ae0
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index 5ab6067..b290aec 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -1768,8 +1768,9 @@
// if multiple concurrent offload decode is supported
// do no check for reuse and also don't close previous output if its offload
// previous output will be closed during track destruction
- if (!mApmConfigs->isAudioMultipleOffloadEnable() &&
- ((*flags & AUDIO_OUTPUT_FLAG_DIRECT) != 0)) {
+ if (!(mApmConfigs->isAudioMultipleOffloadEnable() &&
+ ((*flags & AUDIO_OUTPUT_FLAG_DIRECT) != 0) &&
+ ((*flags & AUDIO_OUTPUT_FLAG_MMAP_NOIRQ) == 0))) {
for (size_t i = 0; i < mOutputs.size(); i++) {
sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
if (!desc->isDuplicated() && (profile == desc->mProfile)) {