summaryrefslogtreecommitdiff
path: root/audio/core/all-versions/default/Device.cpp
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-12-07 00:22:17 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-12-07 00:22:17 +0000
commitc416bfa91350b6b93202bb28947117b3cbb7ff2e (patch)
tree770a65fa1c2bda2e84ea7c9339cfda7994f3ea53 /audio/core/all-versions/default/Device.cpp
parentc94c35e088f700af3c3a4580595a93e4e74a3505 (diff)
parent43966208b7ef50c51a58e82c6d7c10ee9e115860 (diff)
Snap for 9376496 from 43966208b7ef50c51a58e82c6d7c10ee9e115860 to tm-qpr2-release
Change-Id: I3ca51e71bc22f8c190db58515cf17494bcb89d84
Diffstat (limited to 'audio/core/all-versions/default/Device.cpp')
-rw-r--r--audio/core/all-versions/default/Device.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/core/all-versions/default/Device.cpp b/audio/core/all-versions/default/Device.cpp
index b954fcd6f8..d03118ae5d 100644
--- a/audio/core/all-versions/default/Device.cpp
+++ b/audio/core/all-versions/default/Device.cpp
@@ -30,6 +30,7 @@
#include <algorithm>
#include <android/log.h>
+#include <hidl/HidlTransportSupport.h>
#include <mediautils/MemoryLeakTrackUtil.h>
#include <memunreachable/memunreachable.h>
@@ -183,6 +184,7 @@ std::tuple<Result, sp<IStreamOut>> Device::openOutputStreamCore(int32_t ioHandle
if (status == OK) {
streamOut = new StreamOut(this, halStream);
++mOpenedStreamsCount;
+ android::hardware::setMinSchedulerPolicy(streamOut, SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
}
status_t convertStatus =
HidlUtils::audioConfigFromHal(halConfig, false /*isInput*/, suggestedConfig);
@@ -220,6 +222,7 @@ std::tuple<Result, sp<IStreamIn>> Device::openInputStreamCore(
if (status == OK) {
streamIn = new StreamIn(this, halStream);
++mOpenedStreamsCount;
+ android::hardware::setMinSchedulerPolicy(streamIn, SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
}
status_t convertStatus =
HidlUtils::audioConfigFromHal(halConfig, true /*isInput*/, suggestedConfig);