blob: b8ca7e3fb05880de03bf45ee95544da50c7c8572 [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 IAutomaticGainControlEffect extends IEffect {
Andreas Huber40d3a9b2017-03-28 16:19:16 -070023 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070024 * Sets target level in millibels.
25 */
26 setTargetLevel(int16_t targetLevelMb) generates (Result retval);
27
Andreas Huber40d3a9b2017-03-28 16:19:16 -070028 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070029 * Gets target level.
30 */
31 getTargetLevel() generates (Result retval, int16_t targetLevelMb);
32
Andreas Huber40d3a9b2017-03-28 16:19:16 -070033 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070034 * Sets gain in the compression range in millibels.
35 */
36 setCompGain(int16_t compGainMb) generates (Result retval);
37
Andreas Huber40d3a9b2017-03-28 16:19:16 -070038 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070039 * Gets gain in the compression range.
40 */
41 getCompGain() generates (Result retval, int16_t compGainMb);
42
Andreas Huber40d3a9b2017-03-28 16:19:16 -070043 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070044 * Enables or disables limiter.
45 */
46 setLimiterEnabled(bool enabled) generates (Result retval);
47
Andreas Huber40d3a9b2017-03-28 16:19:16 -070048 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070049 * Returns whether limiter is enabled.
50 */
51 isLimiterEnabled() generates (Result retval, bool enabled);
52
53 struct AllProperties {
54 int16_t targetLevelMb;
55 int16_t compGainMb;
56 bool limiterEnabled;
57 };
58
Andreas Huber40d3a9b2017-03-28 16:19:16 -070059 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070060 * Sets all properties at once.
61 */
62 setAllProperties(AllProperties properties) generates (Result retval);
63
Andreas Huber40d3a9b2017-03-28 16:19:16 -070064 /**
Mikhail Naganov40be06c2016-09-27 17:01:34 -070065 * Gets all properties at once.
66 */
67 getAllProperties() generates (Result retval, AllProperties properties);
68};