1<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 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<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 </mixPorts> 58 <devicePorts> 59 <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink"> 60 </devicePort> 61 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> 62 </devicePort> 63 <devicePort tagName="Hdmi" type="AUDIO_DEVICE_OUT_HDMI" role="sink" 64 encodedFormats="AUDIO_FORMAT_AC3"> 65 </devicePort> 66 <devicePort tagName="Hdmi-In Mic" type="AUDIO_DEVICE_IN_HDMI" role="source"> 67 </devicePort> 68 <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink" /> 69 <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" 70 role="source" /> 71 <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink" 72 encodedFormats="AUDIO_FORMAT_SBC"> 73 <profile name="" format="AUDIO_FORMAT_PCM_8_BIT" 74 samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 75 </devicePort> 76 <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink"> 77 </devicePort> 78 <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source"> 79 </devicePort> 80 </devicePorts> 81 <routes> 82 <route type="mix" sink="Speaker" 83 sources="primary output,voip_rx"/> 84 <route type="mix" sink="primary input" 85 sources="Built-In Mic,Hdmi-In Mic,USB Device In"/> 86 <route type="mix" sink="voip_tx" 87 sources="Built-In Mic"/> 88 <route type="mix" sink="Hdmi" 89 sources="primary output"/> 90 <route type="mix" sink="BT SCO" 91 sources="mixport_bt_hfp_output"/> 92 <route type="mix" sink="mixport_bt_hfp_input" 93 sources="BT SCO Headset Mic"/> 94 <route type="mix" sink="BT A2DP Out" 95 sources="primary output"/> 96 <route type="mix" sink="USB Device Out" 97 sources="primary output"/> 98 </routes> 99 </module> 100 101 <!-- Remote Submix module --> 102 <module name="r_submix" halVersion="2.0"> 103 <attachedDevices> 104 <item>Remote Submix In</item> 105 </attachedDevices> 106 <mixPorts> 107 <mixPort name="r_submix output" role="source"> 108 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 109 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 110 </mixPort> 111 <mixPort name="r_submix input" role="sink"> 112 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 113 samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 114 </mixPort> 115 </mixPorts> 116 <devicePorts> 117 <devicePort tagName="Remote Submix Out" type="AUDIO_DEVICE_OUT_REMOTE_SUBMIX" role="sink"> 118 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 119 samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 120 </devicePort> 121 <devicePort tagName="Remote Submix In" type="AUDIO_DEVICE_IN_REMOTE_SUBMIX" role="source"> 122 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 123 samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 124 </devicePort> 125 </devicePorts> 126 <routes> 127 <route type="mix" sink="Remote Submix Out" 128 sources="r_submix output"/> 129 <route type="mix" sink="r_submix input" 130 sources="Remote Submix In"/> 131 </routes> 132 </module> 133 134 <!-- Software Bluetooth Module --> 135 <module name="bluetooth" halVersion="2.0"> 136 <mixPorts> 137 <mixPort name="a2dp_sw_output" role="source"> 138 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 139 samplingRates="44100 48000 88200 96000" 140 channelMasks="AUDIO_CHANNEL_IN_STEREO"/> 141 </mixPort> 142 </mixPorts> 143 <devicePorts> 144 <devicePort tagName="BTS A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"> 145 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 146 samplingRates="44100 48000 88200 96000" 147 channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> 148 </devicePort> 149 </devicePorts> 150 <routes> 151 <route type="mix" sink="BTS A2DP Out" 152 sources="a2dp_sw_output"/> 153 </routes> 154 </module> 155 156 </modules> 157</audioPolicyConfiguration> 158