hal: Expand the list of Barge-in usecases
This change adds new usecases to the list that will raise a
usecase event to sthal. USECASE_AUDIO_PLAYBACK_LOW_LATENCY and
USECASE_AUDIO_PLAYBACK_ULL are added with system property checks.
USECASE_AUDIO_PLAYBACK_MMAP is also added without a system
property. Additionally, screen state events can now be sent to
sthal.
Change-Id: I936b2390d886b67695daf184a2ca1b018ed17567
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 459c37c..676a30d 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -7896,15 +7896,20 @@
case USECASE_AUDIO_PLAYBACK_MULTI_CH:
case USECASE_AUDIO_PLAYBACK_OFFLOAD:
case USECASE_AUDIO_PLAYBACK_OFFLOAD2:
- needs_event = true;
- break;
- /* concurrent playback in low latency allowed */
- case USECASE_AUDIO_PLAYBACK_LOW_LATENCY:
- break;
- /* concurrent playback FM needs event */
case USECASE_AUDIO_PLAYBACK_FM:
needs_event = true;
break;
+ case USECASE_AUDIO_PLAYBACK_ULL:
+ case USECASE_AUDIO_PLAYBACK_MMAP:
+ if (property_get_bool("persist.vendor.audio.ull_playback_bargein",
+ false))
+ needs_event = true;
+ break;
+ case USECASE_AUDIO_PLAYBACK_LOW_LATENCY:
+ if (property_get_bool("persist.vendor.audio.ll_playback_bargein",
+ false))
+ needs_event = true;
+ break;
/* concurrent capture usecases which needs event */
case USECASE_AUDIO_RECORD: