gts3l: audio: Fix speaker output but no luck for quad-speaker

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: Ia2f229306cf081814ab6413ee11228fa6715ac91
This commit is contained in:
Deokgyu Yang 2021-05-28 00:40:44 +09:00
parent bda91939b3
commit 382bbd3f4a
7 changed files with 4076 additions and 2241 deletions

View file

@ -101,7 +101,6 @@ AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
BOARD_SUPPORTS_SOUND_TRIGGER := false
BOARD_USES_ALSA_AUDIO := true
USE_LEGACY_AUDIO_DAEMON := true
USE_CUSTOM_AUDIO_POLICY := 1
USE_XML_AUDIO_POLICY_CONF := 1

View file

@ -31,7 +31,7 @@
<device name="SND_DEVICE_IN_UNPROCESSED_MIC" acdb_id="143"/>
<device name="SND_DEVICE_IN_UNPROCESSED_STEREO_MIC" acdb_id="144"/>
<device name="SND_DEVICE_IN_UNPROCESSED_THREE_MIC" acdb_id="145"/>
<device name="SND_DEVICE_IN_UNPROCESSED_QAUD_MIC" acdb_id="146"/>
<device name="SND_DEVICE_IN_UNPROCESSED_QUAD_MIC" acdb_id="146"/>
<device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" acdb_id="147"/>
</acdb_ids>
<bit_width_configs>
@ -47,6 +47,7 @@
<param key="input_mic_max_count" value="4"/>
</config_params>
<backend_names>
<device name="SND_DEVICE_OUT_SPEAKER" backend="speaker"/>
<device name="SND_DEVICE_OUT_HEADPHONES" backend="headphones" interface="SLIMBUS_6_RX"/>
<device name="SND_DEVICE_OUT_LINE" backend="headphones" interface="SLIMBUS_6_RX"/>
<device name="SND_DEVICE_OUT_ANC_HEADSET" backend="headphones" interface="SLIMBUS_6_RX"/>

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Copyright (c) 2014, 2016-2017, The Linux Foundation. All rights reserved. -->
<!-- -->
<!-- Redistribution and use in source and binary forms, with or without -->
<!-- modification, are permitted provided that the following conditions are -->
<!-- met: -->
<!-- * Redistributions of source code must retain the above copyright -->
<!-- notice, this list of conditions and the following disclaimer. -->
<!-- * Redistributions in binary form must reproduce the above -->
<!-- copyright notice, this list of conditions and the following -->
<!-- disclaimer in the documentation and/or other materials provided -->
<!-- with the distribution. -->
<!-- * Neither the name of The Linux Foundation nor the names of its -->
<!-- contributors may be used to endorse or promote products derived -->
<!-- from this software without specific prior written permission. -->
<!-- -->
<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
<audio_platform_info_i2s>
<acdb_ids>
<device name="SND_DEVICE_IN_HANDSET_MIC" acdb_id="8" />
<device name="SND_DEVICE_IN_SPEAKER_MIC" acdb_id="8" />
<device name="SND_DEVICE_IN_VOICE_SPEAKER_MIC" acdb_id="8" />
<device name="SND_DEVICE_OUT_HANDSET" acdb_id="10" />
<device name="SND_DEVICE_OUT_VOICE_HANDSET" acdb_id="10" />
<device name="SND_DEVICE_OUT_SPEAKER" acdb_id="10" />
<device name="SND_DEVICE_OUT_VOICE_SPEAKER" acdb_id="10" />
</acdb_ids>
<pcm_ids>
<usecase name="USECASE_VOICEMMODE1_CALL" type="in" id="2"/>
<usecase name="USECASE_VOICEMMODE1_CALL" type="out" id="2"/>
<usecase name="USECASE_VOICEMMODE2_CALL" type="in" id="2"/>
<usecase name="USECASE_VOICEMMODE2_CALL" type="out" id="2"/>
</pcm_ids>
</audio_platform_info_i2s>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,269 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. -->
<!-- -->
<!-- Redistribution and use in source and binary forms, with or without -->
<!-- modification, are permitted provided that the following conditions are -->
<!-- met: -->
<!-- * Redistributions of source code must retain the above copyright -->
<!-- notice, this list of conditions and the following disclaimer. -->
<!-- * Redistributions in binary form must reproduce the above -->
<!-- copyright notice, this list of conditions and the following -->
<!-- disclaimer in the documentation and/or other materials provided -->
<!-- with the distribution. -->
<!-- * Neither the name of The Linux Foundation nor the names of its -->
<!-- contributors may be used to endorse or promote products derived -->
<!-- from this software without specific prior written permission. -->
<!-- -->
<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
<mixer>
<!-- These are the initial mixer settings -->
<ctl name="Voice Rx Device Mute" id="0" value="0" />
<ctl name="Voice Rx Device Mute" id="1" value="-1" />
<ctl name="Voice Rx Device Mute" id="2" value="20" />
<ctl name="Voice Tx Mute" id="0" value="0" />
<ctl name="Voice Tx Mute" id="1" value="-1" />
<ctl name="Voice Tx Mute" id="2" value="500" />
<ctl name="Voice Rx Gain" id="0" value="0" />
<ctl name="Voice Rx Gain" id="1" value="-1" />
<ctl name="Voice Rx Gain" id="2" value="20" />
<ctl name="HPHL Volume" value="97" />
<ctl name="HPHR Volume" value="97" />
<ctl name="RX1 Digital Volume" value="84" />
<ctl name="RX2 Digital Volume" value="84" />
<ctl name="RX3 Digital Volume" value="84" />
<ctl name="RX4 Digital Volume" value="84" />
<ctl name="ADC2 Volume" value="19" />
<ctl name="DEC5 Volume" value="84" />
<ctl name="DEC10 Volume" value="84" />
<ctl name="COMP0 Switch" value="0" />
<ctl name="COMP1 Switch" value="0" />
<ctl name="AUX_PCM_RX Audio Mixer MultiMedia1" value="0" />
<ctl name="AUX_PCM_RX Audio Mixer MultiMedia4" value="0" />
<ctl name="AUX_PCM_RX Audio Mixer MultiMedia5" value="0" />
<ctl name="MultiMedia1 Mixer AUX_PCM_UL_TX" value="0" />
<ctl name="MultiMedia8 Mixer AUX_PCM_UL_TX" value="0" />
<ctl name="IIR1 INP1 MUX" value="ZERO" />
<ctl name="SLIM TX9 MUX" value="ZERO" />
<ctl name="DEC10 MUX" value="ZERO" />
<ctl name="DEC5 MUX" value="ZERO" />
<ctl name="RX2 MIX2 INP1" value="ZERO" />
<ctl name="RX1 MIX2 INP1" value="ZERO" />
<ctl name="RX7 MIX1 INP1" value="ZERO" />
<ctl name="RX2 MIX1 INP2" value="ZERO" />
<ctl name="RX2 MIX1 INP1" value="ZERO" />
<ctl name="RX1 MIX1 INP1" value="ZERO" />
<ctl name="HPHL DAC Switch" value="0" />
<ctl name="QUAT_MI2S_RX Channels" value="One" />
<ctl name="QUAT_MI2S_TX Channels" value="One" />
<ctl name="SLIM RX4 MUX" value="AIF1_PB" />
<ctl name="SLIM RX3 MUX" value="AIF1_PB" />
<ctl name="CLASS_H_DSM MUX" value="ZERO" />
<!-- Multimode Voice1 -->
<ctl name="Voice Stub Tx Mixer TERT_MI2S_TX" value="0" />
<ctl name="QUAT_MI2S_RX_Voice Mixer Voice Stub" value="0" />
<ctl name="Voice Stub Tx Mixer QUAT_MI2S_TX" value="0" />
<ctl name="TERT_MI2S_RX_Voice Mixer Voice Stub" value="0" />
<ctl name="QUAT_MI2S_RX Port Mixer TERT_MI2S_TX" value="0" />
<ctl name="TERT_MI2S_RX Port Mixer QUAT_MI2S_TX" value="0" />
<!-- Multimode Voice1 end -->
<!-- Multimode Voice2 -->
<ctl name="Voice2 Stub Tx Mixer TERT_MI2S_TX" value="0" />
<ctl name="QUAT_MI2S_RX_Voice Mixer Voice2 Stub" value="0" />
<ctl name="Voice2 Stub Tx Mixer QUAT_MI2S_TX" value="0" />
<ctl name="TERT_MI2S_RX_Voice Mixer Voice2 Stub" value="0" />
<ctl name="QUAT_MI2S_RX Port Mixer TERT_MI2S_TX" value="0" />
<ctl name="TERT_MI2S_RX Port Mixer QUAT_MI2S_TX" value="0" />
<!-- Multimode Voice2 end -->
<!-- RT Proxy Cal -->
<ctl name="RT_PROXY_1_RX SetCalMode" value="CAL_MODE_NONE" />
<ctl name="RT_PROXY_1_TX SetCalMode" value="CAL_MODE_NONE" />
<!-- RT Proxy Cal end -->
<!-- These are audio route (FE to BE) specific mixer settings -->
<path name="deep-buffer-playback">
<ctl name="AUX_PCM_RX Audio Mixer MultiMedia1" value="1" />
</path>
<path name="low-latency-playback">
<ctl name="AUX_PCM_RX Audio Mixer MultiMedia5" value="1" />
</path>
<path name="compress-offload-playback">
<ctl name="AUX_PCM_RX Audio Mixer MultiMedia4" value="1" />
</path>
<path name="audio-record">
<ctl name="MultiMedia1 Mixer AUX_PCM_UL_TX" value="1" />
</path>
<path name="audio-record-compress">
<ctl name="MultiMedia8 Mixer AUX_PCM_UL_TX" value="1" />
</path>
<path name="voicemmode1-call">
<ctl name="Voice Stub Tx Mixer TERT_MI2S_TX" value="1" />
<ctl name="QUAT_MI2S_RX_Voice Mixer Voice Stub" value="1" />
<ctl name="Voice Stub Tx Mixer QUAT_MI2S_TX" value="1" />
<ctl name="TERT_MI2S_RX_Voice Mixer Voice Stub" value="1" />
<ctl name="QUAT_MI2S_RX Port Mixer TERT_MI2S_TX" value="1" />
<ctl name="TERT_MI2S_RX Port Mixer QUAT_MI2S_TX" value="1" />
</path>
<path name="voicemmode2-call">
<ctl name="Voice Stub Tx Mixer PRI_MI2S_TX" value="1" />
<ctl name="QUAT_MI2S_RX_Voice Mixer Voice Stub" value="1" />
<ctl name="Voice Stub Tx Mixer QUAT_MI2S_TX" value="1" />
<ctl name="PRI_MI2S_RX_Voice Mixer Voice Stub" value="1" />
<ctl name="QUAT_MI2S_RX Port Mixer PRI_MI2S_TX" value="1" />
<ctl name="PRI_MI2S_RX Port Mixer QUAT_MI2S_TX" value="1" />
</path>
<path name="gsm-mode">
<ctl name="GSM mode Enable" value="ON" />
</path>
<!-- These are actual sound device specific mixer settings -->
<path name="adc1">
<ctl name="AIF1_CAP Mixer SLIM TX9" value="1"/>
<ctl name="QUAT_MI2S_TX Channels" value="One" />
<ctl name="SLIM TX9 MUX" value="DEC5" />
<ctl name="DEC5 MUX" value="ADC2" />
</path>
<path name="adc2">
<ctl name="MI2S_TX Channels" value="One" />
<ctl name="AIF1_CAP Mixer SLIM TX8" value="1"/>
<ctl name="SLIM TX8 MUX" value="DEC8" />
<ctl name="ADC MUX8" value="AMIC" />
<ctl name="AMIC MUX8" value="ADC2" />
</path>
<path name="dmic1">
<ctl name="AIF1_CAP Mixer SLIM TX9" value="1"/>
<ctl name="QUAT_MI2S_TX Channels" value="One" />
<ctl name="SLIM TX9 MUX" value="DEC10" />
<ctl name="DEC10 MUX" value="DMIC3" />
</path>
<path name="speaker">
<ctl name="SLIM RX3 MUX" value="AIF1_PB" />
<ctl name="SLIM RX4 MUX" value="AIF1_PB" />
<ctl name="QUAT_MI2S_RX Channels" value="Two" />
<ctl name="RX1 MIX1 INP1" value="RX3" />
<ctl name="RX2 MIX1 INP1" value="RX4" />
<ctl name="CLASS_H_DSM MUX" value="DSM_HPHL_RX1" />
<ctl name="HPHL DAC Switch" value="1" />
<ctl name="COMP1 Switch" value="1" />
</path>
<path name="sidetone-iir">
<ctl name="IIR1 Enable Band1" value="1" />
<ctl name="IIR1 Enable Band2" value="1" />
<ctl name="IIR1 Enable Band3" value="1" />
<ctl name="IIR1 Enable Band4" value="1" />
<ctl name="IIR1 Enable Band5" value="1" />
</path>
<path name="sidetone-headphones">
<path name="sidetone-iir" />
<ctl name="IIR1 INP1 Volume" value="77" />
<ctl name="RX1 MIX2 INP1" value="IIR1" />
<ctl name="RX2 MIX2 INP1" value="IIR1" />
</path>
<path name="sidetone-handset">
<path name="sidetone-iir" />
<ctl name="IIR1 INP1 Volume" value="62" />
<ctl name="RX1 MIX2 INP1" value="IIR1" />
</path>
<path name="speaker-mic">
<path name="dmic1" />
</path>
<path name="handset">
<ctl name="SLIM RX3 MUX" value="AIF1_PB" />
<ctl name="SLIM RX4 MUX" value="AIF1_PB" />
<ctl name="QUAT_MI2S_RX Channels" value="Two" />
<ctl name="RX1 MIX1 INP1" value="RX3" />
<ctl name="RX2 MIX1 INP1" value="RX4" />
<ctl name="CLASS_H_DSM MUX" value="DSM_HPHL_RX1" />
<ctl name="HPHL DAC Switch" value="1" />
<ctl name="COMP1 Switch" value="1" />
</path>
<path name="handset-mic">
<path name="adc2" />
</path>
<path name="headphones">
<ctl name="SLIM RX2 MUX" value="AIF1_PB" />
<ctl name="SLIM RX3 MUX" value="AIF1_PB" />
<ctl name="MI2S_RX Channels" value="Two" />
<ctl name="RX INT1_1 MIX1 INP0" value="RX2" />
<ctl name="RX INT2_1 MIX1 INP0" value="RX3" />
<ctl name="RX INT1 DEM MUX" value="CLSH_DSM_OUT" />
<ctl name="RX INT2 DEM MUX" value="CLSH_DSM_OUT" />
<ctl name="COMP1 Switch" value="1" />
<ctl name="COMP2 Switch" value="1" />
</path>
<path name="headset-mic">
<path name="adc2" />
<ctl name="DEC8 Volume" value="84" />
</path>
<path name="voice-handset">
<path name="headphones" />
</path>
<path name="voice-handset-tmus">
<path name="handset" />
</path>
<path name="voice-speaker">
<path name="speaker" />
</path>
<path name="voice-speaker-mic">
<path name="speaker-mic" />
</path>
<path name="voice-headphones">
<path name="headphones" />
</path>
<path name="voice-headset-mic">
<path name="headset-mic" />
<path name="sidetone-headphones" />
<ctl name="ADC2 Volume" value="13" />
</path>
<path name="speaker-and-headphones">
<path name="headphones" />
<ctl name="RX7 MIX1 INP1" value="RX1" />
<ctl name="COMP0 Switch" value="1" />
</path>
<path name="voice-rec-mic">
<path name="handset-mic" />
</path>
<path name="camcorder-mic">
<path name="handset-mic" />
</path>
</mixer>

File diff suppressed because it is too large Load diff

View file

@ -88,15 +88,15 @@ PRODUCT_PACKAGES += \
# Audio
PRODUCT_PACKAGES += \
android.hardware.audio@6.0 \
android.hardware.audio@6.0-impl.gts3l:32 \
android.hardware.audio@6.0-impl \
android.hardware.audio.common@6.0 \
android.hardware.audio.common@6.0-util \
android.hardware.audio.effect@6.0 \
android.hardware.audio.effect@6.0-impl:32 \
android.hardware.audio.effect@6.0-impl \
android.hardware.audio.service \
android.hardware.bluetooth.audio@2.0-impl:32 \
android.hardware.bluetooth.audio@2.0-impl \
audio.bluetooth.default \
audio.primary.msm8996:32 \
audio.primary.msm8996 \
audio.r_submix.default \
audio.usb.default \
libaacwrapper \
@ -114,9 +114,11 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/audio/configs/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
$(LOCAL_PATH)/audio/configs/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
$(LOCAL_PATH)/audio/configs/audio_platform_info_diff.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_diff.xml \
$(LOCAL_PATH)/audio/configs/audio_platform_info_i2s.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_i2s.xml \
$(LOCAL_PATH)/audio/configs/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
$(LOCAL_PATH)/audio/configs/listen_platform_info.xml:system/etc/listen_platform_info.xml \
$(LOCAL_PATH)/audio/configs/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml
$(LOCAL_PATH)/audio/configs/mixer_paths_tasha.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tasha.xml \
$(LOCAL_PATH)/audio/configs/mixer_paths_i2s.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_i2s.xml
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \