blob: 2e7ef753801459845a57696397d0bc40600431de [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.
Hayden Gomes3f48f4e2019-07-30 10:53:40 -070032 *
33 * Deprecated: usage of this API and car_volume_groups.xml has been replaced with
34 * car_audio_configuration.xml. If using car_audio_configuration.xml, then the framework
35 * will not call this method. If it doesn't, then it will load car_volume_groups.xml and
36 * call this method.
Scott Randolph46bc1282017-07-27 18:26:27 -070037 */
Scott Randolph5f2568b2018-02-09 17:40:32 -080038 getBusForContext(ContextNumber contextNumber)
Scott Randolph46bc1282017-07-27 18:26:27 -070039 generates (int32_t busNumber);
40
41
42 /**
43 * Control the right/left balance setting of the car speakers.
44 *
45 * This is intended to shift the speaker volume toward the right (+) or left (-) side of
46 * the car. 0.0 means "centered". +1.0 means fully right. -1.0 means fully left.
47 *
48 * A value outside the range -1 to 1 must be clamped by the implementation to the -1 to 1
49 * range.
50 */
51 oneway setBalanceTowardRight(float value);
52
53
54 /**
55 * Control the fore/aft fade setting of the car speakers.
56 *
57 * This is intended to shift the speaker volume toward the front (+) or back (-) of the car.
58 * 0.0 means "centered". +1.0 means fully forward. -1.0 means fully rearward.
59 *
60 * A value outside the range -1 to 1 must be clamped by the implementation to the -1 to 1
61 * range.
62 */
63 oneway setFadeTowardFront(float value);
64};
65