sm8750-common: audio: Import select OEM edits

Skipped all changes related to BINAURAL_RECORD, SPATIALIZER and
VIRTUAL_AUDIO features as those are all unsupported in AOSP.

Change-Id: I44e1e4c34e5ab2ec6e07d7d77a18cf918a526c2d
This commit is contained in:
Bruno Martins
2025-06-19 14:44:26 +01:00
parent 430c83b5f6
commit 35b578ffc4
2 changed files with 71 additions and 11 deletions

View File

@@ -10,19 +10,29 @@ SPDX-License-Identifier: BSD-3-Clause-Clear
output flags-->
<!-- start of source mixports-->
<mixPort name="low_latency_out" role="source" flags="FAST PRIMARY" maxOpenCount="2" maxActiveCount="2">
<!-- #ifndef OPLUS_FEATURE_PLAYBACK_24BIT
// Jianfeng.Qiu@MULTIMEDIA.AUDIODRIVER.HAL, 2024/05/15, Modify for support playback with 24bits
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
#else /* OPLUS_FEATURE_PLAYBACK_24BIT */-->
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_24_BIT" />
<!-- #endif OPLUS_FEATURE_PLAYBACK_24BIT -->
</mixPort>
<mixPort name="raw_out" role="source" flags="FAST RAW">
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_24_BIT" />
</mixPort>
<mixPort name="haptics_out" role="source" flags="FAST">
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO_HAPTIC_A" formatType="PCM" pcmType="INT_16_BIT" />
</mixPort>
<mixPort name="deep_buffer_out" role="source" flags="DEEP_BUFFER">
<!-- #ifndef OPLUS_FEATURE_PLAYBACK_24BIT
// Jianfeng.Qiu@MULTIMEDIA.AUDIODRIVER.HAL, 2024/05/15, Modify for support playback with 24bits
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="FIXED_Q_8_24" />
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_24_BIT" />
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_32_BIT" />
#else /* OPLUS_FEATURE_PLAYBACK_24BIT */ -->
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_24_BIT" />
<!-- #endif OPLUS_FEATURE_PLAYBACK_24BIT -->
</mixPort>
<mixPort name="mmap_no_irq_out" role="source" flags="DIRECT MMAP_NOIRQ">
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
@@ -36,11 +46,19 @@ SPDX-License-Identifier: BSD-3-Clause-Clear
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
</mixPort>
<mixPort name="direct_pcm_out" role="source" flags="DIRECT" recommendedMuteDurationMs="160">
<!-- #ifndef OPLUS_ARCH_EXTENDS -->
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO" formatType="PCM" pcmType="FIXED_Q_8_24" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO" formatType="PCM" pcmType="INT_24_BIT" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO" formatType="PCM" pcmType="INT_32_BIT" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO" formatType="PCM" pcmType="FLOAT_32_BIT" />
<!-- #else /* OPLUS_ARCH_EXTENDS */
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_2POINT1 LAYOUT_QUAD LAYOUT_PENTA LAYOUT_5POINT1 LAYOUT_6POINT1 LAYOUT_7POINT1" formatType="PCM" pcmType="INT_16_BIT" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000 352800 384000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_2POINT1 LAYOUT_QUAD LAYOUT_PENTA LAYOUT_5POINT1 LAYOUT_6POINT1 LAYOUT_7POINT1" formatType="PCM" pcmType="FIXED_Q_8_24" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000 352800 384000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_2POINT1 LAYOUT_QUAD LAYOUT_PENTA LAYOUT_5POINT1 LAYOUT_6POINT1 LAYOUT_7POINT1" formatType="PCM" pcmType="INT_24_BIT" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000 352800 384000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_2POINT1 LAYOUT_QUAD LAYOUT_PENTA LAYOUT_5POINT1 LAYOUT_6POINT1 LAYOUT_7POINT1" formatType="PCM" pcmType="INT_32_BIT" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000 352800 384000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_2POINT1 LAYOUT_QUAD LAYOUT_PENTA LAYOUT_5POINT1 LAYOUT_6POINT1 LAYOUT_7POINT1" formatType="PCM" pcmType="FLOAT_32_BIT" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_2POINT1 LAYOUT_QUAD LAYOUT_PENTA LAYOUT_5POINT1 LAYOUT_6POINT1 LAYOUT_7POINT1" formatType="PCM" pcmType="FIXED_Q_8_24" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_2POINT1 LAYOUT_QUAD LAYOUT_PENTA LAYOUT_5POINT1 LAYOUT_6POINT1 LAYOUT_7POINT1" formatType="PCM" pcmType="INT_24_BIT" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_2POINT1 LAYOUT_QUAD LAYOUT_PENTA LAYOUT_5POINT1 LAYOUT_6POINT1 LAYOUT_7POINT1" formatType="PCM" pcmType="INT_32_BIT" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_2POINT1 LAYOUT_QUAD LAYOUT_PENTA LAYOUT_5POINT1 LAYOUT_6POINT1 LAYOUT_7POINT1" formatType="PCM" pcmType="FLOAT_32_BIT" />
-->
</mixPort>
<mixPort name="compress_offload_out" role="source" flags="DIRECT COMPRESS_OFFLOAD NON_BLOCKING GAPLESS_OFFLOAD">
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" channelLayouts="LAYOUT_STEREO LAYOUT_MONO" formatType="NON_PCM" encoding="audio/mpeg" />
@@ -75,11 +93,14 @@ SPDX-License-Identifier: BSD-3-Clause-Clear
<mixPort name="primary_in" role="sink" maxOpenCount="2" maxActiveCount="2">
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_FRONT_BACK" formatType="PCM" pcmType="INT_16_BIT" />
</mixPort>
<!-- #ifndef OPLUS_BUG_STABILITY
// Jianfeng.Qiu@MULTIMEDIA.AUDIODRIVER.HAL, 2024/05/15, Remove compress-input avoid camera record stop fail
<mixPort name="compress_in" role="sink" flags="DIRECT">
<profile name="compress-capture-AAC-LC" samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" channelLayouts="LAYOUT_STEREO LAYOUT_MONO LAYOUT_FRONT_BACK" formatType="NON_PCM" encoding="audio/mp4a.40.02" />
<profile name="compress-capture-AAC-HE-V1" samplingRates="24000 32000 44100 48000" channelLayouts="LAYOUT_STEREO LAYOUT_MONO LAYOUT_FRONT_BACK" formatType="NON_PCM" encoding="audio/aac-adts.05" />
<profile name="compress-capture-AAC-HE-V2" samplingRates="24000 32000 44100 48000" channelLayouts="LAYOUT_STEREO" formatType="NON_PCM" encoding="audio/aac-adts.29" />
</mixPort>
#endif OPLUS_BUG_STABILITY -->
<mixPort name="fast_input" role="sink" flags="FAST">
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_2POINT1 LAYOUT_2POINT0POINT2 LAYOUT_3POINT0POINT2 LAYOUT_5POINT1" channelMasks="INDEX_MASK_3" formatType="PCM" pcmType="INT_16_BIT" />
</mixPort>
@@ -93,9 +114,26 @@ SPDX-License-Identifier: BSD-3-Clause-Clear
<mixPort name="usb_surround_sound_input" role="sink">
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_FRONT_BACK LAYOUT_5POINT1" channelMasks="INDEX_MASK_3 INDEX_MASK_4 INDEX_MASK_6 INDEX_MASK_8" formatType="PCM" pcmType="INT_16_BIT" />
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000" channelLayouts="LAYOUT_5POINT1" channelMasks="INDEX_MASK_6 INDEX_MASK_8" formatType="PCM" pcmType="INT_32_BIT" />
<!-- #ifndef OPLUS_BUG_STABILITY
// Jianfeng.Qiu@MULTIMEDIA.AUDIODRIVER.HAL, 2024/05/15, case:2588000, CR-3089619-gerrit-3904059-ps-3.patch fix USB Audio Peripheral Record Test issue
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000" channelLayouts="LAYOUT_5POINT1" channelMasks="INDEX_MASK_6 INDEX_MASK_8" formatType="PCM" pcmType="FLOAT_32_BIT" />
#else /* OPLUS_BUG_STABILITY */ -->
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000" channelLayouts="LAYOUT_STEREO LAYOUT_5POINT1" channelMasks="INDEX_MASK_2 INDEX_MASK_6 INDEX_MASK_8" formatType="PCM" pcmType="FLOAT_32_BIT" />
<!-- #endif OPLUS_BUG_STABILITY -->
</mixPort>
<!-- #ifdef OPLUS_FEATURE_AEC_RECORD -->
<!-- Jianfeng.Qiu@MULTIMEDIA.AUDIODRIVER.HAL, 2024/05/15, Add for 4ch aec -->
<mixPort name="record_4ch_aec" role="sink">
<profile samplingRates="16000" channelLayouts="LAYOUT_2POINT0POINT2" formatType="PCM" pcmType="INT_16_BIT" />
</mixPort>
<!-- #endif OPLUS_FEATURE_AEC_RECORD -->
<!-- #ifdef OPLUS_FEATURE_OCAR_AUDIO -->
<!-- Jianfeng.Qiu@MULTIMEDIA.AUDIODRIVER.HAL, 2024/05/15, Modify for support call record in ocar mode -->
<!--
<mixPort name="voice_rx" role="sink">
-->
<mixPort name="voice_rx" role="sink" maxOpenCount="2" maxActiveCount="2">
<!-- #endif OPLUS_FEATURE_OCAR_AUDIO -->
<profile samplingRates="8000 16000 48000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
</mixPort>
<mixPort name="mmap_no_irq_in" role="sink" maxOpenCount="1" maxActiveCount="1" flags="MMAP_NOIRQ">
@@ -149,9 +187,12 @@ SPDX-License-Identifier: BSD-3-Clause-Clear
<devicePort tagName="ip_out" deviceType="OUT_DEVICE" connection="ip-v4" role="sink">
<profile samplingRates="8000 11025 16000 22050 32000 44100 48000 64000 88200 96000 128000 176400 192000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
</devicePort>
<devicePort tagName="fm_out" deviceType="OUT_FM" role="sink" attached="true">
<!-- #ifdef OPLUS_BUG_STABILITY -->
<!-- chenwenxiao@MULTIMEDIA.AUDIOSERVER.FRAMEWORK, 2024/08/08, Modify for link to window -->
<!-- devicePort tagName="fm_out" deviceType="OUT_FM" role="sink" attached="true">
<profile samplingRates="48000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
</devicePort>
</devicePort -->
<!-- #endif OPLUS_BUG_STABILITY -->
<devicePort tagName="bt_a2dp_out" deviceType="OUT_DEVICE" connection="bt-a2dp" role="sink" encodings="audio/x-sbc audio/mp4a.40 audio/aptx audio/vnd.qcom.aptx.hd audio/vnd.sony.ldac audio/x-celt audio/vnd.qcom.aptx.adaptive audio/vnd.qcom.aptx.twsp">
<profile samplingRates="48000" channelLayouts="LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
</devicePort>
@@ -190,9 +231,12 @@ SPDX-License-Identifier: BSD-3-Clause-Clear
<devicePort tagName="built_in_back_mic" deviceType="IN_MICROPHONE_BACK" role="source" attached="true" address="back">
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_FRONT_BACK" formatType="PCM" pcmType="INT_16_BIT" />
</devicePort>
<devicePort tagName="fm_tuner_mic" deviceType="IN_FM_TUNER" role="source" attached="true">
<!-- #ifdef OPLUS_BUG_STABILITY -->
<!-- chenwenxiao@MULTIMEDIA.AUDIOSERVER.FRAMEWORK, 2024/08/08, Modify for link to window -->
<!-- <devicePort tagName="fm_tuner_mic" deviceType="IN_FM_TUNER" role="source" attached="true">
<profile samplingRates="48000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO" formatType="PCM" pcmType="INT_16_BIT" />
</devicePort>
</devicePort> -->
<!-- #endif OPLUS_BUG_STABILITY -->
<devicePort tagName="wired_headset_mic" deviceType="IN_HEADSET" connection="analog" role="source">
<profile samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" channelLayouts="LAYOUT_MONO LAYOUT_STEREO LAYOUT_FRONT_BACK" formatType="PCM" pcmType="INT_16_BIT" />
</devicePort>
@@ -253,18 +297,31 @@ SPDX-License-Identifier: BSD-3-Clause-Clear
<route type="mix" sink="proxy_out" sources="low_latency_out,deep_buffer_out,direct_pcm_out,compress_offload_out,haptics_out" />
<route type="mix" sink="ip_out" sources="low_latency_out,deep_buffer_out,direct_pcm_out,compress_offload_out,haptics_out" />
<route type="mix" sink="fm_out" sources="low_latency_out" />
<!-- #ifdef OPLUS_BUG_STABILITY -->
<!-- chenwenxiao@MULTIMEDIA.AUDIOSERVER.FRAMEWORK, 2024/08/08, Modify for link to window -->
<!-- <route type="mix" sink="fm_out" sources="low_latency_out" /> -->
<!-- #endif OPLUS_BUG_STABILITY -->
<!-- input routes -->
<!-- chenwenxiao@MULTIMEDIA.AUDIOSERVER.FRAMEWORK, 2024/08/08, Modify for link to window -->
<route type="mix" sink="primary_in" sources="built_in_mic,built_in_back_mic,wired_headset_mic,bt_sco_headset_mic,telephony_rx,bt_a2dp_mic,echo_reference_mic,bt_le_mic,ip_input_device" />
<!--
<route type="mix" sink="primary_in" sources="built_in_mic,built_in_back_mic,wired_headset_mic,bt_sco_headset_mic,fm_tuner_mic,telephony_rx,bt_a2dp_mic,echo_reference_mic,bt_le_mic,proxy_input_device,ip_input_device" />
-->
<route type="mix" sink="fast_input" sources="built_in_mic,built_in_back_mic,bt_sco_headset_mic,usb_mic,usb_headset_mic,wired_headset_mic,proxy_input_device,ip_input_device" />
<route type="mix" sink="fast_raw_input" sources="built_in_mic,built_in_back_mic,bt_sco_headset_mic,usb_mic,usb_headset_mic,wired_headset_mic,proxy_input_device,ip_input_device" />
<!-- #ifndef OPLUS_BUG_STABILITY
// Jianfeng.Qiu@MULTIMEDIA.AUDIODRIVER.HAL, 2024/05/15, Remove compress-input avoid camera record stop fail
<route type="mix" sink="compress_in" sources="built_in_mic,built_in_back_mic,wired_headset_mic,bt_sco_headset_mic,usb_mic,usb_headset_mic,bt_a2dp_mic,echo_reference_mic,bt_le_mic,proxy_input_device,ip_input_device" />
#endif OPLUS_BUG_STABILITY -->
<route type="mix" sink="telephony_tx" sources="voice_tx,in_call_music,built_in_mic,built_in_back_mic,wired_headset_mic,bt_sco_headset_mic,bt_a2dp_mic,echo_reference_mic,bt_le_mic,usb_mic,usb_headset_mic" />
<route type="mix" sink="mmap_no_irq_in" sources="built_in_mic,built_in_back_mic,bt_sco_headset_mic,usb_mic,usb_headset_mic,wired_headset_mic" />
<route type="mix" sink="voip_record" sources="built_in_mic,built_in_back_mic,wired_headset_mic,bt_sco_headset_mic,usb_mic,usb_headset_mic,bt_a2dp_mic,echo_reference_mic,bt_le_mic,ip_input_device" />
<route type="mix" sink="hotword_input" sources="built_in_mic,built_in_back_mic,wired_headset_mic,bt_sco_headset_mic,usb_mic,usb_headset_mic,bt_a2dp_mic,echo_reference_mic,bt_le_mic,proxy_input_device" />
<route type="mix" sink="usb_surround_sound_input" sources="usb_mic,usb_headset_mic" />
<!--#ifdef OPLUS_FEATURE_AEC_RECORD-->
<!-- Jianfeng.Qiu@MULTIMEDIA.AUDIODRIVER.HAL, 2024/05/15, Add for 4ch aec -->
<route type="mix" sink="record_4ch_aec" sources="built_in_mic,built_in_back_mic" />
<!-- #endif OPLUS_FEATURE_AEC_RECORD -->
<route type="mix" sink="voice_rx" sources="telephony_rx" />
</routes>
</module>

View File

@@ -130,7 +130,10 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<xi:include href="/vendor/etc/r_submix_audio_policy_configuration.xml"/>
<!-- Bluetooth Audio HAL for hearing aid -->
<!-- #ifndef OPLUS_BUG_STABILITY dongchuancheng@MULTIMEDIA.AUDIOSERVER.FRAMEWORK, 2022/09/20, disable unused module
<xi:include href="/vendor/etc/bluetooth_qti_hearing_aid_audio_policy_configuration.xml"/>
#endif /* OPLUS_BUG_STABILITY */ -->
</modules>
<!-- End of Modules section -->