1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<!-- Copyright (C) 2019 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<audioPolicyConfiguration version="7.0" xmlns:xi="http://www.w3.org/2001/XInclude">
18    <globalConfiguration speaker_drc_enabled="true"/>
19
20    <modules>
21        <!-- Primary module -->
22        <module name="primary" halVersion="2.0">
23            <attachedDevices>
24                <item>Speaker</item>
25                <item>Built-In Mic</item>
26            </attachedDevices>
27            <defaultOutputDevice>Speaker</defaultOutputDevice>
28            <mixPorts>
29                <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
30                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
31                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
32                </mixPort>
33                <mixPort name="primary input" role="sink">
34                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
35                             samplingRates="48000"
36                             channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
37                </mixPort>
38                <mixPort name="mixport_bt_hfp_output" role="source">
39                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
40                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
41                </mixPort>
42                <mixPort name="mixport_bt_hfp_input" role="sink">
43                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
44                             samplingRates="8000 11025 16000 44100 48000"
45                             channelMasks="AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_MONO"/>
46                </mixPort>
47                <mixPort name="voip_tx" role="sink"
48                         flags="AUDIO_INPUT_FLAG_VOIP_TX">
49                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
50                             samplingRates="8000 16000 32000 48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
51                </mixPort>
52                <mixPort name="voip_rx" role="source"
53                         flags="AUDIO_OUTPUT_FLAG_VOIP_RX">
54                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
55                           samplingRates="8000 16000 32000 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
56                </mixPort>
57                <mixPort name="hifi_output" role="source" flags="AUDIO_OUTPUT_FLAG_BIT_PERFECT"/>
58                <mixPort name="mmap_no_irq_out" role="source"
59                         flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_MMAP_NOIRQ">
60                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
61                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
62                </mixPort>
63                <mixPort name="mixport_bus_input" role="sink">
64                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
65                        samplingRates="48000"
66                        channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
67                </mixPort>
68                <mixPort name="hifi_input" role="sink" />
69            </mixPorts>
70            <devicePorts>
71                <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink">
72                </devicePort>
73                <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
74                </devicePort>
75                <devicePort tagName="Hdmi" type="AUDIO_DEVICE_OUT_HDMI" role="sink"
76                            encodedFormats="AUDIO_FORMAT_AC3">
77                </devicePort>
78                <devicePort tagName="Hdmi-In Mic" type="AUDIO_DEVICE_IN_HDMI" role="source">
79                </devicePort>
80                <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO"
81                            role="sink" address="hfp_client_out">
82                </devicePort>
83                <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET"
84                            role="source" address="hfp_client_in">
85                </devicePort>
86                <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"
87                            encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
88                </devicePort>
89                <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
90                </devicePort>
91                <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
92                </devicePort>
93                <devicePort tagName="BUS Device In" type="AUDIO_DEVICE_IN_BUS" role="source" address="BUS00_MIC">
94                </devicePort>
95            </devicePorts>
96            <routes>
97                <route type="mix" sink="Speaker"
98                       sources="primary output,voip_rx"/>
99                <route type="mix" sink="primary input"
100                       sources="Built-In Mic,Hdmi-In Mic,USB Device In"/>
101                <route type="mix" sink="voip_tx"
102                       sources="Built-In Mic,USB Device In"/>
103                <route type="mix" sink="Hdmi"
104                       sources="primary output"/>
105                <route type="mix" sink="BT SCO"
106                       sources="mixport_bt_hfp_output,voip_rx"/>
107                <route type="mix" sink="mixport_bt_hfp_input"
108                       sources="BT SCO Headset Mic"/>
109                <route type="mix" sink="BT A2DP Out"
110                       sources="primary output,hifi_output"/>
111                <route type="mix" sink="USB Device Out"
112                       sources="primary output,hifi_output,mmap_no_irq_out"/>
113                <route type="mix" sink="mixport_bus_input"
114                    sources="BUS Device In"/>
115                <route type="mix" sink="hifi_input"
116                        sources="USB Device In" />
117            </routes>
118        </module>
119
120        <!-- Remote Submix module -->
121        <module name="r_submix" halVersion="2.0">
122            <attachedDevices>
123                <item>Remote Submix In</item>
124            </attachedDevices>
125            <mixPorts>
126                <mixPort name="r_submix output" role="source">
127                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
128                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
129                </mixPort>
130                <mixPort name="r_submix input" role="sink">
131                   <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
132                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
133                </mixPort>
134           </mixPorts>
135           <devicePorts>
136               <devicePort tagName="Remote Submix Out" type="AUDIO_DEVICE_OUT_REMOTE_SUBMIX"  role="sink">
137                   <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
138                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
139               </devicePort>
140               <devicePort tagName="Remote Submix In" type="AUDIO_DEVICE_IN_REMOTE_SUBMIX"  role="source">
141                   <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
142                            samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
143                </devicePort>
144            </devicePorts>
145            <routes>
146                <route type="mix" sink="Remote Submix Out"
147                       sources="r_submix output"/>
148                <route type="mix" sink="r_submix input"
149                       sources="Remote Submix In"/>
150            </routes>
151        </module>
152    </modules>
153</audioPolicyConfiguration>
154