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 * 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. 37 */ 38 getBusForContext(ContextNumber contextNumber) 39 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 66