Mikhail Naganov | 40be06c | 2016-09-27 17:01:34 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.hardware.audio.effect@2.0; |
| 18 | |
| 19 | import android.hardware.audio.common@2.0; |
| 20 | import IEffect; |
| 21 | |
| 22 | interface IEffectsFactory { |
Andreas Huber | 40d3a9b | 2017-03-28 16:19:16 -0700 | [diff] [blame^] | 23 | /** |
Mikhail Naganov | 40be06c | 2016-09-27 17:01:34 -0700 | [diff] [blame] | 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 | |
Andreas Huber | 40d3a9b | 2017-03-28 16:19:16 -0700 | [diff] [blame^] | 31 | /** |
Mikhail Naganov | 40be06c | 2016-09-27 17:01:34 -0700 | [diff] [blame] | 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 | |
Andreas Huber | 40d3a9b | 2017-03-28 16:19:16 -0700 | [diff] [blame^] | 39 | /** |
Mikhail Naganov | 40be06c | 2016-09-27 17:01:34 -0700 | [diff] [blame] | 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 | * @return retval operation completion status. |
| 52 | * @return result the interface for the created effect. |
Mikhail Naganov | 1054829 | 2016-10-31 10:39:47 -0700 | [diff] [blame] | 53 | * @return effectId the unique ID of the effect to be used with |
| 54 | * IStream::addEffect and IStream::removeEffect methods. |
Mikhail Naganov | 40be06c | 2016-09-27 17:01:34 -0700 | [diff] [blame] | 55 | */ |
| 56 | createEffect(Uuid uid, AudioSession session, AudioIoHandle ioHandle) |
Mikhail Naganov | 1054829 | 2016-10-31 10:39:47 -0700 | [diff] [blame] | 57 | generates (Result retval, IEffect result, uint64_t effectId); |
Mikhail Naganov | 40be06c | 2016-09-27 17:01:34 -0700 | [diff] [blame] | 58 | |
Andreas Huber | 40d3a9b | 2017-03-28 16:19:16 -0700 | [diff] [blame^] | 59 | /** |
Mikhail Naganov | 40be06c | 2016-09-27 17:01:34 -0700 | [diff] [blame] | 60 | * 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 | }; |