summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaideep Sharma <quic_jaidshar@quicinc.com>2022-05-19 12:13:45 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2022-05-19 21:46:14 -0700
commitb5bbd522f4a0815312e52f447121533918be4e7a (patch)
tree98a5d0bcec9ee82d738169df5785e778fc19d4ad
parent56cd1d796823d83474afc77bca381daf055e96cf (diff)
hal: Fix PAL stream selection for voice recognition source
Use PAL_STREAM_LOW_LATENCY for MMAP mode even if source is voice recognition. Change-Id: I89238f3938b659878ef945e13a79ce3103f54e3d
-rw-r--r--hal/AudioStream.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/hal/AudioStream.cpp b/hal/AudioStream.cpp
index c386a6f7..215e3b32 100644
--- a/hal/AudioStream.cpp
+++ b/hal/AudioStream.cpp
@@ -1553,6 +1553,9 @@ pal_stream_type_t StreamInPrimary::GetPalStreamType(
return palStreamType;
} else if (source_ == AUDIO_SOURCE_VOICE_RECOGNITION) {
palStreamType = PAL_STREAM_VOICE_RECOGNITION;
+ if (halStreamFlags & AUDIO_INPUT_FLAG_MMAP_NOIRQ) {
+ palStreamType = PAL_STREAM_ULTRA_LOW_LATENCY;
+ }
return palStreamType;
}