audio: hal: Check to enable IP handler interface

IP handler interface is disabled for direct
passthrough and enabled for all other usecases.

CRs-Fixed: 2088973
Change-Id: Idd11455777abea504203d632f1abdfb148b51a03
diff --git a/hal/audio_extn/passthru.c b/hal/audio_extn/passthru.c
index 31c94f6..ee9995c 100644
--- a/hal/audio_extn/passthru.c
+++ b/hal/audio_extn/passthru.c
@@ -417,6 +417,19 @@
 
 }
 
+bool audio_extn_passthru_is_direct_passthrough(struct stream_out *out)
+{
+    //check passthrough system property
+    if (!property_get_bool("audio.offload.passthrough", false)) {
+        return false;
+    }
+
+    if ((out != NULL) && (out->compr_config.codec->compr_passthr == PASSTHROUGH || out->compr_config.codec->compr_passthr == PASSTHROUGH_IEC61937))
+        return true;
+    else
+        return false;
+}
+
 bool audio_extn_passthru_is_passthrough_stream(struct stream_out *out)
 {
     //check passthrough system property