hal: Fix fragment size for offload playback.
-Use default fragment size for all clips except
AV streaming, flac, DSD in ascending order
Change-Id: I68f9d4d3c71299d9dc7868aab518a22a6a0b57cb
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 3fb82c6..becd247 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -5177,8 +5177,8 @@
fragment_size = info->offload_buffer_size;
}
- if (info != NULL && !info->has_video) {
- if (info->is_streaming) {
+ if (info != NULL) {
+ if (info->is_streaming && info->has_video) {
fragment_size = COMPRESS_OFFLOAD_FRAGMENT_SIZE_FOR_AV_STREAMING;
ALOGV("%s: offload fragment size reduced for AV streaming to %d",
__func__, fragment_size);
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 0eb31ec..e08e21b 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -5062,8 +5062,8 @@
fragment_size = info->offload_buffer_size;
}
- if (info != NULL && !info->has_video) {
- if (info->is_streaming) {
+ if (info != NULL) {
+ if (info->is_streaming && info->has_video) {
fragment_size = COMPRESS_OFFLOAD_FRAGMENT_SIZE_FOR_AV_STREAMING;
ALOGV("%s: offload fragment size reduced for AV streaming to %d",
__func__, fragment_size);