audio: Add effect attachment to devices and streams

Add the following methods:
  - IModule.{add|remove}DeviceEffect;
  - IStream.{add|remove}Effect.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I4066e2d10a8e08d634010cfe9eb8f832157e725f
This commit is contained in:
Mikhail Naganov
2022-12-12 18:57:36 +00:00
parent 383cd4277a
commit fb1acdec67
10 changed files with 210 additions and 1 deletions

View File

@@ -969,4 +969,28 @@ ndk::ScopedAStatus Module::setVendorParameters(const std::vector<VendorParameter
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
ndk::ScopedAStatus Module::addDeviceEffect(
int32_t in_portConfigId,
const std::shared_ptr<::aidl::android::hardware::audio::effect::IEffect>& in_effect) {
if (in_effect == nullptr) {
LOG(DEBUG) << __func__ << ": port id " << in_portConfigId << ", null effect";
} else {
LOG(DEBUG) << __func__ << ": port id " << in_portConfigId << ", effect Binder "
<< in_effect->asBinder().get();
}
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
ndk::ScopedAStatus Module::removeDeviceEffect(
int32_t in_portConfigId,
const std::shared_ptr<::aidl::android::hardware::audio::effect::IEffect>& in_effect) {
if (in_effect == nullptr) {
LOG(DEBUG) << __func__ << ": port id " << in_portConfigId << ", null effect";
} else {
LOG(DEBUG) << __func__ << ": port id " << in_portConfigId << ", effect Binder "
<< in_effect->asBinder().get();
}
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
} // namespace aidl::android::hardware::audio::core