audio: Do not allow Compress offload mode for AV streaming content
Add system property check to use compress offload mode or not for
audio+video streaming content.
Change-Id: I10aa22995d2d1320b41f58ff9bb2303787c9d40d
CRs-fixed: 587600
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp
index e249953..d648428 100644
--- a/audio/AudioPolicyManagerBase.cpp
+++ b/audio/AudioPolicyManagerBase.cpp
@@ -1506,6 +1506,14 @@
return false;
}
}
+ if(offloadInfo.is_streaming &&
+ property_get("av.streaming.offload.enable", propValue, "false")) {
+ bool prop_enabled = atoi(propValue) || !strncmp("true", propValue, 4);
+ if (!prop_enabled) {
+ ALOGW("offload disabled by av.streaming.offload.enable = %s ", propValue );
+ return false;
+ }
+ }
ALOGV("isOffloadSupported: has_video == true, property\
set to enable offload");
}