audio: Add flags to makefiles
Enable GCOV if config is set to true. Also
add gcov_flush in source files to get enhanced
code coverage.
Change-Id: I39776cc6d6f16cd23da05b66669eea22fc4cba81
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
diff --git a/post_proc/equalizer.c b/post_proc/equalizer.c
index c1c1303..eddaca1 100644
--- a/post_proc/equalizer.c
+++ b/post_proc/equalizer.c
@@ -41,6 +41,19 @@
"The Android Open Source Project",
};
+#ifdef AUDIO_FEATURE_ENABLED_GCOV
+extern void __gcov_flush();
+void enable_gcov()
+{
+ __gcov_flush();
+}
+#else
+void enable_gcov()
+{
+}
+#endif
+
+
static const char *equalizer_preset_names[] = {
"Normal",
"Classical",
@@ -489,7 +502,7 @@
eq_ctxt->hw_acc_fd = -1;
memset(&(eq_ctxt->offload_eq), 0, sizeof(struct eq_params));
offload_eq_set_preset(&(eq_ctxt->offload_eq), INVALID_PRESET);
-
+ enable_gcov();
return 0;
}
@@ -510,6 +523,7 @@
OFFLOAD_SEND_EQ_ENABLE_FLAG |
OFFLOAD_SEND_EQ_BANDS_LEVEL);
}
+ enable_gcov();
return 0;
}
@@ -527,6 +541,7 @@
hw_acc_eq_send_params(eq_ctxt->hw_acc_fd, &eq_ctxt->offload_eq,
OFFLOAD_SEND_EQ_ENABLE_FLAG);
}
+ enable_gcov();
return 0;
}
@@ -546,6 +561,7 @@
OFFLOAD_SEND_EQ_ENABLE_FLAG |
OFFLOAD_SEND_EQ_BANDS_LEVEL);
}
+ enable_gcov();
return 0;
}
@@ -561,6 +577,7 @@
offload_eq_send_params(eq_ctxt->ctl, &eq, OFFLOAD_SEND_EQ_ENABLE_FLAG);
}
eq_ctxt->ctl = NULL;
+ enable_gcov();
return 0;
}