1<?xml version="1.0" encoding="UTF-8"?> 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<!-- Default Primary Audio HAL Module Audio Policy Configuration include file --> 18<module name="primary" halVersion="3.0"> 19 <attachedDevices> 20 <item>Speaker</item> 21 <item>Built-In Mic</item> 22 <item>Telephony Tx</item> 23 <item>Telephony Rx</item> 24 <item>FM Tuner</item> 25 </attachedDevices> 26 <defaultOutputDevice>Speaker</defaultOutputDevice> 27 <mixPorts> 28 <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY"> 29 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 30 samplingRates="8000 11025 16000 32000 44100 48000" 31 channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/> 32 </mixPort> 33 <mixPort name="compressed_offload" role="source" 34 flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING"> 35 <profile name="" format="AUDIO_FORMAT_APE" 36 samplingRates="44100 48000" 37 channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/> 38 </mixPort> 39 <mixPort name="primary input" role="sink"> 40 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 41 samplingRates="8000 11025 16000 32000 44100 48000" 42 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> 43 </mixPort> 44 45 <mixPort name="telephony_tx" role="source"> 46 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 47 samplingRates="8000 11025 16000 32000 44100 48000" 48 channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/> 49 </mixPort> 50 <mixPort name="telephony_rx" role="sink"> 51 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 52 samplingRates="8000 11025 16000 32000 44100 48000" 53 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> 54 </mixPort> 55 56 <mixPort name="fm_tuner" role="sink"> 57 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 58 samplingRates="8000 11025 16000 32000 44100 48000" 59 channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> 60 </mixPort> 61 </mixPorts> 62 <devicePorts> 63 <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink"> 64 </devicePort> 65 <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink"> 66 </devicePort> 67 68 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> 69 </devicePort> 70 <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source"> 71 </devicePort> 72 73 <devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source"> 74 </devicePort> 75 </devicePorts> 76 <routes> 77 <route type="mix" sink="Speaker" 78 sources="primary output,compressed_offload"/> 79 <route type="mix" sink="primary input" 80 sources="Built-In Mic"/> 81 82 <route type="mix" sink="telephony_rx" 83 sources="Telephony Rx"/> 84 <route type="mix" sink="Telephony Tx" 85 sources="telephony_tx"/> 86 87 <route type="mix" sink="fm_tuner" 88 sources="FM Tuner"/> 89 </routes> 90</module> 91