mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 06:22:53 +00:00
Merge "audio: Allow to inherit Binder RT priority in AIDL" into 24D1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9a9a5d2a88
@@ -145,6 +145,7 @@ ndk::ScopedAStatus Factory::createEffect(const AudioUuid& in_impl_uuid,
|
||||
*_aidl_return = effectSp;
|
||||
ndk::SpAIBinder effectBinder = effectSp->asBinder();
|
||||
AIBinder_setMinSchedulerPolicy(effectBinder.get(), SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
|
||||
AIBinder_setInheritRt(effectBinder.get(), true);
|
||||
mEffectMap[std::weak_ptr<IEffect>(effectSp)] =
|
||||
std::make_pair(in_impl_uuid, std::move(effectBinder));
|
||||
return ndk::ScopedAStatus::ok();
|
||||
|
||||
@@ -855,8 +855,9 @@ ndk::ScopedAStatus Module::openInputStream(const OpenInputStreamArguments& in_ar
|
||||
RETURN_STATUS_IF_ERROR(
|
||||
streamWrapper.setConnectedDevices(findConnectedDevices(in_args.portConfigId)));
|
||||
}
|
||||
AIBinder_setMinSchedulerPolicy(streamWrapper.getBinder().get(), SCHED_NORMAL,
|
||||
ANDROID_PRIORITY_AUDIO);
|
||||
auto streamBinder = streamWrapper.getBinder();
|
||||
AIBinder_setMinSchedulerPolicy(streamBinder.get(), SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
|
||||
AIBinder_setInheritRt(streamBinder.get(), true);
|
||||
mStreams.insert(port->id, in_args.portConfigId, std::move(streamWrapper));
|
||||
_aidl_return->stream = std::move(stream);
|
||||
return ndk::ScopedAStatus::ok();
|
||||
@@ -901,8 +902,9 @@ ndk::ScopedAStatus Module::openOutputStream(const OpenOutputStreamArguments& in_
|
||||
RETURN_STATUS_IF_ERROR(
|
||||
streamWrapper.setConnectedDevices(findConnectedDevices(in_args.portConfigId)));
|
||||
}
|
||||
AIBinder_setMinSchedulerPolicy(streamWrapper.getBinder().get(), SCHED_NORMAL,
|
||||
ANDROID_PRIORITY_AUDIO);
|
||||
auto streamBinder = streamWrapper.getBinder();
|
||||
AIBinder_setMinSchedulerPolicy(streamBinder.get(), SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
|
||||
AIBinder_setInheritRt(streamBinder.get(), true);
|
||||
mStreams.insert(port->id, in_args.portConfigId, std::move(streamWrapper));
|
||||
_aidl_return->stream = std::move(stream);
|
||||
return ndk::ScopedAStatus::ok();
|
||||
|
||||
@@ -48,9 +48,9 @@ struct ChildInterface : private std::pair<std::shared_ptr<C>, ndk::SpAIBinder> {
|
||||
}
|
||||
AIBinder* getBinder() {
|
||||
if (this->second.get() == nullptr) {
|
||||
this->second = this->first->asBinder();
|
||||
AIBinder_setMinSchedulerPolicy(this->second.get(), SCHED_NORMAL,
|
||||
ANDROID_PRIORITY_AUDIO);
|
||||
const auto binder = this->second = this->first->asBinder();
|
||||
AIBinder_setMinSchedulerPolicy(binder.get(), SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
|
||||
AIBinder_setInheritRt(binder.get(), true);
|
||||
}
|
||||
return this->second.get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user