diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2023-04-14 00:32:15 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2023-04-14 00:32:15 -0700 |
commit | 8053558411d145636e2bb05f443e3436dc53e4bd (patch) | |
tree | a904a685549ff97ac2ddca34d30d43f25905d433 /audio/core/all-versions/default/Device.cpp | |
parent | 8b512e583f760373db8176137ebe0e6b725185ee (diff) | |
parent | cd9798f40fec23835b0f75119d88505235666e29 (diff) |
Merge cd9798f40fec23835b0f75119d88505235666e29 on remote branch
Change-Id: I6fbbec55edb31324cbe59052f6838905f0ddcfaa
Diffstat (limited to 'audio/core/all-versions/default/Device.cpp')
-rw-r--r-- | audio/core/all-versions/default/Device.cpp | 3 |
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); |