audio: fix the Ultrasound is denied or muted
The STREAM_TTS will be dennied or muted when other
is starting or started
Bug: 200256985
Test: Play Ultrasound with touch sound
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I5af6ef65d456ece2837333b411090d8e8a840fc7
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 1929f31..a9618dc 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -5308,7 +5308,8 @@
ALOGW("Output profile contains no device on module %s", hwModule->getName());
continue;
}
- if ((outProfile->getFlags() & AUDIO_OUTPUT_FLAG_TTS) != 0) {
+ if ((outProfile->getFlags() & AUDIO_OUTPUT_FLAG_TTS) != 0 ||
+ (outProfile->getFlags() & AUDIO_OUTPUT_FLAG_ULTRASOUND) != 0) {
mTtsOutputAvailable = true;
}