Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
Petri Gynther | ee8432a | 2018-04-17 18:55:35 -0700 | [diff] [blame] | 2 | <!-- Copyright (C) 2018 The Android Open Source Project |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 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="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 18 | <globalConfiguration speaker_drc_enabled="true"/> |
| 19 | |
| 20 | <modules> |
| 21 | <module name="primary" halVersion="2.0"> |
| 22 | <attachedDevices> |
| 23 | <item>Speaker</item> |
| 24 | <item>Speaker Safe</item> |
| 25 | <item>Earpiece</item> |
| 26 | <item>Telephony Tx</item> |
| 27 | <item>Built-In Mic</item> |
| 28 | <item>Built-In Back Mic</item> |
| 29 | <item>Telephony Rx</item> |
| 30 | </attachedDevices> |
| 31 | <defaultOutputDevice>Speaker</defaultOutputDevice> |
| 32 | <mixPorts> |
| 33 | <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST"> |
| 34 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 35 | samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
| 36 | </mixPort> |
| 37 | <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW|AUDIO_OUTPUT_FLAG_FAST"> |
| 38 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 39 | samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
| 40 | </mixPort> |
| 41 | <mixPort name="hifi_playback" role="source" /> |
| 42 | <mixPort name="deep_buffer" role="source" |
| 43 | flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER"> |
juyuchen | 6871bc5 | 2018-05-21 16:22:12 +0800 | [diff] [blame] | 44 | <profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED" |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 45 | samplingRates="44100,48000" |
| 46 | channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
| 47 | </mixPort> |
| 48 | <mixPort name="compressed_offload" role="source" |
| 49 | flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING"> |
| 50 | <profile name="" format="AUDIO_FORMAT_MP3" |
| 51 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" |
| 52 | channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/> |
| 53 | <profile name="" format="AUDIO_FORMAT_AAC_LC" |
| 54 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000" |
| 55 | channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/> |
| 56 | <profile name="" format="AUDIO_FORMAT_AAC_HE_V1" |
| 57 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000" |
| 58 | channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/> |
| 59 | <profile name="" format="AUDIO_FORMAT_AAC_HE_V2" |
| 60 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" |
| 61 | channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/> |
| 62 | </mixPort> |
| 63 | <mixPort name="voice_tx" role="source"> |
| 64 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 65 | samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/> |
| 66 | </mixPort> |
| 67 | <mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_MMAP_NOIRQ"> |
| 68 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 69 | samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
| 70 | </mixPort> |
| 71 | <mixPort name="voip_rx" role="source" |
kevinshhsu | b8481bb | 2018-03-12 19:10:48 +0800 | [diff] [blame] | 72 | flags="AUDIO_OUTPUT_FLAG_VOIP_RX"> |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 73 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
kevinshhsu | b8481bb | 2018-03-12 19:10:48 +0800 | [diff] [blame] | 74 | samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 75 | </mixPort> |
Nadav Bar | 2ac6214 | 2018-01-07 11:50:01 +0200 | [diff] [blame] | 76 | <mixPort name="incall_music_uplink" role="source" |
| 77 | flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC"> |
| 78 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 79 | samplingRates="8000,16000,48000" |
| 80 | channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
| 81 | </mixPort> |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 82 | <mixPort name="primary input" role="sink"> |
| 83 | <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT" |
| 84 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" |
| 85 | channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/> |
| 86 | </mixPort> |
Carter Hsu | 0476088 | 2019-05-02 10:02:39 +0800 | [diff] [blame^] | 87 | <mixPort name="hotword input" role="sink" flags="AUDIO_INPUT_FLAG_HW_HOTWORD" maxActiveCount="0" > |
| 88 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 89 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" |
| 90 | channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> |
| 91 | </mixPort> |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 92 | <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_FAST"> |
| 93 | <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT" |
| 94 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" |
| 95 | channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/> |
| 96 | </mixPort> |
| 97 | <mixPort name="hifi_input" role="sink" /> |
| 98 | <mixPort name="voice_rx" role="sink"> |
| 99 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 100 | samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> |
| 101 | </mixPort> |
| 102 | <mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ"> |
| 103 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 104 | samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" |
| 105 | channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/> |
| 106 | </mixPort> |
| 107 | <mixPort name="voip_tx" role="sink" |
| 108 | flags="AUDIO_INPUT_FLAG_VOIP_TX"> |
| 109 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 110 | samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/> |
| 111 | </mixPort> |
| 112 | </mixPorts> |
| 113 | <devicePorts> |
| 114 | <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink"> |
| 115 | </devicePort> |
| 116 | <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink"> |
| 117 | </devicePort> |
| 118 | <devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink"> |
| 119 | </devicePort> |
| 120 | <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink"> |
| 121 | </devicePort> |
| 122 | <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink"> |
| 123 | </devicePort> |
| 124 | <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink"> |
| 125 | </devicePort> |
| 126 | <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink"> |
| 127 | </devicePort> |
| 128 | <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink"> |
| 129 | </devicePort> |
| 130 | <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink"> |
| 131 | </devicePort> |
Eric Laurent | f75b46b | 2019-01-18 12:25:03 -0800 | [diff] [blame] | 132 | <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink" |
| 133 | encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> |
Petri Gynther | ee8432a | 2018-04-17 18:55:35 -0700 | [diff] [blame] | 134 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 135 | samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
| 136 | </devicePort> |
Eric Laurent | f75b46b | 2019-01-18 12:25:03 -0800 | [diff] [blame] | 137 | <devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink" |
| 138 | encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> |
Petri Gynther | ee8432a | 2018-04-17 18:55:35 -0700 | [diff] [blame] | 139 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 140 | samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
| 141 | </devicePort> |
Eric Laurent | f75b46b | 2019-01-18 12:25:03 -0800 | [diff] [blame] | 142 | <devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink" |
| 143 | encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC"> |
Petri Gynther | ee8432a | 2018-04-17 18:55:35 -0700 | [diff] [blame] | 144 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 145 | samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
| 146 | </devicePort> |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 147 | <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> |
| 148 | </devicePort> |
| 149 | <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> |
| 150 | </devicePort> |
| 151 | <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source"> |
| 152 | </devicePort> |
| 153 | <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source"> |
| 154 | </devicePort> |
| 155 | <!-- TODO: Enable multi-channel recording --> |
| 156 | <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source"> |
| 157 | </devicePort> |
| 158 | <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> |
| 159 | </devicePort> |
| 160 | </devicePorts> |
| 161 | <routes> |
| 162 | <route type="mix" sink="Earpiece" |
| 163 | sources="primary output,raw,deep_buffer,mmap_no_irq_out,voip_rx"/> |
| 164 | <route type="mix" sink="Speaker" |
| 165 | sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/> |
| 166 | <route type="mix" sink="Speaker Safe" |
| 167 | sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/> |
| 168 | <route type="mix" sink="BT SCO" |
| 169 | sources="primary output,raw,deep_buffer,voip_rx"/> |
| 170 | <route type="mix" sink="BT SCO Headset" |
| 171 | sources="primary output,raw,deep_buffer,voip_rx"/> |
| 172 | <route type="mix" sink="BT SCO Car Kit" |
| 173 | sources="primary output,raw,deep_buffer,voip_rx"/> |
| 174 | <route type="mix" sink="USB Device Out" |
| 175 | sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,mmap_no_irq_out,voip_rx"/> |
| 176 | <route type="mix" sink="USB Headset Out" |
| 177 | sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,mmap_no_irq_out,voip_rx"/> |
| 178 | <route type="mix" sink="Telephony Tx" |
Nadav Bar | 2ac6214 | 2018-01-07 11:50:01 +0200 | [diff] [blame] | 179 | sources="voice_tx,incall_music_uplink"/> |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 180 | <route type="mix" sink="primary input" |
| 181 | sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/> |
Carter Hsu | 0476088 | 2019-05-02 10:02:39 +0800 | [diff] [blame^] | 182 | <route type="mix" sink="hotword input" |
| 183 | sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/> |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 184 | <route type="mix" sink="fast input" |
| 185 | sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/> |
| 186 | <route type="mix" sink="voice_rx" |
| 187 | sources="Telephony Rx"/> |
| 188 | <route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" /> |
| 189 | <route type="mix" sink="mmap_no_irq_in" |
| 190 | sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/> |
| 191 | <route type="mix" sink="voip_tx" |
| 192 | sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/> |
Petri Gynther | ee8432a | 2018-04-17 18:55:35 -0700 | [diff] [blame] | 193 | <route type="mix" sink="BT A2DP Out" |
Aniket Kumar Lata | de34516 | 2018-06-18 16:35:13 -0700 | [diff] [blame] | 194 | sources="primary output,deep_buffer,compressed_offload,voip_rx"/> |
Petri Gynther | ee8432a | 2018-04-17 18:55:35 -0700 | [diff] [blame] | 195 | <route type="mix" sink="BT A2DP Headphones" |
Aniket Kumar Lata | de34516 | 2018-06-18 16:35:13 -0700 | [diff] [blame] | 196 | sources="primary output,deep_buffer,compressed_offload,voip_rx"/> |
Petri Gynther | ee8432a | 2018-04-17 18:55:35 -0700 | [diff] [blame] | 197 | <route type="mix" sink="BT A2DP Speaker" |
Aniket Kumar Lata | de34516 | 2018-06-18 16:35:13 -0700 | [diff] [blame] | 198 | sources="primary output,deep_buffer,compressed_offload,voip_rx"/> |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 199 | </routes> |
| 200 | </module> |
| 201 | |
Cheney Ni | 08b5087 | 2018-12-04 13:36:42 +0800 | [diff] [blame] | 202 | <!-- A2DP Input Audio HAL --> |
| 203 | <xi:include href="a2dp_in_audio_policy_configuration.xml"/> |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 204 | |
| 205 | <!-- Usb Audio HAL --> |
| 206 | <module name="usb" halVersion="2.0"> |
| 207 | <mixPorts> |
| 208 | <mixPort name="usb_accessory output" role="source"> |
| 209 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 210 | samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
| 211 | </mixPort> |
| 212 | </mixPorts> |
| 213 | <devicePorts> |
| 214 | <devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink"> |
| 215 | <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" |
| 216 | samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> |
| 217 | </devicePort> |
| 218 | </devicePorts> |
| 219 | <routes> |
| 220 | <route type="mix" sink="USB Host Out" |
| 221 | sources="usb_accessory output"/> |
| 222 | </routes> |
| 223 | </module> |
| 224 | |
| 225 | <!-- Remote Submix Audio HAL --> |
| 226 | <xi:include href="r_submix_audio_policy_configuration.xml"/> |
| 227 | |
Cheney Ni | c05ccdb | 2019-02-24 02:37:42 +0800 | [diff] [blame] | 228 | <!-- Bluetooth Audio HAL for Hearing aid --> |
| 229 | <xi:include href="bluetooth_hearing_aid_audio_policy_configuration.xml"/> |
Jakub Pawlowski | a70c7f2 | 2018-03-12 09:44:29 -0700 | [diff] [blame] | 230 | |
Chris Fries | dc2b50d | 2017-06-27 12:02:00 -0500 | [diff] [blame] | 231 | </modules> |
| 232 | |
| 233 | <!-- Volume section --> |
| 234 | |
| 235 | <xi:include href="audio_policy_volumes.xml"/> |
| 236 | <xi:include href="default_volume_tables.xml"/> |
| 237 | |
| 238 | </audioPolicyConfiguration> |