hal: qaf: Handling close output stream

-  Offload session not closing completely
   with QAF enabled and by passing MS12.

- for non-MS12 clips, call for  close output
  stream missed as MS12 qmod contents is NULL.

- Changes to call close output stream for
  non-MS12/non qaf path.

Change-Id: I8040e31f6ae81272f7b1618be9f97212187c430a
diff --git a/hal/audio_extn/qaf.c b/hal/audio_extn/qaf.c
index 44d471c..20d0ae4 100644
--- a/hal/audio_extn/qaf.c
+++ b/hal/audio_extn/qaf.c
@@ -2541,7 +2541,12 @@
     struct stream_out *out = (struct stream_out *)stream;
     struct qaf_module* qaf_mod = get_qaf_module_for_input_stream(out);
 
-    if (!qaf_mod) return;
+    if (!qaf_mod) {
+        DEBUG_MSG("qaf module is NULL, by passing qaf on close output stream");
+        /*closing non-MS12/default output stream opened with qaf */
+        adev_close_output_stream(dev, stream);
+        return;
+    }
 
     DEBUG_MSG("stream_handle(%p) format = %x", out, out->format);