blob: a068541939fddc2b2b61b366b2355f33f050bbbc [file] [log] [blame]
Amit Pundirc738b812019-06-19 16:13:49 +05301<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Amit Pundirfec74f62020-09-28 12:43:59 +05302<!-- Copyright (C) 2019 The Android Open Source Project
Amit Pundirc738b812019-06-19 16:13:49 +05303
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<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
Amit Pundirfec74f62020-09-28 12:43:59 +053018 <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
Amit Pundirc738b812019-06-19 16:13:49 +053019
Amit Pundirfec74f62020-09-28 12:43:59 +053020 <!-- Global configuration Decalaration -->
21 <globalConfiguration speaker_drc_enabled="true"/>
Amit Pundirc738b812019-06-19 16:13:49 +053022
Amit Pundirfec74f62020-09-28 12:43:59 +053023
24 <!-- Modules section:
25 There is one section per audio HW module present on the platform.
26 Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
27 The module names are the same as in current .conf file:
28 “primary”, “A2DP”, “remote_submix”, “USB”
29 Each module will contain the following sections:
30 “devicePorts”: a list of device descriptors for all input and output devices accessible via this
31 module.
32 This contains both permanently attached devices and removable devices.
33 “mixPorts”: listing all output and input streams exposed by the audio HAL
34 “routes”: list of possible connections between input and output devices or between stream and
35 devices.
36 "route": is defined by an attribute:
37 -"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
38 -"sink": the sink involved in this route
39 -"sources": all the sources than can be connected to the sink via vis route
40 “attachedDevices”: permanently attached devices.
41 The attachedDevices section is a list of devices names. The names correspond to device names
42 defined in <devicePorts> section.
43 “defaultOutputDevice”: device to be used by default when no policy rule applies
44 -->
Amit Pundirc738b812019-06-19 16:13:49 +053045 <modules>
46 <!-- Primary Audio HAL -->
Amit Pundirfec74f62020-09-28 12:43:59 +053047 <module name="primary" halVersion="3.0">
Amit Pundirc738b812019-06-19 16:13:49 +053048 <attachedDevices>
49 <item>Speaker</item>
50 <item>Built-In Mic</item>
Amit Pundirfec74f62020-09-28 12:43:59 +053051 <item>Echo Reference</item>
Amit Pundirc738b812019-06-19 16:13:49 +053052 </attachedDevices>
53 <defaultOutputDevice>Speaker</defaultOutputDevice>
54 <mixPorts>
55 <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
56 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
57 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
58 </mixPort>
59 <mixPort name="primary input" role="sink">
60 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
61 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
62 channelMasks="AUDIO_CHANNEL_IN_MONO"/>
63 </mixPort>
Amit Pundirfec74f62020-09-28 12:43:59 +053064 <mixPort name="echo reference" role="sink">
65 <profile name="echo_reference" format="AUDIO_FORMAT_PCM_32_BIT"
66 samplingRates="48000"
67 channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
68 </mixPort>
Amit Pundirc738b812019-06-19 16:13:49 +053069 </mixPorts>
70 <devicePorts>
71 <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
Amit Pundirfec74f62020-09-28 12:43:59 +053072 <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address="">
73 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
74 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
Amit Pundirc738b812019-06-19 16:13:49 +053075 </devicePort>
Caleb Connolly59509082021-08-10 09:56:09 +010076 <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink" >
Amit Pundirc738b812019-06-19 16:13:49 +053077 </devicePort>
78 <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
79 </devicePort>
80 <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
81 </devicePort>
82 <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
83 </devicePort>
Amit Pundirc738b812019-06-19 16:13:49 +053084
85 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
86 </devicePort>
87 <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
88 </devicePort>
89 <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
90 </devicePort>
Amit Pundirfec74f62020-09-28 12:43:59 +053091 <devicePort tagName="Echo Reference" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source">
92 <profile name="echo_reference" format="AUDIO_FORMAT_PCM_32_BIT"
93 samplingRates="48000"
94 channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
95 </devicePort>
Amit Pundirc738b812019-06-19 16:13:49 +053096 </devicePorts>
97 <!-- route declaration, i.e. list all available sources for a given sink -->
98 <routes>
99 <route type="mix" sink="Speaker"
100 sources="primary output"/>
101 <route type="mix" sink="Wired Headset"
102 sources="primary output"/>
103 <route type="mix" sink="Wired Headphones"
104 sources="primary output"/>
Amit Pundirc738b812019-06-19 16:13:49 +0530105 <route type="mix" sink="BT SCO"
106 sources="primary output"/>
107 <route type="mix" sink="BT SCO Headset"
108 sources="primary output"/>
Amit Pundirc738b812019-06-19 16:13:49 +0530109 <route type="mix" sink="primary input"
110 sources="Built-In Mic,Wired Headset Mic,BT SCO Headset Mic"/>
Amit Pundirfec74f62020-09-28 12:43:59 +0530111 <route type="mix" sink="echo reference"
112 sources="Echo Reference"/>
Amit Pundirc738b812019-06-19 16:13:49 +0530113 </routes>
114
115 </module>
116
Amit Pundirc738b812019-06-19 16:13:49 +0530117 <!-- Usb Audio HAL -->
118 <xi:include href="usb_audio_policy_configuration.xml"/>
119
120 <!-- Remote Submix Audio HAL -->
121 <xi:include href="r_submix_audio_policy_configuration.xml"/>
122
Amit Pundir276a0552019-11-23 22:27:15 +0530123 <!-- Bluetooth Audio HAL -->
124 <xi:include href="bluetooth_audio_policy_configuration.xml"/>
125
Amit Pundirc738b812019-06-19 16:13:49 +0530126 </modules>
127 <!-- End of Modules section -->
128
129 <!-- Volume section -->
130
131 <xi:include href="audio_policy_volumes.xml"/>
132 <xi:include href="default_volume_tables.xml"/>
133
134 <!-- End of Volume section -->
135
136</audioPolicyConfiguration>