blob: c02949962aa6126b82f59904ce6e6a61ae2f69cf [file] [log] [blame]
Scott Randolph46bc1282017-07-27 18:26:27 -07001/*
2 * Copyright (C) 2017 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.automotive.audiocontrol@1.0;
18
Scott Randolph46bc1282017-07-27 18:26:27 -070019
20/**
21 * Interacts with the car's audio subsystem to manage audio sources and volumes
22 */
23interface IAudioControl {
24
25 /**
Scott Randolph46bc1282017-07-27 18:26:27 -070026 * Called at startup once per context to get the mapping from ContextNumber to
27 * busAddress. This lets the car tell the framework to which physical output stream
28 * each context should be routed.
29 *
30 * For every context, a valid bus number (0 - num busses-1) must be returned. If an
31 * unrecognized contextNumber is encountered, then -1 shall be returned.
32 *
33 * Any context for which an invalid busNumber is returned must be routed to bus 0.
34 */
35 getBusForContext(uint32_t contextNumber)
36 generates (int32_t busNumber);
37
38
39 /**
40 * Control the right/left balance setting of the car speakers.
41 *
42 * This is intended to shift the speaker volume toward the right (+) or left (-) side of
43 * the car. 0.0 means "centered". +1.0 means fully right. -1.0 means fully left.
44 *
45 * A value outside the range -1 to 1 must be clamped by the implementation to the -1 to 1
46 * range.
47 */
48 oneway setBalanceTowardRight(float value);
49
50
51 /**
52 * Control the fore/aft fade setting of the car speakers.
53 *
54 * This is intended to shift the speaker volume toward the front (+) or back (-) of the car.
55 * 0.0 means "centered". +1.0 means fully forward. -1.0 means fully rearward.
56 *
57 * A value outside the range -1 to 1 must be clamped by the implementation to the -1 to 1
58 * range.
59 */
60 oneway setFadeTowardFront(float value);
61};
62