audio: Use perf hints from audio HAL for ULL and MMAP

Use perf hints from audio HAL for ULL and MMAP

Bug: 62041945
Test: Build
Change-Id: I1b3b017f9fa083cbbaa62765ff1b64ab7aa40dad
Signed-off-by: Wei Wang <wvw@google.com>
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index ef0de18..85c886b 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1803,6 +1803,9 @@
             adev->visualizer_stop_output(out->handle, out->pcm_device_id);
         if (adev->offload_effects_stop_output != NULL)
             adev->offload_effects_stop_output(out->handle, out->pcm_device_id);
+    } else if (out->usecase == USECASE_AUDIO_PLAYBACK_ULL ||
+               out->usecase == USECASE_AUDIO_PLAYBACK_MMAP) {
+        audio_low_latency_hint_end();
     }
 
     /* 1. Get and set stream specific mixer controls */
@@ -1962,6 +1965,11 @@
     audio_extn_perf_lock_release();
     audio_extn_tfa_98xx_enable_speaker();
 
+    if (out->usecase == USECASE_AUDIO_PLAYBACK_ULL ||
+        out->usecase == USECASE_AUDIO_PLAYBACK_MMAP) {
+        audio_low_latency_hint_start();
+    }
+
     // consider a scenario where on pause lower layers are tear down.
     // so on resume, swap mixer control need to be sent only when
     // backend is active, hence rather than sending from enable device