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 479f848..3096eb9 100644
--- a/post_proc/equalizer.c
+++ b/post_proc/equalizer.c
@@ -43,6 +43,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",
@@ -501,7 +514,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;
 }
 
@@ -522,6 +535,7 @@
                                   OFFLOAD_SEND_EQ_ENABLE_FLAG |
                                   OFFLOAD_SEND_EQ_BANDS_LEVEL);
     }
+    enable_gcov();
     return 0;
 }
 
@@ -539,6 +553,7 @@
             hw_acc_eq_send_params(eq_ctxt->hw_acc_fd, &eq_ctxt->offload_eq,
                                   OFFLOAD_SEND_EQ_ENABLE_FLAG);
     }
+    enable_gcov();
     return 0;
 }
 
@@ -558,6 +573,7 @@
                                   OFFLOAD_SEND_EQ_ENABLE_FLAG |
                                   OFFLOAD_SEND_EQ_BANDS_LEVEL);
     }
+    enable_gcov();
     return 0;
 }
 
@@ -573,6 +589,7 @@
         offload_eq_send_params(eq_ctxt->ctl, &eq, OFFLOAD_SEND_EQ_ENABLE_FLAG);
     }
     eq_ctxt->ctl = NULL;
+    enable_gcov();
     return 0;
 }