Merge "configs: Initialize MultiMedia10 Mixer control"
diff --git a/configs/atoll/atoll.mk b/configs/atoll/atoll.mk
index c5cc9d5..a267eaa 100644
--- a/configs/atoll/atoll.mk
+++ b/configs/atoll/atoll.mk
@@ -204,10 +204,6 @@
$(TOPDIR)frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
$(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/bluetooth_qti_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_audio_policy_configuration.xml
-# Reduce client buffer size for fast audio output tracks
-PRODUCT_PROPERTY_OVERRIDES += \
- af.fast_track_multiplier=1
-
# Low latency audio buffer size in frames
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.period_size=192
@@ -237,18 +233,10 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.buffer.size.kb=32
-#Enable offload audio video playback by default
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.offload.video=true
-
#Enable audio track offload by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.track.enable=true
-#Enable music through deep buffer
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.deep_buffer.media=true
-
#enable voice path for PCM VoIP by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.voice.path.for.pcm.voip=true
@@ -316,10 +304,6 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.hw.aac.encoder=true
-#Set AudioFlinger client heap size
-PRODUCT_PROPERTY_OVERRIDES += \
-ro.af.client_heap_size_kbyte=7168
-
#Set HAL buffer size to samples equal to 3 ms
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.in_period_size=144
diff --git a/configs/bengal/audio_policy_configuration.xml b/configs/bengal/audio_policy_configuration.xml
index b5621b7..9a384e8 100644
--- a/configs/bengal/audio_policy_configuration.xml
+++ b/configs/bengal/audio_policy_configuration.xml
@@ -146,12 +146,6 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
</mixPort>
- <mixPort name="dsd_compress_passthrough" role="source"
- flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
- <profile name="" format="AUDIO_FORMAT_DSD"
- samplingRates="2822400,5644800"
- channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
- </mixPort>
<mixPort name="voice_tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
@@ -328,11 +322,11 @@
<route type="mix" sink="Speaker"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="Wired Headset"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="Wired Headphones"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="Line"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="HDMI"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,compress_passthrough,voip_rx"/>
<route type="mix" sink="Proxy"
@@ -354,11 +348,11 @@
<route type="mix" sink="voice_rx"
sources="Telephony Rx"/>
<route type="mix" sink="primary input"
- sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
- <route type="mix" sink="voip_tx"
- sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
+ sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,Telephony Rx"/>
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
+ <route type="mix" sink="voip_tx"
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="record_24"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/>
<route type="mix" sink="mmap_no_irq_in"
diff --git a/configs/bengal/bengal.mk b/configs/bengal/bengal.mk
index bef0275..5f08986 100644
--- a/configs/bengal/bengal.mk
+++ b/configs/bengal/bengal.mk
@@ -203,10 +203,6 @@
$(TOPDIR)frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
$(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/bluetooth_qti_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_audio_policy_configuration.xml
-# Reduce client buffer size for fast audio output tracks
-PRODUCT_PROPERTY_OVERRIDES += \
- af.fast_track_multiplier=1
-
# Low latency audio buffer size in frames
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.period_size=192
@@ -249,18 +245,10 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.buffer.size.kb=32
-#Enable offload audio video playback by default
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.offload.video=true
-
#Enable audio track offload by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.track.enable=true
-#Enable music through deep buffer
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.deep_buffer.media=true
-
#enable voice path for PCM VoIP by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.voice.path.for.pcm.voip=true
@@ -328,10 +316,6 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.hw.aac.encoder=true
-#Set AudioFlinger client heap size
-PRODUCT_PROPERTY_OVERRIDES += \
-ro.af.client_heap_size_kbyte=7168
-
#Set HAL buffer size to samples equal to 3 ms
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.in_period_size=144
diff --git a/configs/kona/kona.mk b/configs/kona/kona.mk
index b335bd8..6f5c3b5 100644
--- a/configs/kona/kona.mk
+++ b/configs/kona/kona.mk
@@ -207,10 +207,6 @@
$(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/bluetooth_qti_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_audio_policy_configuration.xml \
$(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/bluetooth_qti_hearing_aid_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_hearing_aid_audio_policy_configuration.xml
-# Reduce client buffer size for fast audio output tracks
-PRODUCT_PROPERTY_OVERRIDES += \
- af.fast_track_multiplier=1
-
# Low latency audio buffer size in frames
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.period_size=192
@@ -248,18 +244,10 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.buffer.size.kb=32
-#Enable offload audio video playback by default
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.offload.video=true
-
#Enable audio track offload by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.track.enable=true
-#Enable music through deep buffer
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.deep_buffer.media=true
-
#enable voice path for PCM VoIP by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.voice.path.for.pcm.voip=true
@@ -327,10 +315,6 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.hw.aac.encoder=true
-#Set AudioFlinger client heap size
-PRODUCT_PROPERTY_OVERRIDES += \
-ro.af.client_heap_size_kbyte=7168
-
#Set HAL buffer size to samples equal to 3 ms
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.in_period_size=144
diff --git a/configs/lahaina/audio_policy_configuration.xml b/configs/lahaina/audio_policy_configuration.xml
index d47ee6e..b019195 100755
--- a/configs/lahaina/audio_policy_configuration.xml
+++ b/configs/lahaina/audio_policy_configuration.xml
@@ -146,12 +146,6 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
</mixPort>
- <mixPort name="dsd_compress_passthrough" role="source"
- flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
- <profile name="" format="AUDIO_FORMAT_DSD"
- samplingRates="2822400,5644800"
- channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
- </mixPort>
<mixPort name="voice_tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
@@ -334,11 +328,11 @@
<route type="mix" sink="Speaker"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="Wired Headset"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="Wired Headphones"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="Line"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="HDMI"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,compress_passthrough,voip_rx"/>
<route type="mix" sink="Proxy"
@@ -360,13 +354,13 @@
<route type="mix" sink="voice_rx"
sources="Telephony Rx"/>
<route type="mix" sink="primary input"
- sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+ sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,Telephony Rx"/>
+ <route type="mix" sink="usb_surround_sound"
+ sources="USB Device In,USB Headset In"/>
<route type="mix" sink="fast input"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="voip_tx"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
- <route type="mix" sink="usb_surround_sound"
- sources="USB Device In,USB Headset In"/>
<route type="mix" sink="record_24"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/>
<route type="mix" sink="mmap_no_irq_in"
diff --git a/configs/lahaina/mixer_paths.xml b/configs/lahaina/mixer_paths.xml
index cd63ed9..dd6f4b8 100644
--- a/configs/lahaina/mixer_paths.xml
+++ b/configs/lahaina/mixer_paths.xml
@@ -2812,39 +2812,39 @@
<path name="three-mic">
<ctl name="TX_CDC_DMA_TX_3 Channels" value="Three" />
<ctl name="TX_AIF1_CAP Mixer DEC1" value="1" />
- <ctl name="TX DEC1 MUX" value="SWR_MIC" />
- <ctl name="TX SMIC MUX1" value="SWR_MIC3" />
<ctl name="TX_AIF1_CAP Mixer DEC2" value="1" />
- <ctl name="TX DEC2 MUX" value="SWR_MIC" />
- <ctl name="TX SMIC MUX2" value="SWR_MIC0" />
<ctl name="TX_AIF1_CAP Mixer DEC3" value="1" />
+ <ctl name="TX DEC1 MUX" value="SWR_MIC" />
+ <ctl name="TX DEC2 MUX" value="SWR_MIC" />
<ctl name="TX DEC3 MUX" value="SWR_MIC" />
- <ctl name="TX SMIC MUX3" value="SWR_MIC2" />
+ <ctl name="TX SMIC MUX1" value="SWR_MIC11" />
+ <ctl name="TX SMIC MUX2" value="SWR_MIC8" />
+ <ctl name="TX SMIC MUX3" value="SWR_MIC10" />
<ctl name="SWR_MIC3 SWR_DMIC_MIXER Switch" value="1" />
- <ctl name="SWR_MIC3 HIFI PortMap" value="SWRM_TX1_CH4" />
<ctl name="SWR_MIC0 SWR_DMIC_MIXER Switch" value="1" />
- <ctl name="SWR_MIC0 HIFI PortMap" value="SWRM_TX1_CH1" />
<ctl name="SWR_MIC2 SWR_DMIC_MIXER Switch" value="1" />
- <ctl name="SWR_MIC2 HIFI PortMap" value="SWRM_TX1_CH3" />
+ <ctl name="SWR_MIC3 HIFI PortMap" value="SWRM_TX3_CH4" />
+ <ctl name="SWR_MIC0 HIFI PortMap" value="SWRM_TX3_CH1" />
+ <ctl name="SWR_MIC2 HIFI PortMap" value="SWRM_TX3_CH3" />
</path>
<path name="speaker-tmic">
<ctl name="TX_CDC_DMA_TX_3 Channels" value="Three" />
<ctl name="TX_AIF1_CAP Mixer DEC1" value="1" />
- <ctl name="TX DEC1 MUX" value="SWR_MIC" />
- <ctl name="TX SMIC MUX1" value="SWR_MIC3" />
<ctl name="TX_AIF1_CAP Mixer DEC2" value="1" />
- <ctl name="TX DEC2 MUX" value="SWR_MIC" />
- <ctl name="TX SMIC MUX2" value="SWR_MIC0" />
<ctl name="TX_AIF1_CAP Mixer DEC3" value="1" />
+ <ctl name="TX DEC1 MUX" value="SWR_MIC" />
+ <ctl name="TX DEC2 MUX" value="SWR_MIC" />
<ctl name="TX DEC3 MUX" value="SWR_MIC" />
- <ctl name="TX SMIC MUX3" value="SWR_MIC2" />
+ <ctl name="TX SMIC MUX1" value="SWR_MIC11" />
+ <ctl name="TX SMIC MUX2" value="SWR_MIC8" />
+ <ctl name="TX SMIC MUX3" value="SWR_MIC10" />
<ctl name="SWR_MIC3 SWR_DMIC_MIXER Switch" value="1" />
- <ctl name="SWR_MIC3 HIFI PortMap" value="SWRM_TX1_CH4" />
<ctl name="SWR_MIC0 SWR_DMIC_MIXER Switch" value="1" />
- <ctl name="SWR_MIC0 HIFI PortMap" value="SWRM_TX1_CH1" />
<ctl name="SWR_MIC2 SWR_DMIC_MIXER Switch" value="1" />
- <ctl name="SWR_MIC2 HIFI PortMap" value="SWRM_TX1_CH3" />
+ <ctl name="SWR_MIC3 HIFI PortMap" value="SWRM_TX3_CH4" />
+ <ctl name="SWR_MIC0 HIFI PortMap" value="SWRM_TX3_CH1" />
+ <ctl name="SWR_MIC2 HIFI PortMap" value="SWRM_TX3_CH3" />
</path>
<path name="voice-speaker-tmic">
@@ -2855,25 +2855,25 @@
<path name="speaker-qmic">
<ctl name="TX_CDC_DMA_TX_3 Channels" value="Four" />
<ctl name="TX_AIF1_CAP Mixer DEC1" value="1" />
- <ctl name="TX DEC1 MUX" value="SWR_MIC" />
- <ctl name="TX SMIC MUX1" value="SWR_MIC3" />
<ctl name="TX_AIF1_CAP Mixer DEC2" value="1" />
- <ctl name="TX DEC2 MUX" value="SWR_MIC" />
- <ctl name="TX SMIC MUX2" value="SWR_MIC0" />
<ctl name="TX_AIF1_CAP Mixer DEC3" value="1" />
- <ctl name="TX DEC3 MUX" value="SWR_MIC" />
- <ctl name="TX SMIC MUX3" value="SWR_MIC2" />
<ctl name="TX_AIF1_CAP Mixer DEC4" value="1" />
+ <ctl name="TX DEC1 MUX" value="SWR_MIC" />
+ <ctl name="TX DEC2 MUX" value="SWR_MIC" />
+ <ctl name="TX DEC3 MUX" value="SWR_MIC" />
<ctl name="TX DEC4 MUX" value="SWR_MIC" />
- <ctl name="TX SMIC MUX4" value="SWR_MIC1" />
+ <ctl name="TX SMIC MUX1" value="SWR_MIC11" />
+ <ctl name="TX SMIC MUX2" value="SWR_MIC8" />
+ <ctl name="TX SMIC MUX3" value="SWR_MIC10" />
+ <ctl name="TX SMIC MUX4" value="SWR_MIC9" />
<ctl name="SWR_MIC3 SWR_DMIC_MIXER Switch" value="1" />
- <ctl name="SWR_MIC3 HIFI PortMap" value="SWRM_TX1_CH4" />
<ctl name="SWR_MIC0 SWR_DMIC_MIXER Switch" value="1" />
- <ctl name="SWR_MIC0 HIFI PortMap" value="SWRM_TX1_CH1" />
<ctl name="SWR_MIC2 SWR_DMIC_MIXER Switch" value="1" />
- <ctl name="SWR_MIC2 HIFI PortMap" value="SWRM_TX1_CH3" />
<ctl name="SWR_MIC1 SWR_DMIC_MIXER Switch" value="1" />
- <ctl name="SWR_MIC1 HIFI PortMap" value="SWRM_TX1_CH2" />
+ <ctl name="SWR_MIC3 HIFI PortMap" value="SWRM_TX3_CH4" />
+ <ctl name="SWR_MIC0 HIFI PortMap" value="SWRM_TX3_CH1" />
+ <ctl name="SWR_MIC2 HIFI PortMap" value="SWRM_TX3_CH3" />
+ <ctl name="SWR_MIC1 HIFI PortMap" value="SWRM_TX3_CH2" />
</path>
<path name="speaker-qmic-liquid">
diff --git a/configs/lahaina/sound_trigger_mixer_paths.xml b/configs/lahaina/sound_trigger_mixer_paths.xml
index 16003fd..7f75004 100644
--- a/configs/lahaina/sound_trigger_mixer_paths.xml
+++ b/configs/lahaina/sound_trigger_mixer_paths.xml
@@ -281,12 +281,12 @@
<ctl name="VA DEC0 MUX" value="SWR_MIC" />
<ctl name="VA DEC1 MUX" value="SWR_MIC" />
<ctl name="VA DEC2 MUX" value="SWR_MIC" />
- <ctl name="VA SMIC MUX0" value="SWR_MIC3" />
- <ctl name="VA SMIC MUX1" value="SWR_MIC0" />
- <ctl name="VA SMIC MUX2" value="SWR_MIC1" />
- <ctl name="SWR_MIC3 HIFI PortMap" value="SWRM_TX1_CH4" />
- <ctl name="SWR_MIC0 HIFI PortMap" value="SWRM_TX1_CH1" />
- <ctl name="SWR_MIC1 HIFI PortMap" value="SWRM_TX1_CH2" />
+ <ctl name="VA SMIC MUX0" value="SWR_MIC11" />
+ <ctl name="VA SMIC MUX1" value="SWR_MIC8" />
+ <ctl name="VA SMIC MUX2" value="SWR_MIC9" />
+ <ctl name="SWR_MIC3 HIFI PortMap" value="SWRM_TX3_CH4" />
+ <ctl name="SWR_MIC0 HIFI PortMap" value="SWRM_TX3_CH1" />
+ <ctl name="SWR_MIC1 HIFI PortMap" value="SWRM_TX3_CH2" />
<ctl name="SWR_MIC3 SWR_DMIC_MIXER Switch" value="1" />
<ctl name="SWR_MIC0 SWR_DMIC_MIXER Switch" value="1" />
<ctl name="SWR_MIC1 SWR_DMIC_MIXER Switch" value="1" />
@@ -302,14 +302,14 @@
<ctl name="VA DEC1 MUX" value="SWR_MIC" />
<ctl name="VA DEC2 MUX" value="SWR_MIC" />
<ctl name="VA DEC3 MUX" value="SWR_MIC" />
- <ctl name="VA SMIC MUX0" value="SWR_MIC3" />
- <ctl name="VA SMIC MUX1" value="SWR_MIC0" />
- <ctl name="VA SMIC MUX2" value="SWR_MIC1" />
- <ctl name="VA SMIC MUX3" value="SWR_MIC2" />
- <ctl name="SWR_MIC3 HIFI PortMap" value="SWRM_TX1_CH4" />
- <ctl name="SWR_MIC0 HIFI PortMap" value="SWRM_TX1_CH1" />
- <ctl name="SWR_MIC1 HIFI PortMap" value="SWRM_TX1_CH2" />
- <ctl name="SWR_MIC2 HIFI PortMap" value="SWRM_TX1_CH3" />
+ <ctl name="VA SMIC MUX0" value="SWR_MIC11" />
+ <ctl name="VA SMIC MUX1" value="SWR_MIC8" />
+ <ctl name="VA SMIC MUX2" value="SWR_MIC9" />
+ <ctl name="VA SMIC MUX3" value="SWR_MIC10" />
+ <ctl name="SWR_MIC3 HIFI PortMap" value="SWRM_TX3_CH4" />
+ <ctl name="SWR_MIC0 HIFI PortMap" value="SWRM_TX3_CH1" />
+ <ctl name="SWR_MIC1 HIFI PortMap" value="SWRM_TX3_CH2" />
+ <ctl name="SWR_MIC2 HIFI PortMap" value="SWRM_TX3_CH3" />
<ctl name="SWR_MIC3 SWR_DMIC_MIXER Switch" value="1" />
<ctl name="SWR_MIC0 SWR_DMIC_MIXER Switch" value="1" />
<ctl name="SWR_MIC1 SWR_DMIC_MIXER Switch" value="1" />
diff --git a/configs/lito/audio_policy_configuration_odm.xml b/configs/lito/audio_policy_configuration_odm.xml
new file mode 100644
index 0000000..78185d0
--- /dev/null
+++ b/configs/lito/audio_policy_configuration_odm.xml
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Copyright (c) 2016-2017, 2019-2020, The Linux Foundation. All rights reserved
+ Not a Contribution.
+-->
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
+
+ <!-- Global configuration Decalaration -->
+ <globalConfiguration speaker_drc_enabled="true" call_screen_mode_supported="true"/>
+
+
+ <!-- Modules section:
+ There is one section per audio HW module present on the platform.
+ Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
+ The module names are the same as in current .conf file:
+ “primary”, “A2DP”, “remote_submix”, “USB”
+ Each module will contain the following sections:
+ “devicePorts”: a list of device descriptors for all input and output devices accessible via this
+ module.
+ This contains both permanently attached devices and removable devices.
+ “mixPorts”: listing all output and input streams exposed by the audio HAL
+ “routes”: list of possible connections between input and output devices or between stream and
+ devices.
+ "route": is defined by an attribute:
+ -"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
+ -"sink": the sink involved in this route
+ -"sources": all the sources than can be connected to the sink via vis route
+ “attachedDevices”: permanently attached devices.
+ The attachedDevices section is a list of devices names. The names correspond to device names
+ defined in <devicePorts> section.
+ “defaultOutputDevice”: device to be used by default when no policy rule applies
+ -->
+ <modules>
+ <module name="primary" halVersion="2.0">
+ <attachedDevices>
+ <item>Speaker</item>
+ <item>Speaker Safe</item>
+ <item>Earpiece</item>
+ <item>Telephony Tx</item>
+ <item>Built-In Mic</item>
+ <item>Built-In Back Mic</item>
+ <item>Telephony Rx</item>
+ </attachedDevices>
+ <defaultOutputDevice>Speaker</defaultOutputDevice>
+ <mixPorts>
+ <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW|AUDIO_OUTPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="hifi_playback" role="source" />
+ <mixPort name="deep_buffer" role="source"
+ flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
+ <profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
+ samplingRates="44100,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="compressed_offload" role="source"
+ flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
+ <profile name="" format="AUDIO_FORMAT_MP3"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_LC"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ </mixPort>
+ <mixPort name="voice_tx" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_MMAP_NOIRQ">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="voip_rx" role="source"
+ flags="AUDIO_OUTPUT_FLAG_VOIP_RX">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="incall_music_uplink" role="source"
+ flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="primary input" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
+ </mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
+ </mixPort>
+ <mixPort name="hifi_input" role="sink" />
+ <mixPort name="voice_rx" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
+ <mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
+ </mixPort>
+ <mixPort name="voip_tx" role="sink"
+ flags="AUDIO_INPUT_FLAG_VOIP_TX">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+ </mixPort>
+ </mixPorts>
+ <devicePorts>
+ <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
+ </devicePort>
+ <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink">
+ </devicePort>
+ <devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink">
+ </devicePort>
+ <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
+ </devicePort>
+ <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
+ </devicePort>
+ <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
+ </devicePort>
+ <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
+ </devicePort>
+ <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
+ </devicePort>
+ <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
+ </devicePort>
+ <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"
+ encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink"
+ encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink"
+ encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
+ </devicePort>
+ <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
+ </devicePort>
+ <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ </devicePort>
+ <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
+ </devicePort>
+ <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
+ </devicePort>
+ <!-- TODO: Enable multi-channel recording -->
+ <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
+ </devicePort>
+ <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
+ </devicePort>
+
+ </devicePorts>
+ <routes>
+ <route type="mix" sink="Earpiece"
+ sources="primary output,raw,deep_buffer,mmap_no_irq_out,voip_rx"/>
+ <route type="mix" sink="Speaker"
+ sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/>
+ <route type="mix" sink="Speaker Safe"
+ sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/>
+ <route type="mix" sink="Wired Headset"
+ sources="primary output,raw,deep_buffer,compressed_offload,voip_rx,mmap_no_irq_out"/>
+ <route type="mix" sink="Wired Headphones"
+ sources="primary output,raw,deep_buffer,compressed_offload,voip_rx,mmap_no_irq_out"/>
+ <route type="mix" sink="BT SCO"
+ sources="primary output,raw,deep_buffer,voip_rx"/>
+ <route type="mix" sink="BT SCO Headset"
+ sources="primary output,raw,deep_buffer,voip_rx"/>
+ <route type="mix" sink="BT SCO Car Kit"
+ sources="primary output,raw,deep_buffer,voip_rx"/>
+ <route type="mix" sink="USB Device Out"
+ sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,mmap_no_irq_out,voip_rx"/>
+ <route type="mix" sink="USB Headset Out"
+ sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,mmap_no_irq_out,voip_rx"/>
+ <route type="mix" sink="Telephony Tx"
+ sources="voice_tx,incall_music_uplink"/>
+ <route type="mix" sink="primary input"
+ sources="Wired Headset Mic,Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ <route type="mix" sink="voice_rx"
+ sources="Telephony Rx"/>
+ <route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
+ <route type="mix" sink="mmap_no_irq_in"
+ sources="Wired Headset Mic,Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/>
+ <route type="mix" sink="voip_tx"
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ <route type="mix" sink="BT A2DP Out"
+ sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
+ <route type="mix" sink="BT A2DP Headphones"
+ sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
+ <route type="mix" sink="BT A2DP Speaker"
+ sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
+ </routes>
+ </module>
+
+ <!-- A2DP Input Audio HAL -->
+ <module name="a2dp" halVersion="2.0">
+ <mixPorts>
+ <mixPort name="a2dp input" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
+ </mixPorts>
+ <devicePorts>
+ <devicePort tagName="BT A2DP In" type="AUDIO_DEVICE_IN_BLUETOOTH_A2DP" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
+ </devicePort>
+ </devicePorts>
+ <routes>
+ <route type="mix" sink="a2dp input"
+ sources="BT A2DP In"/>
+ </routes>
+ </module>
+
+ <!-- Usb Audio HAL -->
+ <module name="usb" halVersion="2.0">
+ <mixPorts>
+ <mixPort name="usb_accessory output" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ </mixPorts>
+ <devicePorts>
+ <devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ </devicePorts>
+ <routes>
+ <route type="mix" sink="USB Host Out"
+ sources="usb_accessory output"/>
+ </routes>
+ </module>
+
+ <!-- Remote Submix Audio HAL -->
+ <xi:include href="r_submix_audio_policy_configuration.xml"/>
+
+ </modules>
+ <!-- End of Modules section -->
+
+ <!-- Volume section -->
+
+ <xi:include href="audio_policy_volumes.xml"/>
+ <xi:include href="default_volume_tables.xml"/>
+
+ <!-- End of Volume section -->
+
+</audioPolicyConfiguration>
diff --git a/configs/lito/lito.mk b/configs/lito/lito.mk
index 47ca19a..7413876 100644
--- a/configs/lito/lito.mk
+++ b/configs/lito/lito.mk
@@ -124,6 +124,7 @@
$(KERNEL_MODULES_OUT)/audio_wcd_core.ko \
$(KERNEL_MODULES_OUT)/audio_swr_ctrl.ko \
$(KERNEL_MODULES_OUT)/audio_wsa881x.ko \
+ $(KERNEL_MODULES_OUT)/audio_wsa883x.ko \
$(KERNEL_MODULES_OUT)/audio_platform.ko \
$(KERNEL_MODULES_OUT)/audio_hdmi.ko \
$(KERNEL_MODULES_OUT)/audio_stub.ko \
@@ -207,8 +208,16 @@
PRODUCT_COPY_FILES += \
$(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/lito/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml
endif
+
+ifeq ($(GENERIC_ODM_IMAGE),true)
PRODUCT_COPY_FILES += \
- $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
+ $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/lito/audio_policy_configuration_odm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml
+else
+PRODUCT_COPY_FILES += \
+ $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml
+endif
+
+PRODUCT_COPY_FILES += \
$(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
$(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
$(TOPDIR)frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
@@ -216,10 +225,6 @@
$(TOPDIR)frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
$(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/bluetooth_qti_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_audio_policy_configuration.xml
-# Reduce client buffer size for fast audio output tracks
-PRODUCT_PROPERTY_OVERRIDES += \
- af.fast_track_multiplier=1
-
# Low latency audio buffer size in frames
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.period_size=192
@@ -257,18 +262,10 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.buffer.size.kb=32
-#Enable offload audio video playback by default
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.offload.video=true
-
#Enable audio track offload by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.track.enable=true
-#Enable music through deep buffer
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.deep_buffer.media=true
-
#enable voice path for PCM VoIP by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.voice.path.for.pcm.voip=true
@@ -336,10 +333,6 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.hw.aac.encoder=true
-#Set AudioFlinger client heap size
-PRODUCT_PROPERTY_OVERRIDES += \
-ro.af.client_heap_size_kbyte=7168
-
#Set HAL buffer size to samples equal to 3 ms
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.in_period_size=144
diff --git a/configs/msmnile/audio_policy_configuration_odm.xml b/configs/msmnile/audio_policy_configuration_odm.xml
new file mode 100644
index 0000000..78185d0
--- /dev/null
+++ b/configs/msmnile/audio_policy_configuration_odm.xml
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Copyright (c) 2016-2017, 2019-2020, The Linux Foundation. All rights reserved
+ Not a Contribution.
+-->
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
+
+ <!-- Global configuration Decalaration -->
+ <globalConfiguration speaker_drc_enabled="true" call_screen_mode_supported="true"/>
+
+
+ <!-- Modules section:
+ There is one section per audio HW module present on the platform.
+ Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
+ The module names are the same as in current .conf file:
+ “primary”, “A2DP”, “remote_submix”, “USB”
+ Each module will contain the following sections:
+ “devicePorts”: a list of device descriptors for all input and output devices accessible via this
+ module.
+ This contains both permanently attached devices and removable devices.
+ “mixPorts”: listing all output and input streams exposed by the audio HAL
+ “routes”: list of possible connections between input and output devices or between stream and
+ devices.
+ "route": is defined by an attribute:
+ -"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
+ -"sink": the sink involved in this route
+ -"sources": all the sources than can be connected to the sink via vis route
+ “attachedDevices”: permanently attached devices.
+ The attachedDevices section is a list of devices names. The names correspond to device names
+ defined in <devicePorts> section.
+ “defaultOutputDevice”: device to be used by default when no policy rule applies
+ -->
+ <modules>
+ <module name="primary" halVersion="2.0">
+ <attachedDevices>
+ <item>Speaker</item>
+ <item>Speaker Safe</item>
+ <item>Earpiece</item>
+ <item>Telephony Tx</item>
+ <item>Built-In Mic</item>
+ <item>Built-In Back Mic</item>
+ <item>Telephony Rx</item>
+ </attachedDevices>
+ <defaultOutputDevice>Speaker</defaultOutputDevice>
+ <mixPorts>
+ <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW|AUDIO_OUTPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="hifi_playback" role="source" />
+ <mixPort name="deep_buffer" role="source"
+ flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
+ <profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
+ samplingRates="44100,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="compressed_offload" role="source"
+ flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
+ <profile name="" format="AUDIO_FORMAT_MP3"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_LC"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ </mixPort>
+ <mixPort name="voice_tx" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_MMAP_NOIRQ">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="voip_rx" role="source"
+ flags="AUDIO_OUTPUT_FLAG_VOIP_RX">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="incall_music_uplink" role="source"
+ flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="primary input" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
+ </mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
+ </mixPort>
+ <mixPort name="hifi_input" role="sink" />
+ <mixPort name="voice_rx" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
+ <mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
+ </mixPort>
+ <mixPort name="voip_tx" role="sink"
+ flags="AUDIO_INPUT_FLAG_VOIP_TX">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+ </mixPort>
+ </mixPorts>
+ <devicePorts>
+ <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
+ </devicePort>
+ <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink">
+ </devicePort>
+ <devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink">
+ </devicePort>
+ <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
+ </devicePort>
+ <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
+ </devicePort>
+ <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
+ </devicePort>
+ <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
+ </devicePort>
+ <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
+ </devicePort>
+ <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
+ </devicePort>
+ <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"
+ encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink"
+ encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink"
+ encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
+ </devicePort>
+ <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
+ </devicePort>
+ <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ </devicePort>
+ <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
+ </devicePort>
+ <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
+ </devicePort>
+ <!-- TODO: Enable multi-channel recording -->
+ <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
+ </devicePort>
+ <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
+ </devicePort>
+
+ </devicePorts>
+ <routes>
+ <route type="mix" sink="Earpiece"
+ sources="primary output,raw,deep_buffer,mmap_no_irq_out,voip_rx"/>
+ <route type="mix" sink="Speaker"
+ sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/>
+ <route type="mix" sink="Speaker Safe"
+ sources="primary output,raw,deep_buffer,compressed_offload,mmap_no_irq_out,voip_rx"/>
+ <route type="mix" sink="Wired Headset"
+ sources="primary output,raw,deep_buffer,compressed_offload,voip_rx,mmap_no_irq_out"/>
+ <route type="mix" sink="Wired Headphones"
+ sources="primary output,raw,deep_buffer,compressed_offload,voip_rx,mmap_no_irq_out"/>
+ <route type="mix" sink="BT SCO"
+ sources="primary output,raw,deep_buffer,voip_rx"/>
+ <route type="mix" sink="BT SCO Headset"
+ sources="primary output,raw,deep_buffer,voip_rx"/>
+ <route type="mix" sink="BT SCO Car Kit"
+ sources="primary output,raw,deep_buffer,voip_rx"/>
+ <route type="mix" sink="USB Device Out"
+ sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,mmap_no_irq_out,voip_rx"/>
+ <route type="mix" sink="USB Headset Out"
+ sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,mmap_no_irq_out,voip_rx"/>
+ <route type="mix" sink="Telephony Tx"
+ sources="voice_tx,incall_music_uplink"/>
+ <route type="mix" sink="primary input"
+ sources="Wired Headset Mic,Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ <route type="mix" sink="voice_rx"
+ sources="Telephony Rx"/>
+ <route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
+ <route type="mix" sink="mmap_no_irq_in"
+ sources="Wired Headset Mic,Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/>
+ <route type="mix" sink="voip_tx"
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ <route type="mix" sink="BT A2DP Out"
+ sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
+ <route type="mix" sink="BT A2DP Headphones"
+ sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
+ <route type="mix" sink="BT A2DP Speaker"
+ sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
+ </routes>
+ </module>
+
+ <!-- A2DP Input Audio HAL -->
+ <module name="a2dp" halVersion="2.0">
+ <mixPorts>
+ <mixPort name="a2dp input" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
+ </mixPorts>
+ <devicePorts>
+ <devicePort tagName="BT A2DP In" type="AUDIO_DEVICE_IN_BLUETOOTH_A2DP" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
+ </devicePort>
+ </devicePorts>
+ <routes>
+ <route type="mix" sink="a2dp input"
+ sources="BT A2DP In"/>
+ </routes>
+ </module>
+
+ <!-- Usb Audio HAL -->
+ <module name="usb" halVersion="2.0">
+ <mixPorts>
+ <mixPort name="usb_accessory output" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ </mixPorts>
+ <devicePorts>
+ <devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ </devicePorts>
+ <routes>
+ <route type="mix" sink="USB Host Out"
+ sources="usb_accessory output"/>
+ </routes>
+ </module>
+
+ <!-- Remote Submix Audio HAL -->
+ <xi:include href="r_submix_audio_policy_configuration.xml"/>
+
+ </modules>
+ <!-- End of Modules section -->
+
+ <!-- Volume section -->
+
+ <xi:include href="audio_policy_volumes.xml"/>
+ <xi:include href="default_volume_tables.xml"/>
+
+ <!-- End of Volume section -->
+
+</audioPolicyConfiguration>
diff --git a/configs/msmnile/msmnile.mk b/configs/msmnile/msmnile.mk
index 8945c76..5a6796b 100644
--- a/configs/msmnile/msmnile.mk
+++ b/configs/msmnile/msmnile.mk
@@ -187,8 +187,16 @@
PRODUCT_COPY_FILES += \
$(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/msmnile/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml
endif
+
+ifeq ($(GENERIC_ODM_IMAGE),true)
PRODUCT_COPY_FILES += \
- $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
+ $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/msmnile/audio_policy_configuration_odm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml
+else
+PRODUCT_COPY_FILES += \
+ $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml
+endif
+
+PRODUCT_COPY_FILES += \
$(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
$(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
$(TOPDIR)frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
@@ -200,10 +208,6 @@
PRODUCT_COPY_FILES += \
vendor/qcom/opensource/audio-hal/primary-hal/configs/msmnile/listen_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/listen_platform_info.xml
-# Reduce client buffer size for fast audio output tracks
-PRODUCT_PROPERTY_OVERRIDES += \
- af.fast_track_multiplier=1
-
# Low latency audio buffer size in frames
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.period_size=192
@@ -241,18 +245,10 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.buffer.size.kb=32
-#Enable offload audio video playback by default
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.offload.video=true
-
#Enable audio track offload by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.track.enable=true
-#Enable music through deep buffer
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.deep_buffer.media=true
-
#enable voice path for PCM VoIP by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.voice.path.for.pcm.voip=true
@@ -328,10 +324,6 @@
PRODUCT_PROPERTY_OVERRIDES += \
audio.sys.offload.pstimeout.secs=3
-#Set AudioFlinger client heap size
-PRODUCT_PROPERTY_OVERRIDES += \
-ro.af.client_heap_size_kbyte=7168
-
#Set HAL buffer size to samples equal to 3 ms
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.in_period_size=144
diff --git a/configs/msmsteppe/msmsteppe.mk b/configs/msmsteppe/msmsteppe.mk
index 829b159..512f378 100644
--- a/configs/msmsteppe/msmsteppe.mk
+++ b/configs/msmsteppe/msmsteppe.mk
@@ -193,7 +193,7 @@
$(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/msmsteppe/audio_policy_configuration_odm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml
else
PRODUCT_COPY_FILES += \
- $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml
+ $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml
endif
PRODUCT_COPY_FILES += \
@@ -208,10 +208,6 @@
PRODUCT_COPY_FILES += \
vendor/qcom/opensource/audio-hal/primary-hal/configs/msmsteppe/listen_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/listen_platform_info.xml
-# Reduce client buffer size for fast audio output tracks
-PRODUCT_PROPERTY_OVERRIDES += \
- af.fast_track_multiplier=1
-
# Low latency audio buffer size in frames
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.period_size=192
@@ -257,18 +253,10 @@
PRODUCT_PROPERTY_OVERRIDES += \
audio.offload.min.duration.secs=30
-#Enable offload audio video playback by default
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.offload.video=true
-
#Enable audio track offload by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.track.enable=true
-#Enable music through deep buffer
-PRODUCT_PROPERTY_OVERRIDES += \
-audio.deep_buffer.media=true
-
#enable voice path for PCM VoIP by default
PRODUCT_PROPERTY_OVERRIDES += \
vendor.voice.path.for.pcm.voip=true
@@ -344,10 +332,6 @@
PRODUCT_PROPERTY_OVERRIDES += \
audio.sys.offload.pstimeout.secs=3
-#Set AudioFlinger client heap size
-PRODUCT_PROPERTY_OVERRIDES += \
-ro.af.client_heap_size_kbyte=7168
-
#Set HAL buffer size to samples equal to 3 ms
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio_hal.in_period_size=144
@@ -402,7 +386,6 @@
vendor.audio.feature.ras.enable=true \
vendor.audio.feature.record_play_concurency.enable=false \
vendor.audio.feature.src_trkn.enable=true \
-vendor.audio.feature.spkr_prot.enable=true \
vendor.audio.feature.ssrec.enable=true \
vendor.audio.feature.usb_offload.enable=true \
vendor.audio.feature.usb_offload_burst_mode.enable=true \
@@ -413,6 +396,12 @@
vendor.audio.feature.audiozoom.enable=false \
vendor.audio.feature.snd_mon.enable=true
+ifeq ($(TARGET_FWK_SUPPORTS_FULL_VALUEADDS),true)
+PRODUCT_PROPERTY_OVERRIDES += vendor.audio.feature.spkr_prot.enable=true
+else
+PRODUCT_PROPERTY_OVERRIDES += vendor.audio.feature.spkr_prot.enable=false
+endif
+
#enable AAC frame ctl for A2DP sinks
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.bt.aac_frm_ctl.enabled=true
diff --git a/hal/audio_extn/device_utils.c b/hal/audio_extn/device_utils.c
index 7bc4150..a0ee5b5 100644
--- a/hal/audio_extn/device_utils.c
+++ b/hal/audio_extn/device_utils.c
@@ -337,13 +337,13 @@
int clear_devices(struct listnode *devices)
{
- struct listnode *node;
+ struct listnode *node, *temp;
struct audio_device_info *item = NULL;
if (devices == NULL)
return 0;
- list_for_each (node, devices) {
+ list_for_each_safe (node, temp, devices) {
item = node_to_item(node, struct audio_device_info, list);
if (item != NULL) {
list_remove(&item->list);
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index ab051ca..de72fe7 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -3927,8 +3927,15 @@
out_set_pcm_volume(&out->stream, out->volume_l, out->volume_r);
}
} else {
- platform_set_stream_channel_map(adev->platform, out->channel_mask,
- out->pcm_device_id, &out->channel_map_param.channel_map[0]);
+ /*
+ * set custom channel map if:
+ * 1. neither mono nor stereo clips i.e. channels > 2 OR
+ * 2. custom channel map has been set by client
+ * else default channel map of FC/FR/FL can always be set to DSP
+ */
+ if (popcount(out->channel_mask) > 2 || out->channel_map_param.channel_map[0])
+ platform_set_stream_channel_map(adev->platform, out->channel_mask,
+ out->pcm_device_id, &out->channel_map_param.channel_map[0]);
audio_enable_asm_bit_width_enforce_mode(adev->mixer,
adev->dsp_bit_width_enforce_mode,
true);
@@ -8142,7 +8149,7 @@
else
adev->haptics_config = pcm_config_haptics;
- out->config.channels =
+ channels =
audio_channel_count_from_out_mask(out->channel_mask & ~AUDIO_CHANNEL_HAPTIC_ALL);
if (force_haptic_path) {
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 8ee36f5..985de83 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1694,6 +1694,10 @@
sizeof("sm6150-idp-snd-card")) ||
!strncmp(snd_card_name, "qcs605-lc-snd-card",
sizeof("qcs605-lc-snd-card")) ||
+ !strncmp(snd_card_name, "lahaina-mtp-snd-card",
+ sizeof("lahaina-mtp-snd-card")) ||
+ !strncmp(snd_card_name, "lahaina-qrd-snd-card",
+ sizeof("lahaina-qrd-snd-card")) ||
!strncmp(snd_card_name, "kona-mtp-snd-card",
sizeof("kona-mtp-snd-card")) ||
!strncmp(snd_card_name, "kona-qrd-snd-card",
@@ -3305,6 +3309,9 @@
else if (!strncmp(snd_card_name, "sm6150-wcd9375qrd-snd-card",
sizeof("sm6150-wcd9375qrd-snd-card")))
platform_info_init(PLATFORM_INFO_XML_PATH_QRD, my_data, PLATFORM);
+ else if (!strncmp(snd_card_name, "lahaina-qrd-snd-card",
+ sizeof("lahaina-qrd-snd-card")))
+ platform_info_init(PLATFORM_INFO_XML_PATH_QRD, my_data, PLATFORM);
else if (!strncmp(snd_card_name, "kona-qrd-snd-card",
sizeof("kona-qrd-snd-card")))
platform_info_init(PLATFORM_INFO_XML_PATH_QRD, my_data, PLATFORM);
@@ -3583,6 +3590,7 @@
//TODO:: make generic interfaceface to check Slimbus/I2S/CDC_DMA
if (!strncmp(snd_card_name, "sm6150", strlen("sm6150")) ||
!strncmp(snd_card_name, "kona", strlen("kona")) ||
+ !strncmp(snd_card_name, "lahaina", strlen("lahaina")) ||
!strncmp(snd_card_name, "lito", strlen("lito")) ||
!strncmp(snd_card_name, "atoll", strlen("atoll")) ||
!strncmp(snd_card_name, "trinket", strlen("trinket"))||