• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 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 
17 package com.android.car.audio;
18 
19 import android.util.SparseArray;
20 import android.util.SparseIntArray;
21 
22 import org.xmlpull.v1.XmlPullParserException;
23 
24 import java.io.IOException;
25 import java.util.List;
26 
27 /**
28  * Interface for loading car audio service configurations
29  */
30 public interface CarAudioZonesHelper {
31 
32     /**
33      * @return Car audio context which can be used to setup car audio service
34      */
getCarAudioContext()35     CarAudioContext getCarAudioContext();
36 
37     /**
38      * @return Car audio zone id to occupant zone id mapping
39      */
getCarAudioZoneIdToOccupantZoneIdMapping()40     SparseIntArray getCarAudioZoneIdToOccupantZoneIdMapping();
41 
42     /**
43      * @return Mirroring devices to use between audio zones
44      */
getMirrorDeviceInfos()45     List<CarAudioDeviceInfo> getMirrorDeviceInfos();
46 
47     /**
48      * @return List of audio zones which can be used to configure the car audio service
49      */
loadAudioZones()50     SparseArray<CarAudioZone> loadAudioZones() throws IOException, XmlPullParserException;
51 
52     /**
53      * @return Boolean indicating if core audio routing should be used
54      */
useCoreAudioRouting()55     boolean useCoreAudioRouting();
56 
57     /**
58      * @return Boolean indicating if core audio volume management should be used
59      */
useCoreAudioVolume()60     boolean useCoreAudioVolume();
61 
62     /**
63      * Determines of audio control HAL ducking signals should be use
64      *
65      * @param defaultUseHalDuckingSignal default value that should be returned of there is no
66      *   definition of use HAL ducking defined internally
67      *
68      * @return Boolean indicating if HAL ducking signal should be use
69      */
useHalDuckingSignalOrDefault(boolean defaultUseHalDuckingSignal)70     boolean useHalDuckingSignalOrDefault(boolean defaultUseHalDuckingSignal);
71 
72     /**
73      * @return Boolean indicating if audio control HAL muting should be used
74      */
useVolumeGroupMuting()75     boolean useVolumeGroupMuting();
76 }
77