Merge "Effect AIDL: skip volume checking" into main
This commit is contained in:
commit
a1d092a818
4 changed files with 11 additions and 5 deletions
|
@ -76,7 +76,7 @@ const Descriptor AcousticEchoCancelerSw::kDescriptor = {
|
||||||
.proxy = std::nullopt},
|
.proxy = std::nullopt},
|
||||||
.flags = {.type = Flags::Type::PRE_PROC,
|
.flags = {.type = Flags::Type::PRE_PROC,
|
||||||
.insert = Flags::Insert::FIRST,
|
.insert = Flags::Insert::FIRST,
|
||||||
.volume = Flags::Volume::CTRL},
|
.volume = Flags::Volume::NONE},
|
||||||
.name = AcousticEchoCancelerSw::kEffectName,
|
.name = AcousticEchoCancelerSw::kEffectName,
|
||||||
.implementor = "The Android Open Source Project"},
|
.implementor = "The Android Open Source Project"},
|
||||||
.capability = AcousticEchoCancelerSw::kCapability};
|
.capability = AcousticEchoCancelerSw::kCapability};
|
||||||
|
|
|
@ -67,7 +67,7 @@ const Descriptor NoiseSuppressionSw::kDescriptor = {
|
||||||
.proxy = std::nullopt},
|
.proxy = std::nullopt},
|
||||||
.flags = {.type = Flags::Type::PRE_PROC,
|
.flags = {.type = Flags::Type::PRE_PROC,
|
||||||
.insert = Flags::Insert::FIRST,
|
.insert = Flags::Insert::FIRST,
|
||||||
.volume = Flags::Volume::CTRL},
|
.volume = Flags::Volume::NONE},
|
||||||
.name = NoiseSuppressionSw::kEffectName,
|
.name = NoiseSuppressionSw::kEffectName,
|
||||||
.implementor = "The Android Open Source Project"}};
|
.implementor = "The Android Open Source Project"}};
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ const Descriptor VisualizerSw::kDescriptor = {
|
||||||
.proxy = std::nullopt},
|
.proxy = std::nullopt},
|
||||||
.flags = {.type = Flags::Type::INSERT,
|
.flags = {.type = Flags::Type::INSERT,
|
||||||
.insert = Flags::Insert::FIRST,
|
.insert = Flags::Insert::FIRST,
|
||||||
.volume = Flags::Volume::CTRL},
|
.volume = Flags::Volume::NONE},
|
||||||
.name = VisualizerSw::kEffectName,
|
.name = VisualizerSw::kEffectName,
|
||||||
.implementor = "The Android Open Source Project"},
|
.implementor = "The Android Open Source Project"},
|
||||||
.capability = VisualizerSw::kCapability};
|
.capability = VisualizerSw::kCapability};
|
||||||
|
|
|
@ -596,8 +596,14 @@ TEST_P(AudioEffectTest, SetAndGetParameterVolume) {
|
||||||
|
|
||||||
Parameter::Id id = Parameter::Id::make<Parameter::Id::commonTag>(Parameter::volumeStereo);
|
Parameter::Id id = Parameter::Id::make<Parameter::Id::commonTag>(Parameter::volumeStereo);
|
||||||
Parameter::VolumeStereo volume = {.left = 10.0, .right = 10.0};
|
Parameter::VolumeStereo volume = {.left = 10.0, .right = 10.0};
|
||||||
ASSERT_NO_FATAL_FAILURE(
|
if (mDescriptor.common.flags.volume == Flags::Volume::CTRL) {
|
||||||
setAndGetParameter(id, Parameter::make<Parameter::volumeStereo>(volume)));
|
Parameter get;
|
||||||
|
EXPECT_IS_OK(mEffect->setParameter(volume));
|
||||||
|
EXPECT_IS_OK(mEffect->getParameter(id, &get));
|
||||||
|
} else {
|
||||||
|
ASSERT_NO_FATAL_FAILURE(
|
||||||
|
setAndGetParameter(id, Parameter::make<Parameter::volumeStereo>(volume)));
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT_NO_FATAL_FAILURE(command(mEffect, CommandId::STOP));
|
ASSERT_NO_FATAL_FAILURE(command(mEffect, CommandId::STOP));
|
||||||
ASSERT_NO_FATAL_FAILURE(expectState(mEffect, State::IDLE));
|
ASSERT_NO_FATAL_FAILURE(expectState(mEffect, State::IDLE));
|
||||||
|
|
Loading…
Reference in a new issue