diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-22 18:36:54 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-22 18:36:54 +0000 |
commit | c79e56f9faf756d4b0b034df7d2bf83897c4b715 (patch) | |
tree | 1d89d996f386a5e538d216b355210d13c36cf886 /audio/core/all-versions/default/Device.cpp | |
parent | 6a9c2aa7032c75a47258e0f6bd2b9be57e91991c (diff) | |
parent | 9f3a2e40bf3ca1e866f5c6ec774620b05a06439b (diff) |
Snap for 9635940 from 9f3a2e40bf3ca1e866f5c6ec774620b05a06439b to tm-platform-release
Change-Id: I20e9bb36636437507a79f7b3dcc4bd00d8337f32
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); |