Home | History | Annotate | Download | only in bullhead
      1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      2 <!-- Copyright (C) 2016 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="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>Earpiece</item>
     25                 <item>Telephony Tx</item>
     26                 <item>Built-In Mic</item>
     27                 <item>Built-In Back Mic</item>
     28                 <item>Telephony Rx</item>
     29             </attachedDevices>
     30             <defaultOutputDevice>Speaker</defaultOutputDevice>
     31             <mixPorts>
     32                 <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST">
     33                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
     34                              samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
     35                 </mixPort>
     36                 <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW|AUDIO_OUTPUT_FLAG_FAST">
     37                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
     38                              samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
     39                 </mixPort>
     40                 <mixPort name="deep_buffer" role="source"
     41                         flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
     42                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
     43                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
     44                              channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
     45                 </mixPort>
     46                 <mixPort name="compressed_offload" role="source"
     47                          flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
     48                     <profile name="" format="AUDIO_FORMAT_MP3"
     49                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
     50                              channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
     51                     <profile name="" format="AUDIO_FORMAT_AAC_LC"
     52                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
     53                              channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
     54                     <profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
     55                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
     56                              channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
     57                     <profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
     58                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
     59                              channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
     60                 </mixPort>
     61                 <mixPort name="voice_tx" role="source">
     62                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
     63                              samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
     64                 </mixPort>
     65                 <mixPort name="primary input" role="sink">
     66                     <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
     67                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
     68                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
     69                 </mixPort>
     70                 <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_FAST">
     71                     <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
     72                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
     73                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
     74                 </mixPort>
     75                 <mixPort name="voice_rx" role="sink">
     76                     <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
     77                              samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_MONO"/>
     78                 </mixPort>
     79             </mixPorts>
     80             <devicePorts>
     81                 <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
     82                 </devicePort>
     83                 <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink">
     84                 </devicePort>
     85                 <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
     86                 </devicePort>
     87                 <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
     88                 </devicePort>
     89                 <devicePort tagName="Line Out" type="AUDIO_DEVICE_OUT_LINE" role="sink">
     90                 </devicePort>
     91                 <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
     92                 </devicePort>
     93                 <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
     94                 </devicePort>
     95                 <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
     96                 </devicePort>
     97                 <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
     98                 </devicePort>
     99 
    100                 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
    101                 </devicePort>
    102                 <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
    103                 </devicePort>
    104                 <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
    105                 </devicePort>
    106                 <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
    107                 </devicePort>
    108                 <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
    109                 </devicePort>
    110             </devicePorts>
    111             <routes>
    112                 <route type="mix" sink="Earpiece"
    113                        sources="primary output,raw,deep_buffer"/>
    114                 <route type="mix" sink="Speaker"
    115                        sources="primary output,raw,deep_buffer,compressed_offload"/>
    116                 <route type="mix" sink="Wired Headset"
    117                        sources="primary output,raw,deep_buffer,compressed_offload"/>
    118                 <route type="mix" sink="Wired Headphones"
    119                        sources="primary output,raw,deep_buffer,compressed_offload"/>
    120                 <route type="mix" sink="Line Out"
    121                        sources="primary output,raw,deep_buffer,compressed_offload"/>
    122                 <route type="mix" sink="BT SCO"
    123                        sources="primary output,raw,deep_buffer"/>
    124                 <route type="mix" sink="BT SCO Headset"
    125                        sources="primary output,raw,deep_buffer"/>
    126                 <route type="mix" sink="BT SCO Car Kit"
    127                        sources="primary output,raw,deep_buffer"/>
    128                 <route type="mix" sink="Telephony Tx"
    129                        sources="voice_tx"/>
    130                 <route type="mix" sink="primary input"
    131                        sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/>
    132                 <route type="mix" sink="fast input"
    133                        sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/>
    134                 <route type="mix" sink="voice_rx"
    135                        sources="Telephony Rx"/>
    136             </routes>
    137 
    138         </module>
    139 
    140         <!-- A2dp Audio HAL -->
    141         <xi:include href="a2dp_audio_policy_configuration.xml"/>
    142 
    143         <!-- Usb Audio HAL -->
    144         <xi:include href="usb_audio_policy_configuration.xml"/>
    145 
    146         <!-- Remote Submix Audio HAL -->
    147         <xi:include href="r_submix_audio_policy_configuration.xml"/>
    148 
    149     </modules>
    150 
    151     <!-- Volume section -->
    152     <xi:include href="audio_policy_volumes_drc.xml"/>
    153     <xi:include href="default_volume_tables.xml"/>
    154 
    155 </audioPolicyConfiguration>
    156