Revert "Revert "hal: Notify soundtrigger HAL on stream updates""

This reverts commit 9fc06a06405277a54a56859fd68ea9c9b8e3786d.

Instead of sending device enable/disable events, send use case
enable/disable events with use case type to sound trigger hal.
Playback (on speaker) and capture stream events are updated
to soundtrigger hal.

Sound trigger hal can decide to support concurrent sountrigger
sessions based on the audio use case.

Also avoid compilation dependency on sound trigger hal proprietary
interface header file by maintaining the interface APIs locally.

Bug: 63939932
Test: "ok google" from lock screen on marlin, sailfish, walleye,
      taimen,
      music iq on walleye and taimen

Change-Id: I16422b85b929774373f7000f5b6167086340a6df
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index f2dec25..f586865 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -563,11 +563,11 @@
         snd_device = usecase->in_snd_device;
     else
         snd_device = usecase->out_snd_device;
-
     audio_extn_utils_send_app_type_cfg(adev, usecase);
     audio_extn_utils_send_audio_calibration(adev, usecase);
     strcpy(mixer_path, use_case_table[usecase->id]);
     platform_add_backend_name(adev->platform, mixer_path, snd_device);
+    audio_extn_sound_trigger_update_stream_status(usecase, ST_EVENT_STREAM_BUSY);
     ALOGD("%s: usecase(%d) apply and update mixer path: %s", __func__,  usecase->id, mixer_path);
     audio_route_apply_and_update_path(adev->audio_route, mixer_path);
 
@@ -593,6 +593,7 @@
     platform_add_backend_name(adev->platform, mixer_path, snd_device);
     ALOGD("%s: usecase(%d) reset and update mixer path: %s", __func__, usecase->id, mixer_path);
     audio_route_reset_and_update_path(adev->audio_route, mixer_path);
+    audio_extn_sound_trigger_update_stream_status(usecase, ST_EVENT_STREAM_FREE);
 
     ALOGV("%s: exit", __func__);
     return 0;