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/bass_boost.c b/post_proc/bass_boost.c
index 68cd46f..8e91764 100644
--- a/post_proc/bass_boost.c
+++ b/post_proc/bass_boost.c
@@ -48,6 +48,18 @@
 #define LIB_ACDB_LOADER "libacdbloader.so"
 #define PBE_CONF_APP_ID 0x00011134
 
+#ifdef AUDIO_FEATURE_ENABLED_GCOV
+extern void  __gcov_flush();
+static void enable_gcov()
+{
+    __gcov_flush();
+}
+#else
+static void enable_gcov()
+{
+}
+#endif
+
 enum {
         AUDIO_DEVICE_CAL_TYPE = 0,
         AUDIO_STREAM_CAL_TYPE,
@@ -221,7 +233,7 @@
 
     bassboost_init((effect_context_t *)&(bass_ctxt->bassboost_ctxt));
     pbe_init((effect_context_t *)&(bass_ctxt->pbe_ctxt));
-
+    enable_gcov();
     return 0;
 }
 
@@ -396,6 +408,7 @@
     bass_ctxt->temp_disabled = false;
     memset(&(bass_ctxt->offload_bass), 0, sizeof(struct bass_boost_params));
 
+    enable_gcov();
     return 0;
 }