hal: add support to check sva and audio echo reference
EC ref port can be simultaneously set and reset by
audio and SVA use cases. Synchronize enabling/disabling
of EC ref between sthal and audio hal by passing EC ref
enablement/disablement information to each other.
1. When closing input, EC ref does not stop if SVA EC ref
is active.
2. Pass Audio EC ref status to STHAL, when stopping SVA,
ensure EC does not stop if Audio EC ref is active.
Change-Id: I67f1f6316ea64e43a21cbf0add90d345a1108d3e
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 9eb1dc2..17269fd 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1478,6 +1478,8 @@
struct platform_data *my_data = (struct platform_data *)adev->platform;
char ec_ref_mixer_path[MIXER_PATH_MAX_LENGTH] = "echo-reference";
+ audio_extn_sound_trigger_update_ec_ref_status(enable);
+
if (strcmp(my_data->ec_ref_mixer_path, "")) {
ALOGV("%s: disabling %s", __func__, my_data->ec_ref_mixer_path);
audio_route_reset_and_update_path(adev->audio_route,