Home
last modified time | relevance | path

Searched refs:effect (Results 1 – 25 of 217) sorted by relevance

123456789

/frameworks/av/media/libeffects/preprocessing/
DPreProcessing.cpp259 int Agc2Init(preproc_effect_t* effect) { in Agc2Init() argument
261 effect->session->config = effect->session->apm->GetConfig(); in Agc2Init()
262 effect->session->config.gain_controller2.fixed_digital.gain_db = 0.f; in Agc2Init()
263 effect->session->config.gain_controller2.adaptive_digital.level_estimator = in Agc2Init()
264 effect->session->config.gain_controller2.kRms; in Agc2Init()
265 effect->session->config.gain_controller2.adaptive_digital.extra_saturation_margin_db = 2.f; in Agc2Init()
266 effect->session->apm->ApplyConfig(effect->session->config); in Agc2Init()
270 int AgcInit(preproc_effect_t* effect) { in AgcInit() argument
272 effect->session->config = effect->session->apm->GetConfig(); in AgcInit()
273 effect->session->config.gain_controller1.target_level_dbfs = kAgcDefaultTargetLevel; in AgcInit()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/audio/
DMediaAudioEffectTest.java166 AudioEffect effect = new AudioEffect(desc[0].type, in test1_0ConstructorFromType() local
170 assertNotNull(msg + ": could not create AudioEffect", effect); in test1_0ConstructorFromType()
172 assertTrue(msg +": invalid effect ID", (effect.getId() != 0)); in test1_0ConstructorFromType()
177 effect.release(); in test1_0ConstructorFromType()
208 AudioEffect effect = new AudioEffect(AudioEffect.EFFECT_TYPE_NULL, in test1_1ConstructorFromUuid() local
212 assertNotNull(msg + ": could not create AudioEffect", effect); in test1_1ConstructorFromUuid()
213 effect.release(); in test1_1ConstructorFromUuid()
234 AudioEffect effect = new AudioEffect(UUID.randomUUID(), in test1_2ConstructorUnknownType() local
239 if (effect != null) { in test1_2ConstructorUnknownType()
240 effect.release(); in test1_2ConstructorUnknownType()
[all …]
/frameworks/base/libs/hwui/jni/
DPathEffect.cpp12 SkPathEffect* effect = reinterpret_cast<SkPathEffect*>(effectHandle); in destructor() local
13 SkSafeUnref(effect); in destructor()
20 SkPathEffect* effect = SkPathEffect::MakeCompose(sk_ref_sp(outer), in Compose_constructor() local
22 return reinterpret_cast<jlong>(effect); in Compose_constructor()
29 SkPathEffect* effect = SkPathEffect::MakeSum(sk_ref_sp(first), in Sum_constructor() local
31 return reinterpret_cast<jlong>(effect); in Sum_constructor()
43 SkPathEffect* effect = SkDashPathEffect::Make(intervals, count, phase).release(); in Dash_constructor() local
44 return reinterpret_cast<jlong>(effect); in Dash_constructor()
51 SkPathEffect* effect = SkPath1DPathEffect::Make(*shape, advance, phase, in OneD_constructor() local
53 return reinterpret_cast<jlong>(effect); in OneD_constructor()
[all …]
/frameworks/av/services/audioflinger/
DDeviceEffectManager.cpp51 for (auto& effect : mDeviceEffects) { in onCreateAudioPatch() local
52 status_t status = effect.second->onCreatePatch(handle, patch); in onCreateAudioPatch()
66 for (auto& effect : mDeviceEffects) { in onReleaseAudioPatch() local
67 effect.second->onReleasePatch(handle); in onReleaseAudioPatch()
82 sp<DeviceEffectProxy> effect; in createEffect_l() local
96 effect = iter->second; in createEffect_l()
98 effect = new DeviceEffectProxy(device, mMyCallback, in createEffect_l()
103 handle = new EffectHandle(effect, client, effectClient, 0 /*priority*/, in createEffect_l()
107 lStatus = effect->addHandle(handle.get()); in createEffect_l()
109 effect->init(patches); in createEffect_l()
[all …]
DDeviceEffectManager.h45 size_t removeEffect(const sp<DeviceEffectProxy>& effect);
48 sp<EffectHalInterface> *effect);
50 sp<EffectHalInterface> effect) { in addEffectToHal() argument
51 return mAudioFlinger.addEffectToHal(deviceId, hwModuleId, effect); in addEffectToHal()
54 sp<EffectHalInterface> effect) { in removeEffectFromHal() argument
55 return mAudioFlinger.removeEffectFromHal(deviceId, hwModuleId, effect); in removeEffectFromHal()
153 sp<EffectHalInterface> *effect) override { in createEffectHal() argument
154 return mManager.createEffectHal(pEffectUuid, sessionId, deviceId, effect); in createEffectHal()
158 bool updateOrphanEffectChains(const sp<EffectBase>& effect __unused) override { return false; } in updateOrphanEffectChains()
179 status_t addEffectToHal(sp<EffectHalInterface> effect __unused) override { in addEffectToHal()
[all …]
DEffects.cpp1723 AudioFlinger::EffectHandle::EffectHandle(const sp<EffectBase>& effect, in EffectHandle() argument
1728 mEffect(effect), mEffectClient(effectClient), mClient(client), mCblk(NULL), in EffectHandle()
1811 sp<EffectBase> effect = mEffect.promote(); in enable() local
1812 if (effect == 0 || mDisconnected) { in enable()
1825 status_t status = effect->updatePolicyState(); in enable()
1831 effect->checkSuspendOnEffectEnabled(true, false /*threadLocked*/); in enable()
1834 if (effect->suspended()) { in enable()
1838 status = effect->setEnabled(true, true /*fromHandle*/); in enable()
1849 sp<EffectBase> effect = mEffect.promote(); in disable() local
1850 if (effect == 0 || mDisconnected) { in disable()
[all …]
/frameworks/native/cmds/idlcli/vibrator/
DCommandCompose.cpp59 CompositeEffect effect; in doArgs() local
60 if (auto delay = args.pop<decltype(effect.delayMs)>()) { in doArgs()
61 effect.delayMs = *delay; in doArgs()
62 std::cout << "Delay: " << effect.delayMs << std::endl; in doArgs()
67 if (auto primitive = args.pop<decltype(effect.primitive)>()) { in doArgs()
68 effect.primitive = *primitive; in doArgs()
69 std::cout << "Primitive: " << toString(effect.primitive) << std::endl; in doArgs()
74 if (auto scale = args.pop<decltype(effect.scale)>(); in doArgs()
76 effect.scale = *scale; in doArgs()
77 std::cout << "Scale: " << effect.scale << std::endl; in doArgs()
[all …]
/frameworks/base/core/java/android/content/integrity/
DRule.java66 public Rule(@NonNull IntegrityFormula formula, @Effect int effect) { in Rule() argument
67 checkArgument(isValidEffect(effect), "Unknown effect: %d", effect); in Rule() local
69 this.mEffect = effect; in Rule()
133 private static String effectToString(int effect) { in effectToString() argument
134 switch (effect) { in effectToString()
140 throw new IllegalArgumentException("Unknown effect " + effect); in effectToString()
144 private static boolean isValidEffect(int effect) { in isValidEffect() argument
145 return effect == DENY || effect == FORCE_ALLOW; in isValidEffect()
/frameworks/base/services/core/java/com/android/server/vibrator/
DStartSequentialEffectStep.java60 CombinedVibration.Sequential effect) { in StartSequentialEffectStep() argument
61 this(conductor, SystemClock.uptimeMillis() + effect.getDelays().get(0), effect, in StartSequentialEffectStep()
67 CombinedVibration.Sequential effect, int index) { in StartSequentialEffectStep() argument
69 sequentialEffect = effect; in StartSequentialEffectStep()
88 CombinedVibration effect = sequentialEffect.getEffects().get(currentIndex); in play() local
89 DeviceEffectMap effectMapping = createEffectToVibratorMapping(effect); in play()
143 CombinedVibration effect) { in createEffectToVibratorMapping() argument
144 if (effect instanceof CombinedVibration.Mono) { in createEffectToVibratorMapping()
145 return new DeviceEffectMap((CombinedVibration.Mono) effect); in createEffectToVibratorMapping()
147 if (effect instanceof CombinedVibration.Stereo) { in createEffectToVibratorMapping()
[all …]
DComposePrimitivesVibratorStep.java42 VibratorController controller, VibrationEffect.Composed effect, int index, in ComposePrimitivesVibratorStep() argument
46 super(conductor, Math.max(startTime, previousStepVibratorOffTimeout), controller, effect, in ComposePrimitivesVibratorStep()
57 List<PrimitiveSegment> primitives = unrollPrimitiveSegments(effect, segmentIndex, in play()
62 + effect.getSegments().get(segmentIndex)); in play()
94 private List<PrimitiveSegment> unrollPrimitiveSegments(VibrationEffect.Composed effect, in unrollPrimitiveSegments() argument
97 int segmentCount = effect.getSegments().size(); in unrollPrimitiveSegments()
98 int repeatIndex = effect.getRepeatIndex(); in unrollPrimitiveSegments()
109 VibrationEffectSegment segment = effect.getSegments().get(i); in unrollPrimitiveSegments()
DSetAmplitudeVibratorStep.java45 VibratorController controller, VibrationEffect.Composed effect, int index, in SetAmplitudeVibratorStep() argument
48 super(conductor, startTime, controller, effect, index, previousStepVibratorOffTimeout); in SetAmplitudeVibratorStep()
83 effect, segmentIndex, mNextOffTime)); in play()
86 VibrationEffectSegment segment = effect.getSegments().get(segmentIndex); in play()
110 long onDuration = getVibratorOnDuration(effect, segmentIndex); in play()
129 long onDuration = getVibratorOnDuration(effect, segmentIndex); in turnVibratorBackOn()
161 private long getVibratorOnDuration(VibrationEffect.Composed effect, int startIndex) { in getVibratorOnDuration() argument
162 List<VibrationEffectSegment> segments = effect.getSegments(); in getVibratorOnDuration()
164 int repeatIndex = effect.getRepeatIndex(); in getVibratorOnDuration()
184 if (i == segmentCount && effect.getRepeatIndex() < 0) { in getVibratorOnDuration()
DComposePwleVibratorStep.java43 VibratorController controller, VibrationEffect.Composed effect, int index, in ComposePwleVibratorStep() argument
47 super(conductor, Math.max(startTime, previousStepVibratorOffTimeout), controller, effect, in ComposePwleVibratorStep()
58 List<RampSegment> pwles = unrollRampSegments(effect, segmentIndex, in play()
63 + effect.getSegments().get(segmentIndex)); in play()
95 private List<RampSegment> unrollRampSegments(VibrationEffect.Composed effect, int startIndex, in unrollRampSegments() argument
101 int segmentCount = effect.getSegments().size(); in unrollRampSegments()
102 int repeatIndex = effect.getRepeatIndex(); in unrollRampSegments()
115 VibrationEffectSegment segment = effect.getSegments().get(i); in unrollRampSegments()
DVibration.java117 Vibration(IBinder token, int id, CombinedVibration effect, in Vibration() argument
120 this.mEffect = effect; in Vibration()
169 public void addFallback(int effectId, VibrationEffect effect) { in addFallback() argument
170 mFallbacks.put(effectId, effect); in addFallback()
197 VibrationEffect effect = ((CombinedVibration.Mono) combinedEffect).getEffect(); in transformCombinedEffect() local
198 return CombinedVibration.createParallel(fn.apply(effect)); in transformCombinedEffect()
213 for (CombinedVibration effect : effects) { in transformCombinedEffect()
214 combination.addNext(transformCombinedEffect(effect, fn)); in transformCombinedEffect()
315 DebugInfo(Status status, VibrationStats stats, @Nullable CombinedVibration effect, in DebugInfo() argument
322 mEffect = effect; in DebugInfo()
[all …]
/frameworks/av/media/libaudioclient/include/media/
DAudioEffect.h631 EffectClient(AudioEffect *effect) : mEffect(effect){} in EffectClient() argument
635 sp<AudioEffect> effect = mEffect.promote(); in controlStatusChanged() local
636 if (effect != 0) { in controlStatusChanged()
637 effect->controlStatusChanged(controlGranted); in controlStatusChanged()
642 sp<AudioEffect> effect = mEffect.promote(); in enableStatusChanged() local
643 if (effect != 0) { in enableStatusChanged()
644 effect->enableStatusChanged(enabled); in enableStatusChanged()
651 sp<AudioEffect> effect = mEffect.promote(); in commandExecuted() local
652 if (effect != 0) { in commandExecuted()
653 effect->commandExecuted(cmdCode, cmdData, replyData); in commandExecuted()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/vibrator/
DDeviceVibrationEffectAdapterTest.java91 VibrationEffect.Composed effect = new VibrationEffect.Composed(Arrays.asList( in testPrebakedAndPrimitiveSegments_returnsOriginalSegment() local
100 assertEquals(effect, mAdapter.apply(effect, createVibratorInfo(EMPTY_FREQUENCY_PROFILE))); in testPrebakedAndPrimitiveSegments_returnsOriginalSegment()
101 assertEquals(effect, mAdapter.apply(effect, createVibratorInfo(TEST_FREQUENCY_PROFILE))); in testPrebakedAndPrimitiveSegments_returnsOriginalSegment()
106 VibrationEffect.Composed effect = new VibrationEffect.Composed(Arrays.asList( in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps() local
117 VibrationEffect.Composed adaptedEffect = (VibrationEffect.Composed) mAdapter.apply(effect, in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps()
119 assertTrue(adaptedEffect.getSegments().size() > effect.getSegments().size()); in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps()
120 assertTrue(adaptedEffect.getRepeatIndex() >= effect.getRepeatIndex()); in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps()
129 VibrationEffect.Composed effect = new VibrationEffect.Composed(Arrays.asList( in testStepAndRampSegments_withPwleCapability_convertsStepsToRamps() local
151 assertEquals(expected, mAdapter.apply(effect, info)); in testStepAndRampSegments_withPwleCapability_convertsStepsToRamps()
156 VibrationEffect.Composed effect = new VibrationEffect.Composed(Arrays.asList( in testStepAndRampSegments_withEmptyFreqMapping_returnsAmplitudesWithResonantFreq() local
[all …]
DVibrationThreadTest.java158 CombinedVibration effect = CombinedVibration.createParallel( in vibrate_noVibrator_ignoresVibration() local
160 startThreadAndDispatcher(vibrationId, effect); in vibrate_noVibrator_ignoresVibration()
170 CombinedVibration effect = CombinedVibration.startSequential() in vibrate_missingVibrators_ignoresVibration() local
174 startThreadAndDispatcher(vibrationId, effect); in vibrate_missingVibrators_ignoresVibration()
186 VibrationEffect effect = VibrationEffect.createOneShot(10, 100); in vibrate_singleVibratorOneShot_runsVibrationAndSetsAmplitude() local
187 startThreadAndDispatcher(vibrationId, effect); in vibrate_singleVibratorOneShot_runsVibrationAndSetsAmplitude()
205 VibrationEffect effect = VibrationEffect.createOneShot(10, 100); in vibrate_oneShotWithoutAmplitudeControl_runsVibrationWithDefaultAmplitude() local
206 startThreadAndDispatcher(vibrationId, effect); in vibrate_oneShotWithoutAmplitudeControl_runsVibrationWithDefaultAmplitude()
226 VibrationEffect effect = VibrationEffect.createWaveform( in vibrate_singleVibratorWaveform_runsVibrationAndChangesAmplitudes() local
228 startThreadAndDispatcher(vibrationId, effect); in vibrate_singleVibratorWaveform_runsVibrationAndChangesAmplitudes()
[all …]
/frameworks/av/media/libaudiohal/impl/
DAndroid.bp82 "android.hardware.audio.effect@4.0",
83 "android.hardware.audio.effect@4.0-util",
105 "android.hardware.audio.effect@5.0",
106 "android.hardware.audio.effect@5.0-util",
128 "android.hardware.audio.effect@6.0",
129 "android.hardware.audio.effect@6.0-util",
141 name: "libaudiohal.effect@7.0",
149 "android.hardware.audio.effect@7.0",
150 "android.hardware.audio.effect@7.0-util",
170 "android.hardware.audio.effect@7.0",
[all …]
/frameworks/av/media/libeffects/factory/
DEffectsXmlConfigLoader.cpp212 LoadEffectResult loadEffect(const EffectImpl& effect, const std::string& name, in loadEffect() argument
217 result.lib = findLibrary(effect.library->name.c_str(), libList); in loadEffect()
220 effect.library->name.c_str(), name.c_str()); in loadEffect()
227 if (result.lib->desc->get_descriptor(&effect.uuid, result.effectDesc.get()) != 0) { in loadEffect()
229 uuidToString(effect.uuid), result.lib->name); in loadEffect()
250 if (findEffect(nullptr, &effect.uuid, &_, nullptr) == 0) { in loadEffect()
251 ALOGE("Effect %s uuid %s already exist", uuidToString(effect.uuid), name.c_str()); in loadEffect()
263 for (auto& effect : effects) { in loadEffects() local
265 auto effectLoadResult = loadEffect(effect, effect.name, libList); in loadEffects()
274 if (effect.isProxy) { in loadEffects()
[all …]
/frameworks/base/core/java/android/os/
DCombinedVibration.java57 public static CombinedVibration createParallel(@NonNull VibrationEffect effect) { in createParallel() argument
58 CombinedVibration combined = new Mono(effect); in createParallel()
155 public ParallelCombination addVibrator(int vibratorId, @NonNull VibrationEffect effect) { in addVibrator() argument
156 mEffects.put(vibratorId, effect); in addVibrator()
209 public SequentialCombination addNext(int vibratorId, @NonNull VibrationEffect effect) { in addNext() argument
210 return addNext(vibratorId, effect, /* delay= */ 0); in addNext()
228 public SequentialCombination addNext(int vibratorId, @NonNull VibrationEffect effect, in addNext() argument
231 CombinedVibration.startParallel().addVibrator(vibratorId, effect).combine(), in addNext()
247 public SequentialCombination addNext(@NonNull CombinedVibration effect) { in addNext() argument
248 return addNext(effect, /* delay= */ 0); in addNext()
[all …]
DVibratorManager.java84 @Nullable CombinedVibration effect, @Nullable VibrationAttributes attributes) { in setAlwaysOnEffect() argument
102 public final void vibrate(@NonNull CombinedVibration effect) { in vibrate() argument
103 vibrate(effect, null); in vibrate()
124 public final void vibrate(@NonNull CombinedVibration effect, in vibrate() argument
126 vibrate(Process.myUid(), mPackageName, effect, null, attributes); in vibrate() local
136 public abstract void vibrate(int uid, String opPkg, @NonNull CombinedVibration effect, in vibrate() argument
/frameworks/base/services/core/java/com/android/server/notification/
DVibratorHelper.java124 VibrationEffect effect = waveformBuilder.build(); in createPwleWaveformVibration() local
127 .repeatEffectIndefinitely(effect) in createPwleWaveformVibration()
130 return effect; in createPwleWaveformVibration()
143 public void vibrate(VibrationEffect effect, AudioAttributes attrs, String reason) { in vibrate() argument
145 effect, reason, new VibrationAttributes.Builder(attrs).build()); in vibrate()
162 VibrationEffect effect = createPwleWaveformVibration(mFallbackPwlePattern, insistent); in createFallbackVibration() local
163 if (effect != null) { in createFallbackVibration()
164 return effect; in createFallbackVibration()
177 VibrationEffect effect = createPwleWaveformVibration(mDefaultPwlePattern, insistent); in createDefaultVibration() local
178 if (effect != null) { in createDefaultVibration()
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DVibratorHelperTest.java110 private void assertRepeatingVibration(VibrationEffect effect) { in assertRepeatingVibration() argument
111 assertTrue(getRepeatIndex(effect) >= 0); in assertRepeatingVibration()
114 private void assertSingleVibration(VibrationEffect effect) { in assertSingleVibration() argument
115 assertEquals(-1, getRepeatIndex(effect)); in assertSingleVibration()
118 private static int getRepeatIndex(VibrationEffect effect) { in getRepeatIndex() argument
119 assertTrue("Unknown vibration effect " + effect, in getRepeatIndex()
120 effect instanceof VibrationEffect.Composed); in getRepeatIndex()
121 return ((VibrationEffect.Composed) effect).getRepeatIndex(); in getRepeatIndex()
/frameworks/native/services/vibratorservice/
DVibratorHalWrapper.cpp51 bool isStaticCastValid(Effect effect) { in isStaticCastValid() argument
52 T castEffect = static_cast<T>(effect); in isStaticCastValid()
314 HalResult<void> AidlHalWrapper::alwaysOnEnable(int32_t id, Effect effect, EffectStrength strength) { in alwaysOnEnable() argument
315 return HalResult<void>::fromStatus(getHal()->alwaysOnEnable(id, effect, strength)); in alwaysOnEnable()
323 Effect effect, EffectStrength strength, const std::function<void()>& completionCallback) { in performEffect() argument
330 auto result = getHal()->perform(effect, strength, cb, &lengthMs); in performEffect()
349 for (const auto& effect : primitives) { in performComposedEffect() local
350 auto primitiveIdx = static_cast<size_t>(effect.primitive); in performComposedEffect()
357 duration += milliseconds(effect.delayMs); in performComposedEffect()
556 perform_fn<T> performFn, sp<I> handle, T effect, EffectStrength strength, in performInternal() argument
[all …]
/frameworks/av/services/audiopolicy/common/managerdefinitions/src/
DAudioInputDescriptor.cpp420 void AudioInputDescriptor::trackEffectEnabled(const sp<EffectDescriptor> &effect, in trackEffectEnabled() argument
424 mEnabledEffects.replaceValueFor(effect->mId, effect); in trackEffectEnabled()
426 mEnabledEffects.removeItem(effect->mId); in trackEffectEnabled()
429 if (effect->mSuspended) { in trackEffectEnabled()
430 effect->mSuspended = false; in trackEffectEnabled()
431 mClientInterface->setEffectSuspended(effect->mId, effect->mSession, effect->mSuspended); in trackEffectEnabled()
435 RecordClientVector clients = getClientsForSession((audio_session_t)effect->mSession); in trackEffectEnabled()
439 sp<EffectDescriptor> clientEffect = client->getEnabledEffects().getEffect(effect->mId); in trackEffectEnabled()
442 client->trackEffectEnabled(effect, enabled); in trackEffectEnabled()
496 sp<EffectDescriptor> effect = mEnabledEffects.valueAt(i); in checkSuspendEffects() local
[all …]
/frameworks/av/media/libeffects/config/src/
DEffectsConfig.cpp170 Effect effect{}; in parseEffect() local
177 effect.name = name; in parseEffect()
180 auto parseImpl = [&libraries](const XMLElement& xmlImpl, EffectImpl& effect) { in parseEffect() argument
195 effect.library = library; in parseEffect()
197 if (!stringToUuid(uuid, &effect.uuid)) { in parseEffect()
204 if (!parseImpl(xmlEffect, effect)) { in parseEffect()
209 effect.isProxy = false; in parseEffect()
211 effect.isProxy = true; in parseEffect()
222 if (!parseProxy("libhw", effect.libHw) || !parseProxy("libsw", effect.libSw)) { in parseEffect()
227 effects->push_back(std::move(effect)); in parseEffect()
[all …]

123456789