hal: notify listen while enabling/disabling snd device

Listen needs be stopped when audio capture is active. Also
Listen needs to be started again after audio capture becomes
inactive. Stop and start listen based on audio capture device.

Change-Id: I05ca7cccd59b43a163604881bd9c6ee10cc8fba3
Depends-on: 510494
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 1a53f32..af93782 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1403,3 +1403,14 @@
         usecase = USECASE_AUDIO_RECORD_FM_VIRTUAL;
     return usecase;
 }
+
+bool platform_listen_update_status(snd_device_t snd_device)
+{
+    if ((snd_device >= SND_DEVICE_IN_BEGIN) &&
+        (snd_device < SND_DEVICE_IN_END) &&
+        (snd_device != SND_DEVICE_IN_CAPTURE_FM) &&
+        (snd_device != SND_DEVICE_IN_CAPTURE_VI_FEEDBACK))
+        return true;
+    else
+        return false;
+}