diff --git a/audio/aidl/default/spatializer/SpatializerSw.cpp b/audio/aidl/default/spatializer/SpatializerSw.cpp index ab4a53e13b..fd3c192cfa 100644 --- a/audio/aidl/default/spatializer/SpatializerSw.cpp +++ b/audio/aidl/default/spatializer/SpatializerSw.cpp @@ -64,7 +64,12 @@ namespace aidl::android::hardware::audio::effect { const std::string SpatializerSw::kEffectName = "SpatializerSw"; +const AudioChannelLayout kSupportedChannelMask = + AudioChannelLayout::make( + AudioChannelLayout::LAYOUT_5POINT1); const std::vector SpatializerSw::kRanges = { + MAKE_RANGE(Spatializer, supportedChannelLayout, {kSupportedChannelMask}, + {kSupportedChannelMask}), MAKE_RANGE(Spatializer, spatializationLevel, Spatialization::Level::NONE, Spatialization::Level::BED_PLUS_OBJECTS), MAKE_RANGE(Spatializer, spatializationMode, Spatialization::Mode::BINAURAL, @@ -133,6 +138,11 @@ ndk::ScopedAStatus SpatializerSw::getParameterSpecific(const Parameter::Id& id, } std::shared_ptr SpatializerSw::createContext(const Parameter::Common& common) { + if (common.input.base.channelMask != kSupportedChannelMask) { + LOG(ERROR) << __func__ + << " channelMask not supported: " << common.input.base.channelMask.toString(); + return nullptr; + } if (mContext) { LOG(DEBUG) << __func__ << " context already exist"; } else { diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h index 0fdf7a75e2..72a4667b0a 100644 --- a/audio/aidl/vts/EffectHelper.h +++ b/audio/aidl/vts/EffectHelper.h @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -42,13 +43,18 @@ using namespace android; using aidl::android::hardware::audio::effect::CommandId; using aidl::android::hardware::audio::effect::Descriptor; +using aidl::android::hardware::audio::effect::getEffectTypeUuidSpatializer; +using aidl::android::hardware::audio::effect::getRange; using aidl::android::hardware::audio::effect::IEffect; +using aidl::android::hardware::audio::effect::isRangeValid; +using aidl::android::hardware::audio::effect::kEffectTypeUuidSpatializer; using aidl::android::hardware::audio::effect::kEventFlagDataMqNotEmpty; using aidl::android::hardware::audio::effect::kEventFlagDataMqUpdate; using aidl::android::hardware::audio::effect::kEventFlagNotEmpty; using aidl::android::hardware::audio::effect::kReopenSupportedVersion; using aidl::android::hardware::audio::effect::Parameter; using aidl::android::hardware::audio::effect::Range; +using aidl::android::hardware::audio::effect::Spatializer; using aidl::android::hardware::audio::effect::State; using aidl::android::hardware::common::fmq::SynchronizedReadWrite; using aidl::android::media::audio::common::AudioChannelLayout; @@ -79,14 +85,16 @@ static inline std::string getPrefix(Descriptor& descriptor) { class EffectHelper { public: - static void create(std::shared_ptr factory, std::shared_ptr& effect, - Descriptor& desc, binder_status_t status = EX_NONE) { + void create(std::shared_ptr factory, std::shared_ptr& effect, + Descriptor& desc, binder_status_t status = EX_NONE) { ASSERT_NE(factory, nullptr); auto& id = desc.common.id; ASSERT_STATUS(status, factory->createEffect(id.uuid, &effect)); if (status == EX_NONE) { ASSERT_NE(effect, nullptr) << toString(id.uuid); } + mIsSpatializer = id.type == getEffectTypeUuidSpatializer(); + mDescriptor = desc; } static void destroyIgnoreRet(std::shared_ptr factory, @@ -110,10 +118,9 @@ class EffectHelper { ASSERT_STATUS(status, effect->open(common, specific, ret)); } - static void open(std::shared_ptr effect, int session = 0, - binder_status_t status = EX_NONE) { + void open(std::shared_ptr effect, int session = 0, binder_status_t status = EX_NONE) { ASSERT_NE(effect, nullptr); - Parameter::Common common = EffectHelper::createParamCommon(session); + Parameter::Common common = createParamCommon(session); IEffect::OpenEffectReturn ret; ASSERT_NO_FATAL_FAILURE(open(effect, common, std::nullopt /* specific */, &ret, status)); } @@ -207,15 +214,31 @@ class EffectHelper { true /* retry */)); EXPECT_TRUE(efState & kEventFlagDataMqUpdate); } - static Parameter::Common createParamCommon( - int session = 0, int ioHandle = -1, int iSampleRate = 48000, int oSampleRate = 48000, - long iFrameCount = 0x100, long oFrameCount = 0x100, - AudioChannelLayout inputChannelLayout = - AudioChannelLayout::make( - AudioChannelLayout::LAYOUT_STEREO), - AudioChannelLayout outputChannelLayout = - AudioChannelLayout::make( - AudioChannelLayout::LAYOUT_STEREO)) { + + Parameter::Common createParamCommon(int session = 0, int ioHandle = -1, int iSampleRate = 48000, + int oSampleRate = 48000, long iFrameCount = 0x100, + long oFrameCount = 0x100) { + AudioChannelLayout defaultLayout = AudioChannelLayout::make( + AudioChannelLayout::LAYOUT_STEREO); + // query supported input layout and use it as the default parameter in common + if (mIsSpatializer && isRangeValid(Spatializer::supportedChannelLayout, + mDescriptor.capability)) { + const auto layoutRange = getRange( + mDescriptor.capability, Spatializer::supportedChannelLayout); + if (std::vector layouts; + layoutRange && + 0 != (layouts = layoutRange->min.get()) + .size()) { + defaultLayout = layouts[0]; + } + } + return createParamCommon(session, ioHandle, iSampleRate, oSampleRate, iFrameCount, + oFrameCount, defaultLayout, defaultLayout); + } + static Parameter::Common createParamCommon(int session, int ioHandle, int iSampleRate, + int oSampleRate, long iFrameCount, long oFrameCount, + AudioChannelLayout inputChannelLayout, + AudioChannelLayout outputChannelLayout) { Parameter::Common common; common.session = session; common.ioHandle = ioHandle; @@ -379,4 +402,7 @@ class EffectHelper { return bufferMag; } + + bool mIsSpatializer; + Descriptor mDescriptor; }; diff --git a/audio/aidl/vts/VtsHalAECTargetTest.cpp b/audio/aidl/vts/VtsHalAECTargetTest.cpp index f972b84c7b..53b6757220 100644 --- a/audio/aidl/vts/VtsHalAECTargetTest.cpp +++ b/audio/aidl/vts/VtsHalAECTargetTest.cpp @@ -52,7 +52,7 @@ class AECParamTest : public ::testing::TestWithParam, public ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); auto specific = getDefaultParamSpecific(); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; diff --git a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp index 75da5891e0..f14afbcc29 100644 --- a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp +++ b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp @@ -53,7 +53,7 @@ class AGC1ParamTest : public ::testing::TestWithParam, publi ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); Parameter::Specific specific = getDefaultParamSpecific(); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; diff --git a/audio/aidl/vts/VtsHalAGC2TargetTest.cpp b/audio/aidl/vts/VtsHalAGC2TargetTest.cpp index 5f57a88c05..048d540403 100644 --- a/audio/aidl/vts/VtsHalAGC2TargetTest.cpp +++ b/audio/aidl/vts/VtsHalAGC2TargetTest.cpp @@ -54,7 +54,7 @@ class AGC2ParamTest : public ::testing::TestWithParam, publi ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); Parameter::Specific specific = getDefaultParamSpecific(); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; diff --git a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp index 5b83d73dfd..2f47d07702 100644 --- a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp +++ b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp @@ -396,7 +396,7 @@ TEST_P(AudioEffectTest, NormalSequenceStates) { TEST_P(AudioEffectTest, VerifyCommonParametersAfterOpen) { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); - Parameter::Common common = EffectHelper::createParamCommon(); + Parameter::Common common = createParamCommon(); IEffect::OpenEffectReturn ret; ASSERT_NO_FATAL_FAILURE(open(mEffect, common, std::nullopt /* specific */, &ret, EX_NONE)); @@ -416,8 +416,8 @@ TEST_P(AudioEffectTest, SetAndGetCommonParameter) { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); ASSERT_NO_FATAL_FAILURE(open(mEffect)); - Parameter::Common common = EffectHelper::createParamCommon( - 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */); + Parameter::Common common = createParamCommon(0 /* session */, 1 /* ioHandle */, + 44100 /* iSampleRate */, 44100 /* oSampleRate */); Parameter::Id id = Parameter::Id::make(Parameter::common); ASSERT_NO_FATAL_FAILURE(setAndGetParameter(id, Parameter::make(common))); @@ -432,8 +432,8 @@ TEST_P(AudioEffectTest, SetAndGetParameterInProcessing) { ASSERT_NO_FATAL_FAILURE(command(mEffect, CommandId::START)); ASSERT_NO_FATAL_FAILURE(expectState(mEffect, State::PROCESSING)); - Parameter::Common common = EffectHelper::createParamCommon( - 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */); + Parameter::Common common = createParamCommon(0 /* session */, 1 /* ioHandle */, + 44100 /* iSampleRate */, 44100 /* oSampleRate */); Parameter::Id id = Parameter::Id::make(Parameter::common); ASSERT_NO_FATAL_FAILURE(setAndGetParameter(id, Parameter::make(common))); @@ -451,8 +451,8 @@ TEST_P(AudioEffectTest, SetAndGetParameterInIdle) { ASSERT_NO_FATAL_FAILURE(command(mEffect, CommandId::STOP)); ASSERT_NO_FATAL_FAILURE(expectState(mEffect, State::IDLE)); - Parameter::Common common = EffectHelper::createParamCommon( - 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */); + Parameter::Common common = createParamCommon(0 /* session */, 1 /* ioHandle */, + 44100 /* iSampleRate */, 44100 /* oSampleRate */); Parameter::Id id = Parameter::Id::make(Parameter::common); ASSERT_NO_FATAL_FAILURE(setAndGetParameter(id, Parameter::make(common))); @@ -467,8 +467,8 @@ TEST_P(AudioEffectTest, SetAndGetParameterAfterStop) { ASSERT_NO_FATAL_FAILURE(command(mEffect, CommandId::START)); ASSERT_NO_FATAL_FAILURE(expectState(mEffect, State::PROCESSING)); - Parameter::Common common = EffectHelper::createParamCommon( - 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */); + Parameter::Common common = createParamCommon(0 /* session */, 1 /* ioHandle */, + 44100 /* iSampleRate */, 44100 /* oSampleRate */); Parameter::Id id = Parameter::Id::make(Parameter::common); ASSERT_NO_FATAL_FAILURE(setAndGetParameter(id, Parameter::make(common))); @@ -486,8 +486,8 @@ TEST_P(AudioEffectTest, SetAndGetParameterAfterReset) { ASSERT_NO_FATAL_FAILURE(command(mEffect, CommandId::START)); ASSERT_NO_FATAL_FAILURE(expectState(mEffect, State::PROCESSING)); - Parameter::Common common = EffectHelper::createParamCommon( - 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */); + Parameter::Common common = createParamCommon(0 /* session */, 1 /* ioHandle */, + 44100 /* iSampleRate */, 44100 /* oSampleRate */); Parameter::Id id = Parameter::Id::make(Parameter::common); ASSERT_NO_FATAL_FAILURE(setAndGetParameter(id, Parameter::make(common))); @@ -621,7 +621,7 @@ TEST_P(AudioEffectDataPathTest, SetCommonParameterAndReopen) { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; @@ -666,7 +666,7 @@ TEST_P(AudioEffectDataPathTest, SetCommonParameterAndReopen) { TEST_P(AudioEffectDataPathTest, ConsumeDataInProcessingState) { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; @@ -700,7 +700,7 @@ TEST_P(AudioEffectDataPathTest, ConsumeDataInProcessingState) { TEST_P(AudioEffectDataPathTest, ConsumeDataAfterRestart) { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; @@ -744,7 +744,7 @@ TEST_P(AudioEffectDataPathTest, ConsumeDataAfterReopen) { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; @@ -797,7 +797,7 @@ TEST_P(AudioEffectDataPathTest, ConsumeDataAfterReopen) { TEST_P(AudioEffectDataPathTest, SendDataAtIdleAndConsumeDataInProcessing) { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; @@ -831,7 +831,7 @@ TEST_P(AudioEffectDataPathTest, SendDataAtIdleAndConsumeDataInProcessing) { TEST_P(AudioEffectDataPathTest, ProcessDataMultipleTimes) { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; @@ -871,7 +871,7 @@ TEST_P(AudioEffectDataPathTest, ProcessDataMultipleTimes) { TEST_P(AudioEffectDataPathTest, ConsumeDataAndRestart) { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; @@ -913,7 +913,7 @@ TEST_P(AudioEffectDataPathTest, ConsumeDataAndRestart) { TEST_P(AudioEffectDataPathTest, NotConsumeDataByClosedEffect) { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; @@ -942,10 +942,10 @@ TEST_P(AudioEffectDataPathTest, ConsumeDataMultipleEffects) { ASSERT_NO_FATAL_FAILURE(create(mFactory, effect1, mDescriptor)); ASSERT_NO_FATAL_FAILURE(create(mFactory, effect2, mDescriptor)); - Parameter::Common common1 = EffectHelper::createParamCommon( + Parameter::Common common1 = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); - Parameter::Common common2 = EffectHelper::createParamCommon( + Parameter::Common common2 = createParamCommon( 1 /* session */, 1 /* ioHandle */, 48000 /* iSampleRate */, 48000 /* oSampleRate */, 2 * kInputFrameCount /* iFrameCount */, 2 * kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret1, ret2; diff --git a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp index 4cb1f496d4..abc5a915a6 100644 --- a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp +++ b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp @@ -57,7 +57,7 @@ class BassBoostEffectHelper : public EffectHelper { AudioChannelLayout::make(layout); Parameter::Specific specific = getDefaultParamSpecific(); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, kSamplingFrequency /* iSampleRate */, kSamplingFrequency /* oSampleRate */, mInputFrameCount /* iFrameCount */, mOutputFrameCount /* oFrameCount */, channelLayout, channelLayout); diff --git a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp index ef77f4d51e..844a3408c9 100644 --- a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp +++ b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp @@ -97,7 +97,9 @@ class DownmixEffectHelper : public EffectHelper { Parameter::Common common = EffectHelper::createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */, - inputChannelLayout); + inputChannelLayout, + AudioChannelLayout::make( + AudioChannelLayout::LAYOUT_STEREO)); ASSERT_NO_FATAL_FAILURE(open(mEffect, common, specific, &mOpenEffectReturn, EX_NONE)); ASSERT_NE(nullptr, mEffect); } diff --git a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp index 12b17970c3..0c201cc9b8 100644 --- a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp +++ b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp @@ -57,7 +57,7 @@ class DynamicsProcessingTestHelper : public EffectHelper { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); Parameter::Specific specific = getDefaultParamSpecific(); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, 0x100 /* iFrameCount */, 0x100 /* oFrameCount */, AudioChannelLayout::make(mChannelLayout), diff --git a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp index f641fa5f37..93a3dcd71a 100644 --- a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp +++ b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp @@ -49,7 +49,7 @@ class EnvironmentalReverbHelper : public EffectHelper { ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); Parameter::Specific specific = getDefaultParamSpecific(); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; diff --git a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp index d7dbe3883a..0c931ffa3e 100644 --- a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp +++ b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp @@ -71,7 +71,7 @@ class EqualizerTest : public ::testing::TestWithParam, ASSERT_NE(nullptr, mFactory); ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; diff --git a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp index 48e59dcce6..6af326d01b 100644 --- a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp +++ b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp @@ -88,7 +88,7 @@ class HapticGeneratorParamTest : public ::testing::TestWithParam, public Ef ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); std::optional specific = getDefaultParamSpecific(); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */, kInputFrameCount /* iFrameCount */, kOutputFrameCount /* oFrameCount */); IEffect::OpenEffectReturn ret; diff --git a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp index 300939e965..2229ff837a 100644 --- a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp +++ b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp @@ -39,7 +39,7 @@ class PresetReverbHelper : public EffectHelper { ASSERT_NE(nullptr, mFactory); ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor)); Parameter::Specific specific = getDefaultParamSpecific(); - Parameter::Common common = EffectHelper::createParamCommon( + Parameter::Common common = createParamCommon( 0 /* session */, 1 /* ioHandle */, kSamplingFrequency /* iSampleRate */, kSamplingFrequency /* oSampleRate */, mFrameCount /* iFrameCount */, mFrameCount /* oFrameCount */); diff --git a/audio/aidl/vts/VtsHalSpatializerTargetTest.cpp b/audio/aidl/vts/VtsHalSpatializerTargetTest.cpp index f0b51b98c5..1f498e2476 100644 --- a/audio/aidl/vts/VtsHalSpatializerTargetTest.cpp +++ b/audio/aidl/vts/VtsHalSpatializerTargetTest.cpp @@ -79,7 +79,7 @@ class SpatializerParamTest : public ::testing::TestWithParam