1<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 2<!-- Copyright (c) 2021-2024 Huawei Device Co., Ltd. 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14--> 15<audioPolicyConfiguration xmlns:xi="http://www.w3.org/2001/XInclude" version="1.0"> 16 <adapters> 17 <adapter name="primary" supportSelectScene="0"> 18 <pipes> 19 <pipe name="primary_output" role="output"> 20 <paProp lib="libmodule-hdi-sink.z.so" role="sink" fixed_latency="1" render_in_idle_state="1" moduleName="Speaker"/> 21 <streamProps> 22 <streamProp format="s16le" sampleRates="44100" channelLayout="CH_LAYOUT_STEREO" bufferSize="4096"/> 23 </streamProps> 24 <attributes> 25 <attribute name="preload" value="true"/> 26 </attributes> 27 </pipe> 28 <pipe name="primary_input" role="input"> 29 <paProp lib="libmodule-hdi-source.z.so" role="source" moduleName="Built_in_mic"/> 30 <streamProps> 31 <streamProp format="s16le" sampleRates="44100" channelLayout="CH_LAYOUT_STEREO" bufferSize="8192"/> 32 </streamProps> 33 </pipe> 34 </pipes> 35 <devices> 36 <device name="Speaker_Out" type="DEVICE_TYPE_SPEAKER" pin="PIN_OUT_SPEAKER" role="output" supportPipes="primary_output"/> 37 <device name="Wired_Headset_Out" type="DEVICE_TYPE_WIRED_HEADSET" pin="PIN_OUT_HEADSET" role="output" supportPipes="primary_output"/> 38 <device name="Wired_Headphones_Out" type="DEVICE_TYPE_WIRED_HEADPHONES" pin="PIN_OUT_HEADPHONE" role="output" supportPipes="primary_output"/> 39 <device name="Builtin_Mic_In" type="DEVICE_TYPE_MIC" pin="PIN_IN_MIC" role="input" supportPipes="primary_input"/> 40 <device name="Wired_Headset_In" type="DEVICE_TYPE_WIRED_HEADSET" pin="PIN_IN_HS_MIC" role="input" supportPipes="primary_input"/> 41 </devices> 42 </adapter> 43 <adapter name="a2dp"> 44 <pipes> 45 <pipe name="a2dp_output" role="output"> 46 <paProp lib="libmodule-hdi-sink.z.so" role="sink" moduleName="Bt_Speaker"/> 47 <streamProps> 48 <streamProp format="s16le" sampleRates="48000" channelLayout="CH_LAYOUT_STEREO" buffer_size="3840"/> 49 <streamProp format="s16le" sampleRates="44100" channelLayout="CH_LAYOUT_STEREO" buffer_size="3528"/> 50 <streamProp format="s24le" sampleRates="96000" channelLayout="CH_LAYOUT_STEREO" buffer_size="11520"/> 51 </streamProps> 52 </pipe> 53 </pipes> 54 <devices> 55 <device name="Bt_A2dp_Out" type="DEVICE_TYPE_BLUETOOTH_A2DP" pin="PIN_OUT_BLUETOOTH_A2DP" role="output" supportPipes="a2dp_output"/> 56 </devices> 57 </adapter> 58 <adapter name="remote" supportSelectScene="0"> 59 <pipes> 60 <pipe name="distributed_output" role="output"> 61 <paProp lib="libmodule-hdi-sink.z.so" role="sink" moduleName="Speaker"/> 62 <streamProps> 63 <streamProp format="s16le" sampleRates="48000" channelLayout="CH_LAYOUT_STEREO"/> 64 </streamProps> 65 </pipe> 66 <pipe name="distributed_input" role="input"> 67 <paProp lib="libmodule-hdi-source.z.so" role="source" moduleName="Built_in_mic"/> 68 <streamProps> 69 <streamProp format="s16le" sampleRates="48000" channelLayout="CH_LAYOUT_STEREO"/> 70 </streamProps> 71 </pipe> 72 </pipes> 73 <devices> 74 <device name="Distributed_Out" type="DEVICE_TYPE_SPEAKER" pin="PIN_OUT_DAUDIO_DEFAULT" role="output" supportPipes="distributed_output"/> 75 <device name="Distributed_In" type="DEVICE_TYPE_MIC" pin="PIN_IN_DAUDIO_DEFAULT" role="input" supportPipes="distributed_input"/> 76 </devices> 77 </adapter> 78 </adapters> 79 <volumeGroups> 80 <groups> 81 <group name="volume_group"> 82 <sink name="primary_out"/> 83 </group> 84 </groups> 85 </volumeGroups> 86 <interruptGroups> 87 <groups> 88 <group name="interrupt_group"> 89 <sink name="primary_out"/> 90 </group> 91 </groups> 92 </interruptGroups> 93 <globalConfigs> 94 <defaultOutput adapter="primary" pipe="primary_output" device="Speaker"/> 95 <commonConfigs> 96 <attribute name="updateRouteSupport" value="false"/> 97 </commonConfigs> 98 <paConfigs> 99 <!-- audioLatency is no need any more after ipc, keeping it here just in case.--> 100 <attribute name="audioLatency" value="50"/> 101 <!-- sinkLatency is no need any more after ipc, keeping it here just in case.--> 102 <attribute name="sinkLatency" value="40"/> 103 </paConfigs> 104 <maxConcurrentInstances> 105 <output> 106 <attribute name="normal" flag="AUDIO_FLAG_NORMAL" value="128"/> 107 </output> 108 <!-- Actually, max input concurrent instances is also influenced by audio focus.--> 109 <input> 110 <attribute name="normal" flag="AUDIO_FLAG_NORMAL" value="16"/> 111 </input> 112 </maxConcurrentInstances> 113 </globalConfigs> 114</audioPolicyConfiguration> 115