commit | 4c58cac50441eec1e46c8725359029a869b6bb48 | [log] [tgz] |
---|---|---|
author | jiabin <jiabin@google.com> | Wed Feb 28 18:49:50 2024 +0000 |
committer | jiabin <jiabin@google.com> | Wed Feb 28 18:49:50 2024 +0000 |
tree | 3666b54ea960006dccec7562ff1a8e2e03f9c7cb | |
parent | aeebf258cd66942e6d7460c70210b63dce78d5d7 [diff] |
APM: only use the flags that are compatible for the mix port when opening input stream. Bug: 324438381 Test: atest AudioRecordTest audiopolicy_tests Change-Id: Ibc4f508c600f582dd8f3916a5be1ccbd4ebe4d63
diff --git a/services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp b/services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp index 6f71ac5..44f84b9 100644 --- a/services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp +++ b/services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
@@ -235,7 +235,8 @@ &deviceType, String8(mDevice->address().c_str()), source, - flags); + static_cast<audio_input_flags_t>( + flags & mProfile->getFlags())); LOG_ALWAYS_FATAL_IF(mDevice->type() != deviceType, "%s openInput returned device %08x when given device %08x", __FUNCTION__, mDevice->type(), deviceType);