sm8550-common: audio: Import policy configuration changes from OPLUS

Change-Id: I6fb3700c8078737baf2a36035b258e4351a084db
Signed-off-by: chandu078 <chandudyavanapelli03@gmail.com>
This commit is contained in:
Chandu Dyavanapelli
2023-07-25 13:56:30 +05:30
committed by Bruno Martins
parent 6ba46935ab
commit 34d07d4125

View File

@@ -97,20 +97,29 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts>
<mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_FAST AUDIO_OUTPUT_FLAG_PRIMARY">
<!-- #ifndef OPLUS_FEATURE_PLAYBACK_24BIT YeWenliang@MULTIMEDIA.AUDIODRIVER.HAL 2021/01/12 add for support playback with 24bits
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
#else /* OPLUS_FEATURE_PLAYBACK_24BIT */-->
<profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
<!-- #endif OPLUS_FEATURE_PLAYBACK_24BIT -->
</mixPort>
<!-- #ifndef OPLUS_BUG_STABILITY
//YaJun.Li@MM.AudioServer.Policy, 2019/08/21,Remove for disable ULL output
<mixPort name="raw" role="source" recommendedMuteDurationMs="63"
flags="AUDIO_OUTPUT_FLAG_FAST AUDIO_OUTPUT_FLAG_RAW">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
#endif OPLUS_BUG_STABILITY -->
<mixPort name="haptics output" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A"/>
</mixPort>
<mixPort name="deep_buffer" role="source"
flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
<!-- #ifndef OPLUS_FEATURE_PLAYBACK_24BIT YeWenliang@MULTIMEDIA.AUDIODRIVER.HAL 2021/01/12 add for support playback with 24bits
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
<profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
@@ -119,6 +128,10 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
#else /* OPLUS_FEATURE_PLAYBACK_24BIT */ -->
<profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
<!-- #endif OPLUS_FEATURE_PLAYBACK_24BIT -->
</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"
@@ -211,16 +224,24 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</mixPort>
<mixPort name="primary input" role="sink" maxOpenCount="2" maxActiveCount="2">
<!-- #ifndef OPLUS_FEATURE_OPREC_SUPPORT Yongzhi.Zhang@MULTIMEDIA.AUDIODRIVER.FEATURE, 2021/11/15, Add for dual dynamic hdr record
<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"/>
#else /* OPLUS_FEATURE_OPREC_SUPPORT */ -->
<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"/>
<!-- #endif OPLUS_FEATURE_OPREC_SUPPORT -->
</mixPort>
<!-- #ifndef OPLUS_BUG_STABILITY Fred.li@MULTIMEDIA.AUDIOSERVER.FRAMEWORK, 2022/09/20,remove qcom compress-input avoid camera record stop fail
<mixPort name="compress-input" role="sink"
flags="AUDIO_INPUT_FLAG_DIRECT" >
<profile name="compress-capture-AAC-LC" format="AUDIO_FORMAT_AAC_LC"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/>
</mixPort>
#endif OPLUS_BUG_STABILITY -->
<mixPort name="fast input" role="sink"
flags="AUDIO_INPUT_FLAG_FAST">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -244,9 +265,16 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000"
channelMasks="AUDIO_CHANNEL_IN_5POINT1 AUDIO_CHANNEL_INDEX_MASK_6 AUDIO_CHANNEL_INDEX_MASK_8"/>
<!-- #ifndef OPLUS_BUG_STABILITY
//Ge.Ding@MULTIMEDIA.AUDIOSERVER.FRAMEWORK, 2021/12/03,case:2588000, CR-3089619-gerrit-3904059-ps-3.patch fix USB Audio Peripheral Record Test issue
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000"
channelMasks="AUDIO_CHANNEL_IN_5POINT1 AUDIO_CHANNEL_INDEX_MASK_6 AUDIO_CHANNEL_INDEX_MASK_8"/>
#else -->
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000"
channelMasks="AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_INDEX_MASK_2 AUDIO_CHANNEL_IN_5POINT1 AUDIO_CHANNEL_INDEX_MASK_6 AUDIO_CHANNEL_INDEX_MASK_8"/>
<!-- #endif OPLUS_BUG_STABILITY -->
</mixPort>
<mixPort name="record_24" role="sink" maxOpenCount="2" maxActiveCount="2">
<profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
@@ -422,41 +450,44 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<!-- route declaration, i.e. list all available sources for a given sink -->
<routes>
<route type="mix" sink="Earpiece"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="Speaker"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="Wired Headset"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="Wired Headphones"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="Line"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="HDMI"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
<route type="mix" sink="Proxy"
sources="primary output,deep_buffer,direct_pcm,compressed_offload,haptics output"/>
<route type="mix" sink="FM"
sources="primary output"/>
<route type="mix" sink="BT SCO"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
<route type="mix" sink="BT SCO Headset"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
<route type="mix" sink="BT BLE Out"
sources="primary output,raw,mmap_no_irq_out,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
sources="primary output,mmap_no_irq_out,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
<route type="mix" sink="BT SCO Car Kit"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
<route type="mix" sink="USB Device Out"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,hifi_playback,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,hifi_playback,haptics output"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,hifi_playback,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,hifi_playback,haptics output"/>
<route type="mix" sink="Telephony Tx"
sources="voice_tx,incall_music_uplink"/>
<route type="mix" sink="voice_rx"
sources="Telephony Rx"/>
<route type="mix" sink="primary input"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,FM Tuner,Telephony Rx,A2DP In,Echo Reference,BLE In"/>
<route type="mix" sink="compress-input"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,Wired Headset Mic,USB Device In,USB Headset In,BLE In"/>
<!-- #ifndef OPLUS_BUG_STABILITY
//Fred.li@MULTIMEDIA.AUDIOSERVER.FRAMEWORK, 2022/09/20,remove qcom compress-input avoid camera record stop fail-->
<!--route type="mix" sink="compress-input"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,Wired Headset Mic,USB Device In,USB Headset In,BLE In"/-->
<!-- #endif OPLUS_BUG_STABILITY -->
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="fast input"
@@ -470,13 +501,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<route type="mix" sink="mmap_no_irq_in"
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="BT A2DP Out"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="BT A2DP Headphones"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="BT A2DP Speaker"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="BT BLE Speaker"
sources="primary output,raw,mmap_no_irq_out,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
sources="primary output,mmap_no_irq_out,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
<route type="mix" sink="BT BLE Broadcast"
sources="primary output,deep_buffer,direct_pcm,compressed_offload"/>
<route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />