Merge "policy_hal: avoid VOIP_RX flag is removed for voip call"
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index 39cb42e..95c9bd3 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -1701,7 +1701,8 @@
// prevent direct pcm for non-music stream blindly if direct pcm already in use
// for other music stream concurrency is handled after checking direct ouput usage
// and checking client
- if (direct_pcm_already_in_use == true && stream != AUDIO_STREAM_MUSIC) {
+ if (direct_pcm_already_in_use == true && stream != AUDIO_STREAM_MUSIC &&
+ !(*flags & AUDIO_OUTPUT_FLAG_VOIP_RX)) {
ALOGD("disabling offload for non music stream as direct pcm is already in use");
*flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_NONE);
}