Merge "Effect AIDL: skip volume checking" into main

This commit is contained in:
Shunkai Yao 2023-11-27 20:03:49 +00:00 committed by Gerrit Code Review
commit a1d092a818
4 changed files with 11 additions and 5 deletions

View file

@ -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};

View file

@ -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"}};

View file

@ -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};

View file

@ -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};
if (mDescriptor.common.flags.volume == Flags::Volume::CTRL) {
Parameter get;
EXPECT_IS_OK(mEffect->setParameter(volume));
EXPECT_IS_OK(mEffect->getParameter(id, &get));
} else {
ASSERT_NO_FATAL_FAILURE( ASSERT_NO_FATAL_FAILURE(
setAndGetParameter(id, Parameter::make<Parameter::volumeStereo>(volume))); 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));