summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManish Dewangan <manish@codeaurora.org>2015-10-13 14:04:36 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2015-10-29 19:34:09 -0700
commit4921c64cef207f969ea8c0b4b9f5f2a3d6790f49 (patch)
tree8ab77b2e50e40ae57f7fc59b8b86f9211b53936b
parent6e4b3b70ef2adfeea1a7614968280e68711ddaf7 (diff)
downloadandroid_hardware_qcom_audio-4921c64cef207f969ea8c0b4b9f5f2a3d6790f49.tar.gz
android_hardware_qcom_audio-4921c64cef207f969ea8c0b4b9f5f2a3d6790f49.tar.bz2
android_hardware_qcom_audio-4921c64cef207f969ea8c0b4b9f5f2a3d6790f49.zip
policy_hal: Reject offload path for AV streaming usecase
-Currently offload path is being used for AV streaming usecase. -This sometime results in framedrop/glitch as video rendering is getting delayed due to delay in filling audio compress buffer. -Disable compress offload for AV streaming usecase. With AV streaming usecase will be via PCM offload path. Change-Id: I799ee43f17975b33e37b94e222c4ce41f36bbc96
-rw-r--r--policy_hal/AudioPolicyManager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index c5b2e8e2..601f12ec 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -459,6 +459,14 @@ bool AudioPolicyManagerCustom::isOffloadSupported(const audio_offload_info_t& of
ALOGV("isOffloadSupported: has_video == true, returning false");
return false;
}
+
+ const bool allowOffloadStreamingWithVideo = property_get_bool("av.streaming.offload.enable",
+ false /*default value*/);
+ if(offloadInfo.has_video && offloadInfo.is_streaming && !allowOffloadStreamingWithVideo) {
+ ALOGW("offload disabled by av.streaming.offload.enable = %s ", propValue );
+ return false;
+ }
+
}
//If duration is less than minimum value defined in property, return false