diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index cc5747c..9ccd2c1 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -1654,9 +1654,10 @@
         *flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_NONE);
     }
 
-    // check if direct output for pcm/track offload already exits
+    // check if direct output for pcm/track offload or compress offload already exist
     bool direct_pcm_already_in_use = false;
-    if (*flags == AUDIO_OUTPUT_FLAG_DIRECT) {
+    bool compress_offload_already_in_use = false;
+    if (*flags & AUDIO_OUTPUT_FLAG_DIRECT) {
         for (size_t i = 0; i < mOutputs.size(); i++) {
             sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
             if (desc->mFlags == AUDIO_OUTPUT_FLAG_DIRECT) {
@@ -1664,6 +1665,11 @@
                 ALOGD("Direct PCM already in use");
                 break;
             }
+            if (desc->mFlags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) {
+                compress_offload_already_in_use = true;
+                ALOGD("Compress Offload already in use");
+                break;
+            }
         }
         // 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
@@ -1677,9 +1683,10 @@
     bool forced_deep = false;
     // only allow deep buffering for music stream type
     if (stream != AUDIO_STREAM_MUSIC) {
-        *flags = (audio_output_flags_t)(*flags &~AUDIO_OUTPUT_FLAG_DEEP_BUFFER);
+        *flags = (audio_output_flags_t)(*flags & ~AUDIO_OUTPUT_FLAG_DEEP_BUFFER);
     } else if (/* stream == AUDIO_STREAM_MUSIC && */
-            (*flags == AUDIO_OUTPUT_FLAG_NONE || *flags == AUDIO_OUTPUT_FLAG_DIRECT) &&
+            (*flags == AUDIO_OUTPUT_FLAG_NONE || *flags == AUDIO_OUTPUT_FLAG_DIRECT ||
+            (*flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD)) &&
             mApmConfigs->isAudioDeepbufferMediaEnabled() && !isInCall()) {
             forced_deep = true;
     }
@@ -1764,8 +1771,9 @@
                         }
                     }
                     if (outputDesc != NULL) {
-                        if (*flags == AUDIO_OUTPUT_FLAG_DIRECT &&
-                             direct_pcm_already_in_use == true &&
+                        if ((((*flags == AUDIO_OUTPUT_FLAG_DIRECT) && direct_pcm_already_in_use) ||
+                            ((*flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) &&
+                             compress_offload_already_in_use)) &&
                              session != outputDesc->mDirectClientSession) {
                              ALOGV("getOutput() do not reuse direct pcm output because current client (%d) "
                                    "is not the same as requesting client (%d) for different output conf",
