blob: 3d300ecc401630693a68e3df43752a8b2afd70ae [file] [log] [blame]
Mikhail Naganov40be06c2016-09-27 17:01:34 -07001/*
2 * Copyright (C) 2016 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@2.0;
18
19import android.hardware.audio.common@2.0;
20import IEffect;
21
22interface IEffectsFactory {
Andreas Huber40d3a9b2017-03-28 16:19:16 -070023 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070024 * 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
Andreas Huber40d3a9b2017-03-28 16:19:16 -070031 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070032 * 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
Andreas Huber40d3a9b2017-03-28 16:19:16 -070039 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070040 * 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 * @return retval operation completion status.
52 * @return result the interface for the created effect.
Mikhail Naganov10548292016-10-31 10:39:47 -070053 * @return effectId the unique ID of the effect to be used with
54 * IStream::addEffect and IStream::removeEffect methods.
Mikhail Naganov40be06c2016-09-27 17:01:34 -070055 */
56 createEffect(Uuid uid, AudioSession session, AudioIoHandle ioHandle)
Mikhail Naganov10548292016-10-31 10:39:47 -070057 generates (Result retval, IEffect result, uint64_t effectId);
Mikhail Naganov40be06c2016-09-27 17:01:34 -070058
Andreas Huber40d3a9b2017-03-28 16:19:16 -070059 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070060 * Dumps information about effects into the provided file descriptor.
61 * This is used for the dumpsys facility.
62 *
63 * @param fd dump file descriptor.
64 */
65 debugDump(handle fd);
66};