blob: 337251cfde0548278be548fed7f2ab445eab86d8 [file] [log] [blame]
Mikhail Naganov60ced762020-07-23 18:08:26 +00001/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.audio.effect@7.0;
18
19import android.hardware.audio.common@7.0;
20import IEffect;
21
22interface IEffectsFactory {
23 /**
24 * Returns descriptors of different effects in all loaded libraries.
25 *
26 * @return retval operation completion status.
27 * @return result list of effect descriptors.
28 */
29 getAllDescriptors() generates(Result retval, vec<EffectDescriptor> result);
30
31 /**
32 * Returns a descriptor of a particular effect.
33 *
34 * @return retval operation completion status.
35 * @return result effect descriptor.
36 */
37 getDescriptor(Uuid uid) generates(Result retval, EffectDescriptor result);
38
39 /**
40 * Creates an effect engine of the specified type. To release the effect
41 * engine, it is necessary to release references to the returned effect
42 * object.
43 *
44 * @param uid effect uuid.
45 * @param session audio session to which this effect instance will be
46 * attached. All effects created with the same session ID
47 * are connected in series and process the same signal
48 * stream.
49 * @param ioHandle identifies the output or input stream this effect is
50 * directed to in audio HAL.
51 * @param device identifies the sink or source device this effect is directed to in the
52 * audio HAL. Must be specified if session is AudioSessionConsts.DEVICE.
53 * "device" is the AudioPortHandle used for the device when the audio
54 * patch is created at the audio HAL.
55 * @return retval operation completion status.
56 * @return result the interface for the created effect.
57 * @return effectId the unique ID of the effect to be used with
58 * IStream::addEffect and IStream::removeEffect methods.
59 */
60 createEffect(Uuid uid, AudioSession session, AudioIoHandle ioHandle, AudioPortHandle device)
61 generates (Result retval, IEffect result, uint64_t effectId);
62};