Merge "audio: add incall playback and capture to policy config and mixer path" into sc-dev

This commit is contained in:
David Li 2021-03-12 01:44:36 +00:00 committed by Android (Google) Code Review
commit 0c19933743
15 changed files with 462 additions and 13 deletions

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -55,6 +57,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -65,6 +78,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -90,6 +113,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -117,6 +143,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -130,6 +159,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="BT A2DP Out" <route type="mix" sink="BT A2DP Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT A2DP Headphones" <route type="mix" sink="BT A2DP Headphones"
@ -146,6 +177,7 @@
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- Bluetooth Audio HAL --> <!-- Bluetooth Audio HAL -->

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -55,6 +57,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -65,6 +78,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -90,6 +113,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -102,6 +128,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -115,6 +144,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"
@ -125,6 +156,7 @@
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- Bluetooth Audio HAL --> <!-- Bluetooth Audio HAL -->

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -55,6 +57,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -65,6 +78,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -90,6 +113,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -102,6 +128,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -115,6 +144,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"
@ -125,6 +156,7 @@
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- A2dp Audio HAL --> <!-- A2dp Audio HAL -->

View file

@ -232,6 +232,10 @@
<ctl name="Sidetone Biquad4" id="4" value="0"/> <ctl name="Sidetone Biquad4" id="4" value="0"/>
<ctl name="Sidetone Biquad4" id="5" value="0"/> <ctl name="Sidetone Biquad4" id="5" value="0"/>
<ctl name="Incall Capture Stream0" value="Off"/>
<ctl name="Incall Capture Stream1" value="Off"/>
<ctl name="Incall Capture Stream2" value="Off"/>
<!-- sidetone dynamic control --> <!-- sidetone dynamic control -->
<path name="sidetone-for handset"> <path name="sidetone-for handset">
<!-- 1065353216 = 0x3f800000 = 1.0 --> <!-- 1065353216 = 0x3f800000 = 1.0 -->
@ -558,6 +562,34 @@
<ctl name="NoHost1 TX Mixer TDM_0_TX" value="1"/> <ctl name="NoHost1 TX Mixer TDM_0_TX" value="1"/>
</path> </path>
<path name="telephony-rx-captureC">
<ctl name="Incall Capture Stream0" value="DL"/>
</path>
<path name="incall-capture1C uplink">
<ctl name="Incall Capture Stream1" value="UL"/>
</path>
<path name="incall-capture1C downlink">
<ctl name="Incall Capture Stream1" value="DL"/>
</path>
<path name="incall-capture1C call">
<ctl name="Incall Capture Stream1" value="UL_DL"/>
</path>
<path name="incall-capture2C uplink">
<ctl name="Incall Capture Stream2" value="UL"/>
</path>
<path name="incall-capture2C downlink">
<ctl name="Incall Capture Stream2" value="DL"/>
</path>
<path name="incall-capture2C call">
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
<!-- codec setting -->> <!-- codec setting -->>
<!-- Rx device --> <!-- Rx device -->
<path name="handset"> <path name="handset">

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -55,6 +57,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -65,6 +78,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -90,6 +113,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -117,6 +143,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -130,6 +159,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="BT A2DP Out" <route type="mix" sink="BT A2DP Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT A2DP Headphones" <route type="mix" sink="BT A2DP Headphones"
@ -146,6 +177,7 @@
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- Bluetooth Audio HAL --> <!-- Bluetooth Audio HAL -->

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -55,6 +57,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -65,6 +78,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -90,6 +113,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -102,6 +128,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -115,6 +144,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"
@ -125,6 +156,7 @@
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- Bluetooth Audio HAL --> <!-- Bluetooth Audio HAL -->

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -55,6 +57,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -65,6 +78,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -90,6 +113,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -102,6 +128,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -115,6 +144,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"
@ -125,6 +156,7 @@
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- A2dp Audio HAL --> <!-- A2dp Audio HAL -->

View file

@ -232,6 +232,10 @@
<ctl name="Sidetone Biquad4" id="4" value="0"/> <ctl name="Sidetone Biquad4" id="4" value="0"/>
<ctl name="Sidetone Biquad4" id="5" value="0"/> <ctl name="Sidetone Biquad4" id="5" value="0"/>
<ctl name="Incall Capture Stream0" value="Off"/>
<ctl name="Incall Capture Stream1" value="Off"/>
<ctl name="Incall Capture Stream2" value="Off"/>
<!-- sidetone dynamic control --> <!-- sidetone dynamic control -->
<path name="sidetone-for handset"> <path name="sidetone-for handset">
<!-- 1065353216 = 0x3f800000 = 1.0 --> <!-- 1065353216 = 0x3f800000 = 1.0 -->
@ -558,6 +562,34 @@
<ctl name="NoHost1 TX Mixer TDM_0_TX" value="1"/> <ctl name="NoHost1 TX Mixer TDM_0_TX" value="1"/>
</path> </path>
<path name="telephony-rx-captureC">
<ctl name="Incall Capture Stream0" value="DL"/>
</path>
<path name="incall-capture1C uplink">
<ctl name="Incall Capture Stream1" value="UL"/>
</path>
<path name="incall-capture1C downlink">
<ctl name="Incall Capture Stream1" value="DL"/>
</path>
<path name="incall-capture1C call">
<ctl name="Incall Capture Stream1" value="UL_DL"/>
</path>
<path name="incall-capture2C uplink">
<ctl name="Incall Capture Stream2" value="UL"/>
</path>
<path name="incall-capture2C downlink">
<ctl name="Incall Capture Stream2" value="DL"/>
</path>
<path name="incall-capture2C call">
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
<!-- codec setting -->> <!-- codec setting -->>
<!-- Rx device --> <!-- Rx device -->
<path name="handset"> <path name="handset">

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -55,6 +57,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -65,6 +78,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -90,6 +113,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -117,6 +143,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -130,6 +159,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="BT A2DP Out" <route type="mix" sink="BT A2DP Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT A2DP Headphones" <route type="mix" sink="BT A2DP Headphones"
@ -146,6 +177,7 @@
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- Bluetooth Audio HAL --> <!-- Bluetooth Audio HAL -->

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -55,6 +57,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -65,6 +78,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -90,6 +113,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -102,6 +128,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -115,6 +144,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"
@ -125,6 +156,7 @@
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- Bluetooth Audio HAL --> <!-- Bluetooth Audio HAL -->

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -55,6 +57,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -65,6 +78,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -90,6 +113,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -102,6 +128,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -115,6 +144,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"
@ -125,6 +156,7 @@
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,haptic,raw,compressed_offload"/> sources="primary output,deep buffer,haptic,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- A2dp Audio HAL --> <!-- A2dp Audio HAL -->

View file

@ -196,6 +196,10 @@
<ctl name="Sidetone Biquad4" id="4" value="0"/> <ctl name="Sidetone Biquad4" id="4" value="0"/>
<ctl name="Sidetone Biquad4" id="5" value="0"/> <ctl name="Sidetone Biquad4" id="5" value="0"/>
<ctl name="Incall Capture Stream0" value="Off"/>
<ctl name="Incall Capture Stream1" value="Off"/>
<ctl name="Incall Capture Stream2" value="Off"/>
<!-- sidetone dynamic control --> <!-- sidetone dynamic control -->
<path name="sidetone-for handset"> <path name="sidetone-for handset">
<!-- 1065353216 = 0x3f800000 = 1.0 --> <!-- 1065353216 = 0x3f800000 = 1.0 -->
@ -521,6 +525,35 @@
<path name="hostless-ulC spk-vi"> <path name="hostless-ulC spk-vi">
<ctl name="NoHost1 TX Mixer TDM_0_TX" value="1"/> <ctl name="NoHost1 TX Mixer TDM_0_TX" value="1"/>
</path> </path>
<path name="telephony-rx-captureC">
<ctl name="Incall Capture Stream0" value="DL"/>
</path>
<path name="incall-capture1C uplink">
<ctl name="Incall Capture Stream1" value="UL"/>
</path>
<path name="incall-capture1C downlink">
<ctl name="Incall Capture Stream1" value="DL"/>
</path>
<path name="incall-capture1C call">
<ctl name="Incall Capture Stream1" value="UL_DL"/>
</path>
<path name="incall-capture2C uplink">
<ctl name="Incall Capture Stream2" value="UL"/>
</path>
<path name="incall-capture2C downlink">
<ctl name="Incall Capture Stream2" value="DL"/>
</path>
<path name="incall-capture2C call">
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
<!-- codec setting -->> <!-- codec setting -->>
<!-- Rx device --> <!-- Rx device -->
<path name="handset"> <path name="handset">

View file

@ -56,12 +56,12 @@
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC"> flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO" /> channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort> </mixPort>
<mixPort name="voice call tx" role="source"> <mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO" /> channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort> </mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -50,6 +52,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -60,6 +73,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -85,6 +108,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -97,6 +123,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -110,6 +139,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,raw,compressed_offload"/> sources="primary output,deep buffer,raw,compressed_offload"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"
@ -120,6 +151,7 @@
sources="primary output,deep buffer,raw,compressed_offload"/> sources="primary output,deep buffer,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,raw,compressed_offload"/> sources="primary output,deep buffer,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- Bluetooth Audio HAL --> <!-- Bluetooth Audio HAL -->

View file

@ -11,7 +11,7 @@
limitations under the License. limitations under the License.
--> -->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<globalConfiguration speaker_drc_enabled="false"/> <globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
<modules> <modules>
<!-- Primary Audio HAL --> <!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0"> <module name="primary" halVersion="2.0">
@ -20,6 +20,8 @@
<item>Speaker Safe</item> <item>Speaker Safe</item>
<item>Earpiece</item> <item>Earpiece</item>
<item>Built-In Mic</item> <item>Built-In Mic</item>
<item>Telephony Tx</item>
<item>Voice Call And Telephony Rx</item>
</attachedDevices> </attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice> <defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts> <mixPorts>
@ -50,6 +52,17 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall playback" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="voice call tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
</mixPort>
<mixPort name="primary input" role="sink"> <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" samplingRates="48000"
@ -60,6 +73,16 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/> channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort> </mixPort>
<mixPort name="incall capture" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="voice call rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
</mixPorts> </mixPorts>
<devicePorts> <devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT --> <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -85,6 +108,9 @@
</devicePort> </devicePort>
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink"> <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
</devicePort> </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source"> <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort> </devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source"> <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
@ -97,6 +123,9 @@
</devicePort> </devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source"> <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort> </devicePort>
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
</devicePort>
</devicePorts> </devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink --> <!-- route declaration, i.e. list all available sources for a given sink -->
<routes> <routes>
@ -110,6 +139,8 @@
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="hotword input" <route type="mix" sink="hotword input"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,raw,compressed_offload"/> sources="primary output,deep buffer,raw,compressed_offload"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"
@ -120,6 +151,7 @@
sources="primary output,deep buffer,raw,compressed_offload"/> sources="primary output,deep buffer,raw,compressed_offload"/>
<route type="mix" sink="BT SCO Car Kit" <route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer,raw,compressed_offload"/> sources="primary output,deep buffer,raw,compressed_offload"/>
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
</routes> </routes>
</module> </module>
<!-- A2dp Audio HAL --> <!-- A2dp Audio HAL -->