audio: add flag for the Ultrasound input source and content_type
Adding the AUDIO_OUTPUT_FLAG_ULTRASOUND and AUDIO_INPUT_FLAG_ULTRASOUND
for the Ultrasound playback and capture respectively.
If device supports the dedicated output or input for the Ultrasound
content or input source, then assign the Ultrasound track to the
specific Ultrasound output or input.
Bug: 200256985
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I2b56b8ef72fbeed50f960fd41e6b992dbb4f8daa
diff --git a/services/audiopolicy/engineconfigurable/src/InputSource.cpp b/services/audiopolicy/engineconfigurable/src/InputSource.cpp
index 5779c00..6fd2b70 100644
--- a/services/audiopolicy/engineconfigurable/src/InputSource.cpp
+++ b/services/audiopolicy/engineconfigurable/src/InputSource.cpp
@@ -26,7 +26,8 @@
status_t Element<audio_source_t>::setIdentifier(audio_source_t identifier)
{
if (identifier > AUDIO_SOURCE_MAX && identifier != AUDIO_SOURCE_HOTWORD
- && identifier != AUDIO_SOURCE_FM_TUNER && identifier != AUDIO_SOURCE_ECHO_REFERENCE) {
+ && identifier != AUDIO_SOURCE_FM_TUNER && identifier != AUDIO_SOURCE_ECHO_REFERENCE
+ && identifier != AUDIO_SOURCE_ULTRASOUND) {
return BAD_VALUE;
}
mIdentifier = identifier;