blob: a02002d64b514e8117607efc59dde14cec6e29dd [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 {
23 /*
24 * Sets target level in millibels.
25 */
26 setTargetLevel(int16_t targetLevelMb) generates (Result retval);
27
28 /*
29 * Gets target level.
30 */
31 getTargetLevel() generates (Result retval, int16_t targetLevelMb);
32
33 /*
34 * Sets gain in the compression range in millibels.
35 */
36 setCompGain(int16_t compGainMb) generates (Result retval);
37
38 /*
39 * Gets gain in the compression range.
40 */
41 getCompGain() generates (Result retval, int16_t compGainMb);
42
43 /*
44 * Enables or disables limiter.
45 */
46 setLimiterEnabled(bool enabled) generates (Result retval);
47
48 /*
49 * 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
59 /*
60 * Sets all properties at once.
61 */
62 setAllProperties(AllProperties properties) generates (Result retval);
63
64 /*
65 * Gets all properties at once.
66 */
67 getAllProperties() generates (Result retval, AllProperties properties);
68};