Merge "audio: Enable RT priority inheritance for service clients" into main am: 2718e0195a
Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/3132933
Change-Id: Ib9432273f41b3e7b7df75f41a4797fc619b80c2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/media/libaudioclient/IAudioFlinger.cpp b/media/libaudioclient/IAudioFlinger.cpp
index a329edf..ea6fca3 100644
--- a/media/libaudioclient/IAudioFlinger.cpp
+++ b/media/libaudioclient/IAudioFlinger.cpp
@@ -928,6 +928,7 @@
AudioFlingerServerAdapter::AudioFlingerServerAdapter(
const sp<AudioFlingerServerAdapter::Delegate>& delegate) : mDelegate(delegate) {
setMinSchedulerPolicy(SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
+ setInheritRt(true);
}
status_t AudioFlingerServerAdapter::onTransact(uint32_t code,
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp
index 57e8caf..3e8b2af 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -1734,6 +1734,7 @@
{
ALOGV("constructor %p client %p", this, client.get());
setMinSchedulerPolicy(SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
+ setInheritRt(true);
if (client == 0) {
return;
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index c725580..bcb8b52 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -389,6 +389,7 @@
mTrack(track)
{
setMinSchedulerPolicy(SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
+ setInheritRt(true);
}
TrackHandle::~TrackHandle() {
@@ -2652,6 +2653,7 @@
mRecordTrack(recordTrack)
{
setMinSchedulerPolicy(SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
+ setInheritRt(true);
}
RecordHandle::~RecordHandle() {
diff --git a/services/audiopolicy/service/AudioPolicyService.cpp b/services/audiopolicy/service/AudioPolicyService.cpp
index f6492d4..7f0c902 100644
--- a/services/audiopolicy/service/AudioPolicyService.cpp
+++ b/services/audiopolicy/service/AudioPolicyService.cpp
@@ -228,6 +228,7 @@
mDestroyAudioPolicyManager(destroyAudioPolicyManager),
mUsecaseValidator(media::createUsecaseValidator()) {
setMinSchedulerPolicy(SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
+ setInheritRt(true);
}
void AudioPolicyService::loadAudioPolicyManager()
diff --git a/services/audiopolicy/service/Spatializer.cpp b/services/audiopolicy/service/Spatializer.cpp
index 16f3a9a..bb36df7 100644
--- a/services/audiopolicy/service/Spatializer.cpp
+++ b/services/audiopolicy/service/Spatializer.cpp
@@ -292,6 +292,7 @@
mPolicyCallback(callback) {
ALOGV("%s", __func__);
setMinSchedulerPolicy(SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
+ setInheritRt(true);
}
void Spatializer::onFirstRef() {