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/asphere.c b/post_proc/asphere.c
index 20ca694..82bb496 100644
--- a/post_proc/asphere.c
+++ b/post_proc/asphere.c
@@ -62,6 +62,18 @@
     ASPHERE_ERROR
 };
 
+#ifdef AUDIO_FEATURE_ENABLED_GCOV
+extern void  __gcov_flush();
+static void enable_gcov()
+{
+    __gcov_flush();
+}
+#else
+static void enable_gcov()
+{
+}
+#endif
+
 struct asphere_module {
     bool enabled;
     int status;
@@ -157,6 +169,7 @@
 
 static int asphere_init() {
     pthread_once(&asphere_once, asphere_init_once);
+    enable_gcov();
     return asphere.init_status;
 }