1/* 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 19 20/** 21 * Interacts with the car's audio subsystem to manage audio sources and volumes 22 */ 23interface IAudioControl { 24 25 /** 26 * 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 getBusForContext(ContextNumber contextNumber) 34 generates (int32_t busNumber); 35 36 37 /** 38 * Control the right/left balance setting of the car speakers. 39 * 40 * This is intended to shift the speaker volume toward the right (+) or left (-) side of 41 * the car. 0.0 means "centered". +1.0 means fully right. -1.0 means fully left. 42 * 43 * A value outside the range -1 to 1 must be clamped by the implementation to the -1 to 1 44 * range. 45 */ 46 oneway setBalanceTowardRight(float value); 47 48 49 /** 50 * Control the fore/aft fade setting of the car speakers. 51 * 52 * This is intended to shift the speaker volume toward the front (+) or back (-) of the car. 53 * 0.0 means "centered". +1.0 means fully forward. -1.0 means fully rearward. 54 * 55 * A value outside the range -1 to 1 must be clamped by the implementation to the -1 to 1 56 * range. 57 */ 58 oneway setFadeTowardFront(float value); 59}; 60 61