Merge "config: Disable pro audio path over split-a2dp"
diff --git a/Android.mk b/Android.mk
index e590854..b970f53 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,4 +1,4 @@
-ifneq ($(filter mpq8092 msm8960 msm8226 msm8x26 msm8610 msm8974 msm8x74 apq8084 msm8916 msm8994 msm8992 msm8909 msm8996 msm8952 msm8937 thorium msm8953 msmgold msm8998 sdm660 sdm845 sdm670 apq8098_latv,$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter mpq8092 msm8960 msm8226 msm8x26 msm8610 msm8974 msm8x74 apq8084 msm8916 msm8994 msm8992 msm8909 msm8996 msm8952 msm8937 thorium msm8953 msmgold msm8998 sdm660 sdm845 sdm670 apq8098_latv qcs605,$(TARGET_BOARD_PLATFORM)),)
MY_LOCAL_PATH := $(call my-dir)
@@ -14,6 +14,7 @@
include $(MY_LOCAL_PATH)/mm-audio/Android.mk
include $(MY_LOCAL_PATH)/visualizer/Android.mk
include $(MY_LOCAL_PATH)/post_proc/Android.mk
+include $(MY_LOCAL_PATH)/qahw/Android.mk
include $(MY_LOCAL_PATH)/qahw_api/Android.mk
endif
diff --git a/configs/apq8098_latv/apq8098_latv.mk b/configs/apq8098_latv/apq8098_latv.mk
index 7a74e58..493d5ce 100755
--- a/configs/apq8098_latv/apq8098_latv.mk
+++ b/configs/apq8098_latv/apq8098_latv.mk
@@ -30,7 +30,7 @@
AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
AUDIO_FEATURE_ENABLED_USB_TUNNEL_AUDIO := true
AUDIO_FEATURE_ENABLED_SPLIT_A2DP := true
-AUDIO_FEATURE_ENABLED_3D_AUDIO := true
+AUDIO_FEATURE_ENABLED_3D_AUDIO := false
AUDIO_FEATURE_ENABLED_VOICE_PRINT := false
USE_LEGACY_AUDIO_DAEMON := false
USE_LEGACY_AUDIO_MEASUREMENT := false
@@ -63,6 +63,9 @@
AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
BOARD_SUPPORTS_QAHW := true
AUDIO_FEATURE_ENABLED_QAF := true
+AUDIO_FEATURE_IP_HDLR_ENABLED := true
+MM_AUDIO_IP_HDLR_ENABLED := true
+AUDIO_FEATURE_ENABLED_MS12_SECURITY := true
AUDIO_FEATURE_ENABLED_RAS := true
AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := true
AUDIO_FEATURE_ENABLED_SND_MONITOR := true
@@ -144,7 +147,11 @@
#Buffer size in kbytes for compress offload playback
PRODUCT_PROPERTY_OVERRIDES += \
-vendor.audio.offload.buffer.size.kb=32
+vendor.audio.offload.buffer.size.kb=2
+
+#Minimum duration for offload playback in secc
+PRODUCT_PROPERTY_OVERRIDES += \
+audio.offload.min.duration.secs=0
#Enable offload audio video playback by default
PRODUCT_PROPERTY_OVERRIDES += \
@@ -166,7 +173,7 @@
PRODUCT_PROPERTY_OVERRIDES += \
audio.deep_buffer.media=true
-#QC property used when calculating client heap size in audio flinger
+#QTI property used when calculating client heap size in audio flinger
PRODUCT_PROPERTY_OVERRIDES += \
audio.heap.size.multiplier=7
@@ -203,6 +210,26 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.safx.pbe.enabled=true
+#enable QAF
+PRODUCT_PROPERTY_OVERRIDES += \
+vendor.audio.qaf.enabled=true
+
+#QAF Library
+PRODUCT_PROPERTY_OVERRIDES += \
+vendor.audio.qaf.library=/vendor/lib/libdolby_ms12_wrapper.so
+
+#Disable reencode
+PRODUCT_PROPERTY_OVERRIDES += \
+vendor.audio.qaf.reencode=true
+
+#HDMI passthrough out
+PRODUCT_PROPERTY_OVERRIDES += \
+vendor.audio.qaf.hdmi.out=ddp
+
+#AV streaming offload
+PRODUCT_PROPERTY_OVERRIDES += \
+av.streaming.offload.enable=true
+
#parser input buffer size(256kb) in byte stream mode
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.parser.ip.buffer.size=262144
diff --git a/configs/apq8098_latv/audio_policy_configuration.xml b/configs/apq8098_latv/audio_policy_configuration.xml
index 484f96a..a66d99f 100755
--- a/configs/apq8098_latv/audio_policy_configuration.xml
+++ b/configs/apq8098_latv/audio_policy_configuration.xml
@@ -49,15 +49,11 @@
<!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0">
<attachedDevices>
- <item>Earpiece</item>
- <item>Speaker</item>
<item>Telephony Tx</item>
<item>Built-In Mic</item>
<item>Built-In Back Mic</item>
- <item>FM Tuner</item>
- <item>Telephony Rx</item>
</attachedDevices>
- <defaultOutputDevice>Speaker</defaultOutputDevice>
+ <defaultOutputDevice>HDMI</defaultOutputDevice>
<mixPorts>
<mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_PRIMARY">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -72,48 +68,16 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
- <mixPort name="deep_buffer" role="source"
- flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </mixPort>
<mixPort name="compress_passthrough" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
<profile name="" format="dynamic"
samplingRates="dynamic" channelMasks="dynamic"/>
</mixPort>
- <mixPort name="direct_pcm" role="source"
- flags="AUDIO_OUTPUT_FLAG_DIRECT">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800,384000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- <profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800,384000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- <profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800,384000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- </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_MP2"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1"/>
- <profile name="" format="AUDIO_FORMAT_FLAC"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
- channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
- <profile name="" format="AUDIO_FORMAT_ALAC"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- <profile name="" format="AUDIO_FORMAT_APE"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
- 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"/>
@@ -132,21 +96,6 @@
<profile name="" format="AUDIO_FORMAT_E_AC3_JOC"
samplingRates="32000,44100,48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- <profile name="" format="AUDIO_FORMAT_DTS"
- samplingRates="32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1"/>
- <profile name="" format="AUDIO_FORMAT_DTS_HD"
- samplingRates="32000,44100,48000,64000,88200,96000,128000,176400,192000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- <profile name="" format="AUDIO_FORMAT_WMA"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- <profile name="" format="AUDIO_FORMAT_WMA_PRO"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
- channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
- <profile name="" format="AUDIO_FORMAT_VORBIS"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
- channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_ADTS_LC"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
@@ -157,12 +106,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"/>
@@ -194,10 +137,6 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,96000,192000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3,AUDIO_CHANNEL_INDEX_MASK_4"/>
</mixPort>
- <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"
@@ -207,42 +146,6 @@
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
- <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
- </devicePort>
- <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address="">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- </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="Line" type="AUDIO_DEVICE_OUT_LINE" 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">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
- </devicePort>
- <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
- </devicePort>
- <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
- </devicePort>
- <devicePort tagName="BT SCO All" type="AUDIO_DEVICE_OUT_ALL_SCO" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
- </devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
@@ -251,14 +154,6 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
</devicePort>
- <devicePort tagName="Proxy" type="AUDIO_DEVICE_OUT_PROXY" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
- </devicePort>
- <devicePort tagName="FM" type="AUDIO_DEVICE_OUT_FM" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
- </devicePort>
<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
@@ -271,11 +166,6 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
- <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
- </devicePort>
-
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
@@ -286,119 +176,38 @@
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="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
- </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">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</devicePort>
- <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
- </devicePort>
- <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
- <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
- samplingRates="44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
- </devicePort>
</devicePorts>
<!-- 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"/>
- <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"/>
- <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"/>
- <route type="mix" sink="Line"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="HDMI"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,compress_passthrough"/>
- <route type="mix" sink="Proxy"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
- <route type="mix" sink="FM"
- sources="primary output"/>
- <route type="mix" sink="BT SCO All"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
- <route type="mix" sink="USB Device Out"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
+ sources="primary output,raw,compressed_offload,compress_passthrough"/>
<route type="mix" sink="Telephony Tx"
sources="voice_tx"/>
- <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,Telephony Rx"/>
+ sources="BT SCO Headset Mic"/>
<route type="mix" sink="surround_sound"
sources="Built-In Mic,Built-In Back Mic"/>
<route type="mix" sink="record_24"
- sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/>
+ sources="Built-In Mic,Built-In Back Mic"/>
<route type="mix" sink="mmap_no_irq_in"
- sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,USB Device In"/>
+ sources="Built-In Mic,Built-In Back Mic"/>
<route type="mix" sink="BT A2DP Out"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
+ sources="primary output,raw,compressed_offload"/>
<route type="mix" sink="BT A2DP Headphones"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
+ sources="primary output,raw,compressed_offload"/>
<route type="mix" sink="BT A2DP Speaker"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
+ sources="primary output,raw,compressed_offload"/>
</routes>
</module>
<!-- A2DP 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="/vendor/etc/r_submix_audio_policy_configuration.xml"/>
</modules>
<!-- End of Modules section -->
diff --git a/configs/msm8953/sound_trigger_mixer_paths.xml b/configs/msm8953/sound_trigger_mixer_paths.xml
index f6abb6b..e7f3740 100644
--- a/configs/msm8953/sound_trigger_mixer_paths.xml
+++ b/configs/msm8953/sound_trigger_mixer_paths.xml
@@ -94,6 +94,54 @@
<ctl name="LSM8 Mixer TERT_MI2S_TX" value="1" />
</path>
+ <path name="listen-voice-wakeup-1 preproc">
+ <ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM1 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM1 Mixer TERT_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-2 preproc">
+ <ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM2 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM2 Mixer TERT_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-3 preproc">
+ <ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM3 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM3 Mixer TERT_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-4 preproc">
+ <ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM4 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM4 Mixer TERT_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-5 preproc">
+ <ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM5 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM5 Mixer TERT_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-6 preproc">
+ <ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM6 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM6 Mixer TERT_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-7 preproc">
+ <ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM7 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM7 Mixer TERT_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-8 preproc">
+ <ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM8 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM8 Mixer TERT_MI2S_TX" value="1" />
+ </path>
+
<path name="listen-ape-handset-mic">
<!-- this is to avoid codec mute when device is not enabled first -->
<ctl name="LOOPBACK Mode" value="ENABLE" />
@@ -102,4 +150,18 @@
<ctl name="ADC2 MUX" value="INP3" />
</path>
+ <path name="listen-ape-handset-mic-preproc">
+ <ctl name="DEC1 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP3" />
+ </path>
+
+ <path name="listen-ape-handset-dmic">
+ <ctl name="ADC1 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC3 Volume" value="6" />
+ <ctl name="DEC2 MUX" value="ADC2" />
+ <ctl name="MI2S_TX Channels" value="Two" />
+ <ctl name="ADC2 MUX" value="INP3" />
+ </path>
+
</mixer>
diff --git a/configs/msm8953/sound_trigger_mixer_paths_wcd9335.xml b/configs/msm8953/sound_trigger_mixer_paths_wcd9335.xml
index af630d0..c1b6097 100644
--- a/configs/msm8953/sound_trigger_mixer_paths_wcd9335.xml
+++ b/configs/msm8953/sound_trigger_mixer_paths_wcd9335.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--- Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+<!--- 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
@@ -57,6 +57,19 @@
<ctl name="EC BUF MUX INP" value="ZERO" />
<ctl name="ADC MUX1" value="DMIC" />
<ctl name="DMIC MUX1" value="ZERO" />
+ <ctl name="ADC MUX5" value="AMIC" />
+ <ctl name="ADC MUX6" value="AMIC" />
+ <ctl name="ADC MUX7" value="AMIC" />
+ <ctl name="ADC MUX8" value="AMIC" />
+ <ctl name="DMIC MUX5" value="ZERO" />
+ <ctl name="DMIC MUX6" value="ZERO" />
+ <ctl name="DMIC MUX7" value="ZERO" />
+ <ctl name="DMIC MUX8" value="ZERO" />
+ <ctl name="IIR0 INP0 MUX" value="ZERO" />
+ <ctl name="AIF1_CAP Mixer SLIM TX5" value="0" />
+ <ctl name="AIF1_CAP Mixer SLIM TX6" value="0" />
+ <ctl name="AIF1_CAP Mixer SLIM TX7" value="0" />
+ <ctl name="AIF1_CAP Mixer SLIM TX8" value="0" />
<path name="listen-voice-wakeup-1">
<ctl name="SLIMBUS_5_TX LSM Function" value="AUDIO" />
@@ -100,6 +113,54 @@
<ctl name="LSM8 Mixer SLIMBUS_5_TX" value="1" />
</path>
+ <path name="listen-voice-wakeup-1 preproc">
+ <ctl name="SLIMBUS_0_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM1 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM1 Mixer SLIMBUS_0_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-2 preproc">
+ <ctl name="SLIMBUS_0_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM2 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM2 Mixer SLIMBUS_0_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-3 preproc">
+ <ctl name="SLIMBUS_0_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM3 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM3 Mixer SLIMBUS_0_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-4 preproc">
+ <ctl name="SLIMBUS_0_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM4 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM4 Mixer SLIMBUS_0_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-5 preproc">
+ <ctl name="SLIMBUS_0_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM5 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM5 Mixer SLIMBUS_0_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-6 preproc">
+ <ctl name="SLIMBUS_0_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM6 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM6 Mixer SLIMBUS_0_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-7 preproc">
+ <ctl name="SLIMBUS_0_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM7 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM7 Mixer SLIMBUS_0_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-8 preproc">
+ <ctl name="SLIMBUS_0_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM8 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM8 Mixer SLIMBUS_0_TX" value="1" />
+ </path>
+
<path name="listen-cpe-handset-mic">
<ctl name="MADONOFF Switch" value="1" />
<ctl name="TX13 INP MUX" value="CPE_TX_PP" />
@@ -130,4 +191,67 @@
<ctl name="MAD Input" value="DMIC0" />
</path>
+ <path name="listen-ape-handset-mic-preproc">
+ <ctl name="AIF1_CAP Mixer SLIM TX7" value="1"/>
+ <ctl name="SLIM_0_TX Channels" value="One" />
+ <ctl name="SLIM TX7 MUX" value="DEC7" />
+ <ctl name="ADC MUX7" value="DMIC" />
+ <ctl name="DMIC MUX7" value="DMIC0" />
+ <ctl name="IIR0 INP0 MUX" value="DEC7" />
+ </path>
+
+ <path name="listen-ape-handset-dmic">
+ <ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
+ <ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
+ <ctl name="SLIM TX7 MUX" value="DEC7" />
+ <ctl name="ADC MUX7" value="DMIC" />
+ <ctl name="DMIC MUX7" value="DMIC0" />
+ <ctl name="SLIM TX8 MUX" value="DEC8" />
+ <ctl name="ADC MUX8" value="DMIC" />
+ <ctl name="DMIC MUX8" value="DMIC3" />
+ <ctl name="SLIM_0_TX Channels" value="Two" />
+ </path>
+
+ <path name="listen-ape-handset-qmic">
+ <ctl name="AIF1_CAP Mixer SLIM TX5" value="1" />
+ <ctl name="AIF1_CAP Mixer SLIM TX6" value="1" />
+ <ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
+ <ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
+ <ctl name="SLIM_0_TX Channels" value="Four" />
+ <ctl name="SLIM TX5 MUX" value="DEC5" />
+ <ctl name="ADC MUX5" value="DMIC" />
+ <ctl name="DMIC MUX5" value="DMIC0" />
+ <ctl name="SLIM TX6 MUX" value="DEC6" />
+ <ctl name="ADC MUX6" value="DMIC" />
+ <ctl name="DMIC MUX6" value="DMIC2" />
+ <ctl name="SLIM TX7 MUX" value="DEC7" />
+ <ctl name="ADC MUX7" value="DMIC" />
+ <ctl name="DMIC MUX7" value="DMIC1" />
+ <ctl name="SLIM TX8 MUX" value="DEC8" />
+ <ctl name="ADC MUX8" value="DMIC" />
+ <ctl name="DMIC MUX8" value="DMIC3" />
+ </path>
+
+ <path name="listen-ape-handset-tmic">
+ <ctl name="AIF1_CAP Mixer SLIM TX5" value="1"/>
+ <ctl name="AIF1_CAP Mixer SLIM TX6" value="1" />
+ <ctl name="AIF1_CAP Mixer SLIM TX7" value="1"/>
+ <ctl name="SLIM_0_TX Channels" value="Three" />
+ <ctl name="SLIM TX5 MUX" value="DEC5" />
+ <ctl name="ADC MUX5" value="DMIC" />
+ <ctl name="DMIC MUX5" value="DMIC0" />
+ <ctl name="SLIM TX6 MUX" value="DEC6" />
+ <ctl name="ADC MUX6" value="DMIC" />
+ <ctl name="DMIC MUX6" value="DMIC2" />
+ <ctl name="SLIM TX7 MUX" value="DEC7" />
+ <ctl name="ADC MUX7" value="DMIC" />
+ <ctl name="DMIC MUX7" value="DMIC4" />
+ </path>
+
+ <path name="echo-reference">
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="SLIM_RX" />
+ <ctl name="EC Reference Channels" value="Two"/>
+ <ctl name="EC Reference Bit Format" value="S16_LE"/>
+ <ctl name="EC Reference SampleRate" value="48000"/>
+ </path>
</mixer>
diff --git a/configs/msm8953/sound_trigger_platform_info.xml b/configs/msm8953/sound_trigger_platform_info.xml
index 28026f7..a1f70a0 100644
--- a/configs/msm8953/sound_trigger_platform_info.xml
+++ b/configs/msm8953/sound_trigger_platform_info.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--- Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. -->
+<!--- Copyright (c) 2013-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 -->
@@ -35,12 +35,25 @@
<param enable_failure_detection="false" />
<param rx_concurrency_disabled="true" />
<param rx_conc_max_st_ses="1" />
+ <!-- Below backend params must match with port used in mixer path file -->
+ <!-- param used to configure backend sample rate, format and channels -->
+ <!--Enable below backend params for internal codec-->
+ <!--param backend_port_name="MI2S_TX" />
+ <param backend_dai_name="TERT_MI2S_TX" /-->
+ <param backend_port_name="SLIM_0_TX" />
+ <param backend_dai_name="SLIMBUS_0_TX" />
</common_config>
<acdb_ids>
- <param DEVICE_HANDSET_APE_ACDB_ID="130" />
- <param DEVICE_HANDSET_CPE_ACDB_ID="128" />
- <param DEVICE_HANDSET_CPE_ECPP_ACDB_ID="128" />
+ <!--For internal codec please enable below device-->
+ <!--param DEVICE_HANDSET_MIC_APE="130" /-->
+ <param DEVICE_HANDSET_MIC_APE="100" />
+ <param DEVICE_HANDSET_MIC_CPE="128" />
+ <param DEVICE_HANDSET_MIC_ECPP_CPE="128" />
+ <param DEVICE_HANDSET_MIC_PP_APE="151" />
+ <param DEVICE_HANDSET_QMIC_APE="150" />
+ <param DEVICE_HANDSET_DMIC_APE="149" />
+ <param DEVICE_HANDSET_TMIC_APE="152" />
</acdb_ids>
<!-- Multiple sound_model_config tags can be listed, each with unique -->
@@ -55,6 +68,14 @@
<param max_ape_phrases="10" />
<param max_ape_users="10" />
<param sample_rate="16000" />
+ <param bit_width="16" />
+ <param channel_count="1"/>
+ <!-- adm_cfg_profile should match with the one defined under adm_config -->
+ <!-- Set it to NONE if LSM directly connects to AFE -->
+ <param adm_cfg_profile="NONE" />
+ <!-- fluence_type: "FLUENCE", "FLUENCE_DMIC", "FLUENCE_TMIC", -->
+ <!-- "FLUENCE_QMIC". param value is valid when adm_cfg_profile="FLUENCE"-->
+ <param fluence_type="NONE" />
<!-- Module and param ids with which the algorithm is integrated in firmware -->
<param load_sound_model_ids="0x00012C0D, 0x00012C14" />
@@ -69,5 +90,21 @@
<param client_capture_read_delay="2000" />
</sound_model_config>
+ <!-- Multiple adm_config tags can be listed, each with unique profile name. -->
+ <!-- app_type to match corresponding value from ACDB -->
+ <adm_config>
+ <param adm_cfg_profile="DEFAULT" />
+ <param app_type="69938" />
+ <param sample_rate="16000" />
+ <param bit_width="16" />
+ </adm_config>
+
+ <adm_config>
+ <param adm_cfg_profile="FLUENCE" />
+ <param app_type="69944" />
+ <param sample_rate="16000" />
+ <param bit_width="16" />
+ </adm_config>
+
</sound_trigger_platform_info>
diff --git a/configs/msm8998/mixer_paths_skuk.xml b/configs/msm8998/mixer_paths_skuk.xml
index f2e9c9a..6eb0e6f 100644
--- a/configs/msm8998/mixer_paths_skuk.xml
+++ b/configs/msm8998/mixer_paths_skuk.xml
@@ -2479,8 +2479,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/msm8998/mixer_paths_tasha.xml b/configs/msm8998/mixer_paths_tasha.xml
index 4ea726b..64d6383 100644
--- a/configs/msm8998/mixer_paths_tasha.xml
+++ b/configs/msm8998/mixer_paths_tasha.xml
@@ -2820,8 +2820,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/msm8998/mixer_paths_tavil.xml b/configs/msm8998/mixer_paths_tavil.xml
index fc5a440..282e7e6 100644
--- a/configs/msm8998/mixer_paths_tavil.xml
+++ b/configs/msm8998/mixer_paths_tavil.xml
@@ -2607,8 +2607,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm660/mixer_paths.xml b/configs/sdm660/mixer_paths.xml
index 8cca459..d1b662d 100644
--- a/configs/sdm660/mixer_paths.xml
+++ b/configs/sdm660/mixer_paths.xml
@@ -160,6 +160,7 @@
<ctl name="I2S TX2 INP1" value="ZERO" />
<ctl name="I2S TX2 INP2" value="ZERO" />
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="ADC1_INP1 Switch" value="0" />
<ctl name="HDMI Mixer MultiMedia4" value="0" />
<ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="ZERO" />
<ctl name="INT4_MI2S_RX_VI_FB_STEREO_CH_MUX" value="ZERO" />
@@ -1585,6 +1586,7 @@
<path name="adc1">
<ctl name="ADC1 Volume" value="6" />
<ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
</path>
<path name="adc2">
@@ -2142,8 +2144,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm660/mixer_paths_mtp.xml b/configs/sdm660/mixer_paths_mtp.xml
index 4f61224..fba8372 100644
--- a/configs/sdm660/mixer_paths_mtp.xml
+++ b/configs/sdm660/mixer_paths_mtp.xml
@@ -159,6 +159,7 @@
<ctl name="I2S TX2 INP1" value="ZERO" />
<ctl name="I2S TX2 INP2" value="ZERO" />
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="ADC1_INP1 Switch" value="0" />
<ctl name="HDMI Mixer MultiMedia4" value="0" />
<ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="ZERO" />
<ctl name="INT4_MI2S_RX_VI_FB_STEREO_CH_MUX" value="ZERO" />
@@ -1704,6 +1705,7 @@
<path name="adc1">
<ctl name="ADC1 Volume" value="6" />
<ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
</path>
<path name="adc2">
@@ -2258,8 +2260,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm660/mixer_paths_skuk.xml b/configs/sdm660/mixer_paths_skuk.xml
index 15b3f13..faafb89 100644
--- a/configs/sdm660/mixer_paths_skuk.xml
+++ b/configs/sdm660/mixer_paths_skuk.xml
@@ -2369,8 +2369,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm660/mixer_paths_skus.xml b/configs/sdm660/mixer_paths_skus.xml
index bdd0d61..173e268 100644
--- a/configs/sdm660/mixer_paths_skus.xml
+++ b/configs/sdm660/mixer_paths_skus.xml
@@ -2734,8 +2734,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm660/mixer_paths_skush.xml b/configs/sdm660/mixer_paths_skush.xml
index aa81e7b..1858ecb 100644
--- a/configs/sdm660/mixer_paths_skush.xml
+++ b/configs/sdm660/mixer_paths_skush.xml
@@ -150,6 +150,7 @@
<ctl name="INT3_MI2S_TX Channels" value="One" />
<ctl name="I2S TX2 INP1" value="ZERO" />
<ctl name="I2S TX2 INP2" value="ZERO" />
+ <ctl name="ADC1_INP1 Switch" value="0" />
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="0" />
<ctl name="HDMI Mixer MultiMedia4" value="0" />
<ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="ZERO" />
@@ -1762,6 +1763,7 @@
<path name="adc1">
<ctl name="ADC1 Volume" value="6" />
<ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
</path>
<path name="adc2">
@@ -2308,8 +2310,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm660/mixer_paths_wcd9326.xml b/configs/sdm660/mixer_paths_wcd9326.xml
index 9e6623d..b53bd51 100644
--- a/configs/sdm660/mixer_paths_wcd9326.xml
+++ b/configs/sdm660/mixer_paths_wcd9326.xml
@@ -2679,8 +2679,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm660/mixer_paths_wcd9335.xml b/configs/sdm660/mixer_paths_wcd9335.xml
index d4c098f..a05f3cb 100644
--- a/configs/sdm660/mixer_paths_wcd9335.xml
+++ b/configs/sdm660/mixer_paths_wcd9335.xml
@@ -2701,8 +2701,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm660/mixer_paths_wcd9340.xml b/configs/sdm660/mixer_paths_wcd9340.xml
index 6c6f2cf..8f68011 100644
--- a/configs/sdm660/mixer_paths_wcd9340.xml
+++ b/configs/sdm660/mixer_paths_wcd9340.xml
@@ -2448,8 +2448,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm670/audio_output_policy.conf b/configs/sdm670/audio_output_policy.conf
index 76039c7..52ef791 100644
--- a/configs/sdm670/audio_output_policy.conf
+++ b/configs/sdm670/audio_output_policy.conf
@@ -25,6 +25,13 @@
bit_width 16
app_type 69943
}
+voip_rx {
+ flags AUDIO_OUTPUT_FLAG_VOIP_RX|AUDIO_OUTPUT_FLAG_DIRECT
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 8000|16000|32000|48000
+ bit_width 16
+ app_type 69946
+ }
deep_buffer {
flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
formats AUDIO_FORMAT_PCM_16_BIT
diff --git a/configs/sdm670/audio_platform_info.xml b/configs/sdm670/audio_platform_info.xml
index 71a8bf6..0597623 100644
--- a/configs/sdm670/audio_platform_info.xml
+++ b/configs/sdm670/audio_platform_info.xml
@@ -27,6 +27,7 @@
<audio_platform_info>
<acdb_ids>
<device name="SND_DEVICE_OUT_SPEAKER" acdb_id="15"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_REVERSE" acdb_id="15"/>
<device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" acdb_id="124"/>
<device name="SND_DEVICE_IN_VOICE_REC_QMIC_FLUENCE" acdb_id="131"/>
<device name="SND_DEVICE_IN_VOICE_REC_TMIC" acdb_id="131"/>
@@ -40,6 +41,11 @@
<device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_1" acdb_id="10"/>
<device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_2" acdb_id="10"/>
<device name="SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET" acdb_id="45"/>
+ <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_QUAD_MIC" acdb_id="146"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" acdb_id="147"/>
</acdb_ids>
<module_ids>
<aec>
@@ -72,7 +78,6 @@
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD6" type="out" id="30"/>
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD7" type="out" id="31"/>
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD8" type="out" id="32"/>
- <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD9" type="out" id="33"/>
<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="19"/>
@@ -88,8 +93,12 @@
<usecase name="USECASE_AUDIO_RECORD_LOW_LATENCY" type="in" id="17" />
<usecase name="USECASE_AUDIO_PLAYBACK_ULL" type="out" id="17" />
<usecase name="USECASE_AUDIO_PLAYBACK_EXT_DISP_SILENCE" type="out" id="27" />
+ <usecase name="USECASE_AUDIO_PLAYBACK_MMAP" type="out" id="33" />
+ <usecase name="USECASE_AUDIO_RECORD_MMAP" type="in" id="33" />
<usecase name="USECASE_AUDIO_HFP_SCO" type="in" id="35" />
<usecase name="USECASE_AUDIO_HFP_SCO_WB" type="in" id="35" />
+ <usecase name="USECASE_AUDIO_PLAYBACK_VOIP" type="out" id="16" />
+ <usecase name="USECASE_AUDIO_RECORD_VOIP" type="in" id="16" />
</pcm_ids>
<config_params>
<param key="spkr_1_tz_name" value="wsatz.13"/>
@@ -132,6 +141,8 @@
<device name="SND_DEVICE_OUT_VOICE_LINE" backend="headphones" interface="SLIMBUS_6_RX"/>
<device name="SND_DEVICE_OUT_VOICE_TTY_FULL_HEADPHONES" backend="headphones" interface="SLIMBUS_6_RX"/>
<device name="SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES" backend="headphones" interface="SLIMBUS_6_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO" backend="speaker-and-bt-sco" interface="SLIMBUS_0_RX-and-SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO_WB" backend="speaker-and-bt-sco-wb" interface="SLIMBUS_0_RX-and-SLIMBUS_7_RX"/>
</backend_names>
</audio_platform_info>
diff --git a/configs/sdm670/audio_platform_info_intcodec.xml b/configs/sdm670/audio_platform_info_intcodec.xml
index d04ced2..94f3853 100644
--- a/configs/sdm670/audio_platform_info_intcodec.xml
+++ b/configs/sdm670/audio_platform_info_intcodec.xml
@@ -42,7 +42,6 @@
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD6" type="out" id="30"/>
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD7" type="out" id="31"/>
<usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD8" type="out" id="32"/>
- <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD9" type="out" id="33"/>
<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="19"/>
@@ -58,8 +57,12 @@
<usecase name="USECASE_AUDIO_RECORD_LOW_LATENCY" type="in" id="17" />
<usecase name="USECASE_AUDIO_PLAYBACK_ULL" type="out" id="17" />
<usecase name="USECASE_AUDIO_PLAYBACK_EXT_DISP_SILENCE" type="out" id="27" />
+ <usecase name="USECASE_AUDIO_PLAYBACK_MMAP" type="out" id="33" />
+ <usecase name="USECASE_AUDIO_RECORD_MMAP" type="in" id="33" />
<usecase name="USECASE_AUDIO_HFP_SCO" type="in" id="12" />
<usecase name="USECASE_AUDIO_HFP_SCO_WB" type="in" id="12" />
+ <usecase name="USECASE_AUDIO_PLAYBACK_VOIP" type="out" id="16" />
+ <usecase name="USECASE_AUDIO_RECORD_VOIP" type="in" id="16" />
</pcm_ids>
<config_params>
<!-- In the below value string, the value indicates default mono -->
@@ -74,6 +77,7 @@
</config_params>
<acdb_ids>
<device name="SND_DEVICE_OUT_SPEAKER" acdb_id="15"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_REVERSE" acdb_id="15"/>
<device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" acdb_id="124"/>
<device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED" acdb_id="101"/>
<device name="SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT" acdb_id="124"/>
@@ -88,6 +92,11 @@
<device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_1" acdb_id="10"/>
<device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_2" acdb_id="10"/>
<device name="SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET" acdb_id="45"/>
+ <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_QUAD_MIC" acdb_id="146"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" acdb_id="147"/>
</acdb_ids>
<backend_names>
<device name="SND_DEVICE_OUT_HEADPHONES" backend="headphones" interface="INT0_MI2S_RX"/>
@@ -197,6 +206,8 @@
<device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" interface="INT3_MI2S_TX"/>
<device name="SND_DEVICE_OUT_VOICE_SPEAKER_AND_VOICE_HEADPHONES" backend="speaker-and-headphones" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
<device name="SND_DEVICE_OUT_VOICE_SPEAKER_AND_VOICE_ANC_HEADSET" backend="speaker-and-headphones" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO" backend="speaker-and-bt-sco" interface="INT4_MI2S_RX-and-SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO_WB" backend="speaker-and-bt-sco-wb" interface="INT4_MI2S_RX-and-SLIMBUS_7_RX"/>
</backend_names>
</audio_platform_info>
diff --git a/configs/sdm670/audio_platform_info_skuw.xml b/configs/sdm670/audio_platform_info_skuw.xml
new file mode 100644
index 0000000..1107d4a
--- /dev/null
+++ b/configs/sdm670/audio_platform_info_skuw.xml
@@ -0,0 +1,212 @@
+<?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, -->
+<!-- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
+<!-- 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>
+ <bit_width_configs>
+ <device name="SND_DEVICE_OUT_SPEAKER" bit_width="24"/>
+ </bit_width_configs>
+ <interface_names>
+ <device name="AUDIO_DEVICE_IN_BUILTIN_MIC" interface="INT3_MI2S" codec_type="internal"/>
+ <device name="AUDIO_DEVICE_IN_BACK_MIC" interface="INT3_MI2S" codec_type="internal"/>
+ </interface_names>
+ <pcm_ids>
+ <usecase name="USECASE_AUDIO_PLAYBACK_LOW_LATENCY" type="out" id="13"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD" type="out" id="8"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD2" type="out" id="15"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD3" type="out" id="16"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD4" type="out" id="28"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD5" type="out" id="29"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD6" type="out" id="30"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD7" type="out" id="31"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD8" type="out" id="32"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD9" type="out" id="33"/>
+ <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="19"/>
+ <usecase name="USECASE_VOICEMMODE2_CALL" type="out" id="19"/>
+ <usecase name="USECASE_VOWLAN_CALL" type="in" id="-1"/>
+ <usecase name="USECASE_VOWLAN_CALL" type="out" id="-1"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_FM" type="out" id="5"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_FM" type="in" id="34"/>
+ <usecase name="USECASE_AUDIO_SPKR_CALIB_RX" type="out" id="5"/>
+ <usecase name="USECASE_AUDIO_SPKR_CALIB_TX" type="in" id="40"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_AFE_PROXY" type="out" id="6"/>
+ <usecase name="USECASE_AUDIO_RECORD_AFE_PROXY" type="in" id="7"/>
+ <usecase name="USECASE_AUDIO_RECORD_LOW_LATENCY" type="in" id="17" />
+ <usecase name="USECASE_AUDIO_PLAYBACK_ULL" type="out" id="17" />
+ <usecase name="USECASE_AUDIO_PLAYBACK_EXT_DISP_SILENCE" type="out" id="27" />
+ <usecase name="USECASE_AUDIO_HFP_SCO" type="in" id="12" />
+ <usecase name="USECASE_AUDIO_HFP_SCO_WB" type="in" id="12" />
+ <usecase name="USECASE_AUDIO_PLAYBACK_VOIP" type="out" id="16" />
+ <usecase name="USECASE_AUDIO_RECORD_VOIP" type="in" id="16" />
+ </pcm_ids>
+ <config_params>
+ <!-- In the below value string, the value indicates default mono -->
+ <!-- speaker. It can be set to either left or right -->
+ <param key="spkr_1_tz_name" value="wsatz.13"/>
+ <param key="spkr_2_tz_name" value="wsatz.14"/>
+ <param key="true_32_bit" value="true"/>
+ <param key="native_audio_mode" value="true"/>
+ <param key="hfp_pcm_dev_id" value="39"/>
+ <param key="input_mic_max_count" value="2"/>
+ </config_params>
+ <acdb_ids>
+ <device name="SND_DEVICE_OUT_SPEAKER" acdb_id="14"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_REVERSE" acdb_id="15"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" acdb_id="136"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED" acdb_id="136"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT" acdb_id="136"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED_VBAT" acdb_id="136"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK" acdb_id="137"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_PROTECTED" acdb_id="150"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_PROTECTED_VBAT" acdb_id="150"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK_MONO_1" acdb_id="151"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK_MONO_2" acdb_id="152"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_EXTERNAL_1" acdb_id="14"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_EXTERNAL_2" acdb_id="14"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_1" acdb_id="10"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_2" acdb_id="10"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET" acdb_id="45"/>
+ <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_QUAD_MIC" acdb_id="146"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" acdb_id="147"/>
+ </acdb_ids>
+ <backend_names>
+ <device name="SND_DEVICE_OUT_HEADPHONES" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_BT_SCO_WB" backend="bt-sco-wb" interface="SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_BT_SCO" backend="bt-sco" interface="SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_BT_A2DP" backend="bt-a2dp" interface="SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_LINE" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_ANC_HEADSET" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES" backend="speaker-and-headphones" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_LINE" backend="speaker-and-headphones" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_ANC_HEADSET" backend="speaker-and-headphones" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_HEADPHONES" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_ANC_HEADSET" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_LINE" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_TTY_FULL_HEADPHONES" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_HANDSET" backend="handset" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_EXTERNAL_1" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_EXTERNAL_2" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_REVERSE" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_VBAT" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_1" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_2" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_HANDSET" backend="handset" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_VBAT" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_VBAT" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HDMI" interface="INT4_MI2S_RX-and-HDMI"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_DISPLAY_PORT" interface="INT4_MI2S_RX-and-DISPLAY_PORT"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_BT_A2DP" interface="INT4_MI2S_RX-and-SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_ANC_FB_HEADSET" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_ANC_FB_HEADSET" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_ANC_HANDSET" backend="handset" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_PROTECTED" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED_VBAT" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_PROTECTED_VBAT" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_WSA" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_WSA" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_WSA" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC_EXTERNAL" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC_AEC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC_AEC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_AEC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_AEC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_MIC_AEC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_MIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_MIC_AEC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HEADSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HEADSET_MIC_FLUENCE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_HEADSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HDMI_MIC" interface="HDMI"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC" interface="SLIMBUS_7_TX"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC_NREC" interface="SLIMBUS_7_TX"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC_WB" interface="SLIMBUS_7_TX"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC_WB_NREC" interface="SLIMBUS_7_TX"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_QMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_TTY_FULL_HEADSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_TTY_HCO_HEADSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_MIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_DMIC_STEREO" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_DMIC_FLUENCE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_AANC_HANDSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_QUAD_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_STEREO_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_STEREO_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK_MONO_1" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK_MONO_2" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_BROADSIDE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC_BROADSIDE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_NS_BROADSIDE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS_BROADSIDE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_FLUENCE_DMIC_AANC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_QMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_QMIC_AEC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_QMIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_QMIC_AEC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_THREE_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_TMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_TMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_STEREO_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_THREE_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_QUAD_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_AND_VOICE_HEADPHONES" backend="speaker-and-headphones" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_AND_VOICE_ANC_HEADSET" backend="speaker-and-headphones" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO" backend="speaker-and-bt-sco" interface="INT4_MI2S_RX-and-SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_BT_SCO_WB" backend="speaker-and-bt-sco-wb" interface="INT4_MI2S_RX-and-SLIMBUS_7_RX"/>
+ </backend_names>
+</audio_platform_info>
+
diff --git a/configs/sdm670/audio_policy_configuration.xml b/configs/sdm670/audio_policy_configuration.xml
index 5f5e972..9bb9486 100644
--- a/configs/sdm670/audio_policy_configuration.xml
+++ b/configs/sdm670/audio_policy_configuration.xml
@@ -73,6 +73,10 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="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="hifi_playback" role="source" />
<mixPort name="compress_passthrough" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
@@ -192,6 +196,11 @@
<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="hifi_input" role="sink" />
</mixPorts>
@@ -304,15 +313,15 @@
<!-- 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"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="Speaker"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ 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"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,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"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,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"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="HDMI"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,compress_passthrough"/>
<route type="mix" sink="Proxy"
@@ -322,17 +331,19 @@
<route type="mix" sink="BT SCO All"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="USB Device Out"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,hifi_playback"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,hifi_playback"/>
<route type="mix" sink="Telephony Tx"
sources="voice_tx"/>
<route type="mix" sink="voice_rx"
sources="Telephony Rx"/>
<route type="mix" sink="primary input"
- sources="Built-In Mic,Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,Telephony Rx"/>
+ sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,Telephony Rx"/>
<route type="mix" sink="surround_sound"
sources="Built-In Mic,Built-In Back 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"
+ sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,USB Device In"/>
<route type="mix" sink="BT A2DP Out"
sources="primary output,deep_buffer,direct_pcm,compressed_offload"/>
<route type="mix" sink="BT A2DP Headphones"
diff --git a/configs/sdm670/mixer_paths.xml b/configs/sdm670/mixer_paths.xml
index 5f81e65..c526980 100644
--- a/configs/sdm670/mixer_paths.xml
+++ b/configs/sdm670/mixer_paths.xml
@@ -158,6 +158,7 @@
<ctl name="INT3_MI2S_TX Channels" value="One" />
<ctl name="I2S TX2 INP1" value="ZERO" />
<ctl name="I2S TX2 INP2" value="ZERO" />
+ <ctl name="ADC1_INP1 Switch" value="0" />
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="0" />
<ctl name="HDMI Mixer MultiMedia4" value="0" />
<ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="ZERO" />
@@ -1584,6 +1585,7 @@
<path name="adc1">
<ctl name="ADC1 Volume" value="6" />
<ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
</path>
<path name="adc2">
@@ -2141,8 +2143,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm670/mixer_paths_360cam.xml b/configs/sdm670/mixer_paths_360cam.xml
new file mode 100755
index 0000000..8ef7501
--- /dev/null
+++ b/configs/sdm670/mixer_paths_360cam.xml
@@ -0,0 +1,2336 @@
+<?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, -->
+<!-- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
+<!-- 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="Voip Tx Mute" id="0" value="0" />
+ <ctl name="Voip Tx Mute" id="1" value="500" />
+ <ctl name="Voip Rx Gain" id="0" value="0" />
+ <ctl name="Voip Rx Gain" id="1" value="20" />
+ <ctl name="Voip Mode Config" value="12" />
+ <ctl name="Voip Rate Config" value="0" />
+ <ctl name="Voip Evrc Min Max Rate Config" id="0" value="1" />
+ <ctl name="Voip Evrc Min Max Rate Config" id="1" value="4" />
+ <ctl name="Voip Dtx Mode" value="0" />
+ <ctl name="TTY Mode" value="OFF" />
+ <ctl name="INT4_MI2S_RX Port Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="INT0_MI2S_RX Port Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer AFE_PCM_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer SLIM_8_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia1 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="0" />
+ <ctl name="HDMI Mixer MultiMedia1" value="0" />
+ <ctl name="HDMI Mixer MultiMedia2" value="0" />
+ <ctl name="HDMI Mixer MultiMedia3" value="0" />
+ <ctl name="HDMI Mixer MultiMedia4" value="0" />
+ <ctl name="HDMI Mixer MultiMedia5" value="0" />
+ <ctl name="HDMI Mixer MultiMedia7" value="0" />
+ <ctl name="HDMI Mixer MultiMedia9" value="0" />
+ <ctl name="HDMI Mixer MultiMedia10" value="0" />
+ <ctl name="HDMI Mixer MultiMedia11" value="0" />
+ <ctl name="HDMI Mixer MultiMedia12" value="0" />
+ <ctl name="HDMI Mixer MultiMedia13" value="0" />
+ <ctl name="HDMI Mixer MultiMedia14" value="0" />
+ <ctl name="HDMI Mixer MultiMedia15" value="0" />
+ <ctl name="HDMI Mixer MultiMedia16" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia1" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia2" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia3" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia4" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia5" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia6" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia7" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia8" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia9" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia10" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia11" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia12" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia13" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia14" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia15" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="0" />
+ <ctl name="Display Port RX Bit Format" value="S16_LE" />
+ <ctl name="Display Port RX SampleRate" value="KHZ_48" />
+ <ctl name="Display Port RX Channels" value="Two" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia3" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia3" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia3" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="USB_AUDIO_RX Format" value="S16_LE" />
+ <ctl name="USB_AUDIO_RX SampleRate" value="KHZ_48" />
+ <ctl name="USB_AUDIO_RX Channels" value="Two" />
+ <ctl name="MultiMedia1 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="USB_AUDIO_TX Format" value="S16_LE" />
+ <ctl name="USB_AUDIO_TX SampleRate" value="KHZ_48" />
+ <ctl name="USB_AUDIO_TX Channels" value="One" />
+ <ctl name="MultiMedia6 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="INT0_MI2S_RX Channels" value="One" />
+ <ctl name="INT3_MI2S_TX Channels" value="One" />
+ <ctl name="I2S TX2 INP1" value="ZERO" />
+ <ctl name="I2S TX2 INP2" value="ZERO" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="ZERO" />
+ <ctl name="INT4_MI2S_RX_VI_FB_STEREO_CH_MUX" value="ZERO" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_1" value="0" />
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_2" value="0" />
+ <ctl name="INT5 MI2S VI MONO" value="Left" />
+ <!-- HFP start -->
+ <ctl name="HFP_SLIM7_UL_HL Switch" value="0" />
+ <ctl name="INT4_MI2S_RX Port Mixer SLIM_7_TX" value="0" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_7_TX" value="0" />
+ <!-- HFP end -->
+ <!-- echo reference -->
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="None" />
+ <!-- usb headset -->
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="MultiMedia1 Mixer AFE_PCM_TX" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia5" value="0" />
+ <!-- usb headset end -->
+ <!-- fm -->
+ <ctl name="SLIMBUS_8 LOOPBACK Volume" value="0" />
+ <ctl name="INT4_MI2S_RX Port Mixer SLIM_8_TX" value="0" />
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_8_TX" value="0" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_8_TX" value="0" />
+ <ctl name="MultiMedia2 Mixer SLIM_8_TX" value="0" />
+ <!-- fm end -->
+
+ <!-- Multimode Voice1 -->
+ <ctl name="INT4_MI2S_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="0" />
+ <!-- Multimode Voice1 HDMI -->
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode1" value="0" />
+ <!-- Multimode Voice1 BTSCO -->
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer SLIM_7_TX_MMode1" value="0" />
+ <!-- Multimode Voice1 USB headset -->
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1" value="0" />
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer USB_AUDIO_TX_MMode1" value="0" />
+ <!-- Miltimode Voice1 end-->
+
+ <!-- Multimode Voice2 -->
+ <ctl name="INT4_MI2S_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="0" />
+ <!-- Multimode Voice2 HDMI -->
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode2" value="0" />
+ <!-- Multimode Voice2 BTSCO -->
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer SLIM_7_TX_MMode2" value="0" />
+ <!-- Multimode Voice2 USB headset -->
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer AFE_PCM_TX_MMode2" value="0" />
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer USB_AUDIO_TX_MMode2" value="0" />
+ <!-- Multimode Voice2 end-->
+
+ <!-- Voice external ec. reference -->
+ <ctl name="VOC_EXT_EC MUX" value="NONE" />
+ <!-- Voice external ec. reference 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 -->
+
+ <!-- Incall Recording -->
+ <ctl name="MultiMedia1 Mixer VOC_REC_UL" value="0" />
+ <ctl name="MultiMedia1 Mixer VOC_REC_DL" value="0" />
+ <ctl name="MultiMedia8 Mixer VOC_REC_UL" value="0" />
+ <ctl name="MultiMedia8 Mixer VOC_REC_DL" value="0" />
+ <!-- Incall Recording End -->
+
+ <!-- Incall Music -->
+ <ctl name="Incall_Music Audio Mixer MultiMedia2" value="0" />
+ <!-- Incall Music End -->
+
+ <!-- compress-voip-call start -->
+ <ctl name="INT4_MI2S_RX_Voice Mixer Voip" value="0" />
+ <ctl name="INT0_MI2S_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="0" />
+ <ctl name="SLIM_7_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer SLIM_7_TX_Voip" value="0" />
+ <ctl name="AFE_PCM_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer AFE_PCM_TX_Voip" value="0" />
+ <ctl name="USB_AUDIO_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer USB_AUDIO_TX_Voip" value="0" />
+ <!-- compress-voip-call end-->
+
+ <!-- Audio BTSCO -->
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia6" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_7_TX" value="0" />
+ <!-- audio record compress-->
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer AFE_PCM_TX" value="0" />
+ <!-- audio record compress end-->
+
+ <!-- split a2dp -->
+ <ctl name="BT SampleRate" value="KHZ_8" />
+ <ctl name="AFE Input Channels" value="Zero" />
+ <ctl name="SLIM7_RX ADM Channels" value="Zero" />
+ <!-- split a2dp end-->
+
+ <!-- ADSP testfwk -->
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="0" />
+ <!-- ADSP testfwk end-->
+
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia3" value="0" />
+
+ <!-- Codec controls -->
+ <!-- WSA controls -->
+ <ctl name="SpkrLeft COMP Switch" value="0" />
+ <ctl name="SpkrRight COMP Switch" value="0" />
+ <ctl name="SpkrLeft BOOST Switch" value="0" />
+ <ctl name="SpkrRight BOOST Switch" value="0" />
+ <ctl name="SpkrLeft VISENSE Switch" value="0" />
+ <ctl name="SpkrRight VISENSE Switch" value="0" />
+ <ctl name="SpkrLeft SWR DAC_Port Switch" value="0" />
+ <ctl name="SpkrRight SWR DAC_Port Switch" value="0" />
+ <ctl name="SpkrLeft WSA PA Gain" value="G_0_DB" />
+ <ctl name="EAR SPKR PA Gain" value="G_DEFAULT" />
+
+ <!-- EAR controls -->
+ <ctl name="EAR_S" value="ZERO" />
+
+ <!-- Volume controls -->
+ <ctl name="HPHL Volume" value="9" />
+ <ctl name="HPHR Volume" value="9" />
+ <ctl name="EAR PA Gain" value="POS_1P5_DB" />
+ <ctl name="EAR PA Boost" value="DISABLE" />
+
+ <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="RX5 Digital Volume" value="84" />
+ <ctl name="ADC1 Volume" value="4" />
+ <ctl name="ADC2 Volume" value="4" />
+ <ctl name="ADC3 Volume" value="4" />
+ <ctl name="DEC1 Volume" value="84" />
+ <ctl name="DEC2 Volume" value="84" />
+ <ctl name="DEC3 Volume" value="84" />
+ <ctl name="DEC4 Volume" value="84" />
+
+ <!-- Compander controls -->
+ <ctl name="COMP1 Switch" value="1" />
+ <ctl name="COMP2 Switch" value="1" />
+
+ <!-- MUX controls -->
+ <ctl name="DEC1 MUX" value="ZERO" />
+ <ctl name="DEC2 MUX" value="ZERO" />
+ <ctl name="DEC3 MUX" value="ZERO" />
+ <ctl name="DEC4 MUX" value="ZERO" />
+ <ctl name="ADC2 MUX" value="ZERO" />
+ <ctl name="RDAC2 MUX" value="ZERO" />
+ <ctl name="ADC1_INP1 Switch" value="0" />
+
+ <!-- Interpolator chain controls -->
+ <!-- ADD RX Chain Controls -->
+
+ <ctl name="RX1 MIX1 INP1" value="ZERO" />
+ <ctl name="RX2 MIX1 INP1" value="ZERO" />
+ <ctl name="RDAC2 MUX" value="ZERO" />
+ <ctl name="HPHL" value="ZERO" />
+ <ctl name="HPHR" value="ZERO" />
+ <ctl name="RX1 MIX2 INP1" value="ZERO" />
+ <ctl name="RX2 MIX2 INP1" value="ZERO" />
+ <ctl name="RX3 MIX1 INP1" value="ZERO" />
+ <ctl name="RX4 MIX1 INP1" value="ZERO" />
+ <ctl name="RX5 MIX1 INP1" value="ZERO" />
+ <ctl name="RX HPH Mode" value="NORMAL" />
+ <ctl name="COMP0 RX1" value="0" />
+ <ctl name="COMP0 RX2" value="0" />
+
+ <!-- IIR/voice anc -->
+ <ctl name="IIR1 Band1" id ="0" value="268435456" />
+ <ctl name="IIR1 Band1" id ="1" value="0" />
+ <ctl name="IIR1 Band1" id ="2" value="0" />
+ <ctl name="IIR1 Band1" id ="3" value="0" />
+ <ctl name="IIR1 Band1" id ="4" value="0" />
+ <ctl name="IIR1 Band2" id ="0" value="268435456" />
+ <ctl name="IIR1 Band2" id ="1" value="0" />
+ <ctl name="IIR1 Band2" id ="2" value="0" />
+ <ctl name="IIR1 Band2" id ="3" value="0" />
+ <ctl name="IIR1 Band2" id ="4" value="0" />
+ <ctl name="IIR1 Band3" id ="0" value="268435456" />
+ <ctl name="IIR1 Band3" id ="1" value="0" />
+ <ctl name="IIR1 Band3" id ="2" value="0" />
+ <ctl name="IIR1 Band3" id ="3" value="0" />
+ <ctl name="IIR1 Band3" id ="4" value="0" />
+ <ctl name="IIR1 Band4" id ="0" value="268435456" />
+ <ctl name="IIR1 Band4" id ="1" value="0" />
+ <ctl name="IIR1 Band4" id ="2" value="0" />
+ <ctl name="IIR1 Band4" id ="3" value="0" />
+ <ctl name="IIR1 Band4" id ="4" value="0" />
+ <ctl name="IIR1 Band5" id ="0" value="268435456" />
+ <ctl name="IIR1 Band5" id ="1" value="0" />
+ <ctl name="IIR1 Band5" id ="2" value="0" />
+ <ctl name="IIR1 Band5" id ="3" value="0" />
+ <ctl name="IIR1 Band5" id ="4" value="0" />
+ <ctl name="IIR1 Enable Band1" value="0" />
+ <ctl name="IIR1 Enable Band2" value="0" />
+ <ctl name="IIR1 Enable Band3" value="0" />
+ <ctl name="IIR1 Enable Band4" value="0" />
+ <ctl name="IIR1 Enable Band5" value="0" />
+ <ctl name="IIR1 INP1 Volume" value="53" />
+ <ctl name="IIR1 INP2 Volume" value="53" />
+ <ctl name="IIR1 INP3 Volume" value="53" />
+ <ctl name="IIR1 INP4 Volume" value="53" />
+ <ctl name="IIR1 INP1 MUX" value="ZERO" />
+
+ <!-- anc related -->
+
+ <!-- Codec controls end -->
+
+ <!-- These are audio route (FE to BE) specific mixer settings -->
+ <path name="gsm-mode">
+ <ctl name="GSM mode Enable" value="ON" />
+ </path>
+
+ <path name="echo-reference speaker-vbat-mono">
+ </path>
+
+ <path name="echo-reference speaker-vbat-mono-2">
+ </path>
+
+ <path name="echo-reference speaker-vbat">
+ </path>
+
+ <path name="echo-reference">
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="INT4_MI2S_RX" />
+ </path>
+
+ <path name="echo-reference headphones">
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="INT0_MI2S_RX" />
+ </path>
+
+ <path name="echo-reference headphones-44.1">
+ </path>
+
+ <path name="deep-buffer-playback">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-protected">
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-hdmi">
+ <path name="deep-buffer-playback hdmi" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-display-port">
+ <path name="deep-buffer-playback display-port" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="deep-buffer-playback bt-sco" />
+ </path>
+
+ <path name="deep-buffer-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-usb-headphones">
+ <path name="deep-buffer-playback usb-headphones" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-headphones">
+ <path name="deep-buffer-playback headphones" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="low-latency-playback">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback speaker-protected">
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="low-latency-playback bt-sco" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-hdmi">
+ <path name="low-latency-playback hdmi" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-display-port">
+ <path name="low-latency-playback display-port" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-usb-headphones">
+ <path name="low-latency-playback usb-headphones" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-headphones">
+ <path name="low-latency-playback headphones" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="audio-ull-playback">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback speaker-protected">
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-headphones">
+ <path name="audio-ull-playback" />
+ <path name="audio-ull-playback headphones" />
+ </path>
+
+ <path name="audio-ull-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-ull-playback bt-sco" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-hdmi">
+ <path name="audio-ull-playback hdmi" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-display-port">
+ <path name="audio-ull-playback display-port" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="multi-channel-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="multi-channel-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="multi-channel-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="compress-offload-playback">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback speaker-protected">
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="silence-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia9" value="1" />
+ </path>
+
+ <path name="compress-offload-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="silence-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia9" value="1" />
+ </path>
+
+ <path name="compress-offload-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-hdmi">
+ <path name="compress-offload-playback hdmi" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-display-port">
+ <path name="compress-offload-playback display-port" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-usb-headphones">
+ <path name="compress-offload-playback usb-headphones" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback speaker-and-headphones">
+ <path name="compress-offload-playback headphones" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback2">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 hdmi">
+ <ctl name="HDMI Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback2 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-hdmi">
+ <path name="compress-offload-playback2 hdmi" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-display-port">
+ <path name="compress-offload-playback2 display-port" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-usb-headphones">
+ <path name="compress-offload-playback2 usb-headphones" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-headphones">
+ <path name="compress-offload-playback2 headphones" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback3">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 hdmi">
+ <ctl name="HDMI Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback3 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-hdmi">
+ <path name="compress-offload-playback3 hdmi" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-display-port">
+ <path name="compress-offload-playback3 display-port" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-usb-headphones">
+ <path name="compress-offload-playback3 usb-headphones" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-headphones">
+ <path name="compress-offload-playback3 headphones" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback4">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 hdmi">
+ <ctl name="HDMI Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback4 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-hdmi">
+ <path name="compress-offload-playback4 hdmi" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-display-port">
+ <path name="compress-offload-playback4 display-port" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+
+ <path name="compress-offload-playback4 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-usb-headphones">
+ <path name="compress-offload-playback4 usb-headphones" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback4 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-headphones">
+ <path name="compress-offload-playback4 headphones" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback5">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 hdmi">
+ <ctl name="HDMI Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback5 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-hdmi">
+ <path name="compress-offload-playback5 hdmi" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-display-port">
+ <path name="compress-offload-playback5 display-port" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-usb-headphones">
+ <path name="compress-offload-playback5 usb-headphones" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-headphones">
+ <path name="compress-offload-playback5 headphones" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback6">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 hdmi">
+ <ctl name="HDMI Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback6 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-hdmi">
+ <path name="compress-offload-playback6 hdmi" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-display-port">
+ <path name="compress-offload-playback6 display-port" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-usb-headphones">
+ <path name="compress-offload-playback6 usb-headphones" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-headphones">
+ <path name="compress-offload-playback6 headphones" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback7">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 hdmi">
+ <ctl name="HDMI Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback7 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-hdmi">
+ <path name="compress-offload-playback7 hdmi" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-display-port">
+ <path name="compress-offload-playback7 display-port" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-usb-headphones">
+ <path name="compress-offload-playback7 usb-headphones" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-headphones">
+ <path name="compress-offload-playback7 headphones" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback8">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 hdmi">
+ <ctl name="HDMI Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback8 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-hdmi">
+ <path name="compress-offload-playback8 hdmi" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-display-port">
+ <path name="compress-offload-playback8 display-port" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-usb-headphones">
+ <path name="compress-offload-playback8 usb-headphones" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-headphones">
+ <path name="compress-offload-playback8 headphones" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback9">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 hdmi">
+ <ctl name="HDMI Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback9 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-hdmi">
+ <path name="compress-offload-playback9 hdmi" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-display-port">
+ <path name="compress-offload-playback9 display-port" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-usb-headphones">
+ <path name="compress-offload-playback9 usb-headphones" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-headphones">
+ <path name="compress-offload-playback9 headphones" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="audio-record">
+ <ctl name="MultiMedia1 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="audio-record usb-headset-mic">
+ <ctl name="MultiMedia1 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="audio-record bt-sco">
+ <ctl name="MultiMedia1 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="audio-record bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-record bt-sco" />
+ </path>
+
+ <path name="audio-record capture-fm">
+ <ctl name="MultiMedia1 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="audio-record-compress">
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="audio-record-compress bt-sco">
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="audio-record-compress bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-record-compress bt-sco" />
+ </path>
+
+ <path name="audio-record-compress usb-headset-mic">
+ <ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record">
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record bt-sco">
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="low-latency-record bt-sco" />
+ </path>
+
+ <path name="low-latency-record usb-headset-mic">
+ <ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record capture-fm">
+ <ctl name="MultiMedia8 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="fm-virtual-record capture-fm">
+ <ctl name="MultiMedia2 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="play-fm">
+ <ctl name="SLIMBUS_8 LOOPBACK Volume" value="1" />
+ <ctl name="INT4_MI2S_RX Port Mixer SLIM_8_TX" value="1" />
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="play-fm headphones">
+ <ctl name="SLIMBUS_8 LOOPBACK Volume" value="1" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_8_TX" value="1" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="incall-rec-uplink">
+ <ctl name="MultiMedia1 Mixer VOC_REC_UL" value="1" />
+ </path>
+
+ <path name="incall-rec-uplink bt-sco">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink bt-sco-wb">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink usb-headset-mic">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink afe-proxy">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink-compress">
+ <ctl name="MultiMedia8 Mixer VOC_REC_UL" value="1" />
+ </path>
+
+ <path name="incall-rec-uplink-compress bt-sco">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-compress bt-sco-wb">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-compress usb-headset-mic">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-compress afe-proxy">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink">
+ <ctl name="MultiMedia1 Mixer VOC_REC_DL" value="1" />
+ </path>
+
+ <path name="incall-rec-downlink bt-sco">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink bt-sco-wb">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink usb-headset-mic">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink afe-proxy">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink-compress">
+ <ctl name="MultiMedia8 Mixer VOC_REC_DL" value="1" />
+ </path>
+
+ <path name="incall-rec-downlink-compress bt-sco">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink-compress bt-sco-wb">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink-compress usb-headset-mic">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink-compress afe-proxy">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink">
+ <path name="incall-rec-uplink" />
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink bt-sco">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink bt-sco-wb">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink usb-headset-mic">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink afe-proxy">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress">
+ <path name="incall-rec-uplink-compress" />
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress bt-sco">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress bt-sco-wb">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress usb-headset-mic">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress afe-proxy">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="hfp-sco">
+ <ctl name="HFP_SLIM7_UL_HL Switch" value="1" />
+ <ctl name="INT4_MI2S_RX Port Mixer SLIM_7_TX" value="1" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia6" value="1" />
+ <ctl name="MultiMedia6 Mixer INT3_MI2S_TX" value="1" />
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="hfp-sco headphones">
+ <ctl name="HFP_SLIM7_UL_HL Switch" value="1" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_7_TX" value="1" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia6" value="1" />
+ <ctl name="MultiMedia6 Mixer INT3_MI2S_TX" value="1" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="hfp-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="hfp-sco" />
+ </path>
+
+ <path name="hfp-sco-wb headphones">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="hfp-sco headphones" />
+ </path>
+
+ <path name="compress-voip-call">
+ <ctl name="INT4_MI2S_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call bt-a2dp">
+ <ctl name="SLIM_7_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call handset">
+ <ctl name="INT0_MI2S_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call headphones">
+ <ctl name="INT0_MI2S_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call bt-sco">
+ <ctl name="SLIM_7_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer SLIM_7_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-voip-call bt-sco" />
+ </path>
+
+ <path name="compress-voip-call afe-proxy">
+ <ctl name="AFE_PCM_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer AFE_PCM_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call usb-headphones">
+ <ctl name="USB_AUDIO_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call usb-headset">
+ <ctl name="USB_AUDIO_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer USB_AUDIO_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call voice-speaker-vbat">
+ <path name="echo-reference speaker-vbat-mono" />
+ <path name="compress-voip-call"/>
+ </path>
+
+ <path name="compress-voip-call voice-speaker-2-vbat">
+ <path name="echo-reference speaker-vbat-mono-2" />
+ <path name="compress-voip-call"/>
+ </path>
+
+ <path name="voicemmode1-call">
+ <ctl name="INT4_MI2S_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call handset">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call headphones">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call hdmi">
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call bt-sco">
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer SLIM_7_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="voicemmode1-call bt-sco" />
+ </path>
+
+ <path name="voicemmode1-call afe-proxy">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call usb-headphones">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call usb-headset">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer USB_AUDIO_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call voice-speaker-vbat">
+ <path name="echo-reference speaker-vbat-mono" />
+ <path name="voicemmode1-call"/>
+ </path>
+
+ <path name="voicemmode1-call voice-speaker-2-vbat">
+ <path name="echo-reference speaker-vbat-mono-2" />
+ <path name="voicemmode1-call"/>
+ </path>
+
+ <path name="voicemmode2-call">
+ <ctl name="INT4_MI2S_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call handset">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call headphones">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call hdmi">
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call bt-sco">
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer SLIM_7_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="voicemmode2-call bt-sco" />
+ </path>
+
+ <path name="voicemmode2-call afe-proxy">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer AFE_PCM_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call usb-headphones">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call usb-headset">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer USB_AUDIO_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call voice-speaker-vbat">
+ <path name="echo-reference speaker-vbat-mono" />
+ <path name="voicemmode2-call"/>
+ </path>
+
+ <path name="voicemmode2-call voice-speaker-2-vbat">
+ <path name="echo-reference speaker-vbat-mono-2" />
+ <path name="voicemmode2-call"/>
+ </path>
+
+ <path name="spkr-rx-calib">
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="spkr-vi-record">
+ </path>
+
+ <!-- These are actual sound device specific mixer settings -->
+ <path name="adc1">
+ <ctl name="ADC1 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
+ </path>
+
+ <path name="adc2">
+ <ctl name="ADC2 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP2" />
+ </path>
+
+ <path name="adc3">
+ <ctl name="ADC3 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP3" />
+ </path>
+
+ <!-- DMIC numbered from 1 to 4 -->
+ <path name="dmic1">
+ <ctl name="DEC1 MUX" value="DMIC1" />
+ </path>
+
+ <path name="dmic2">
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ </path>
+
+ <path name="dmic3">
+ <ctl name="DEC1 MUX" value="DMIC3" />
+ </path>
+
+ <path name="dmic4">
+ <ctl name="DEC1 MUX" value="DMIC4" />
+ </path>
+
+ <path name="speaker">
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="RX4 MIX1 INP1" value="RX4" />
+ <ctl name="COMP1 Switch" value="1" />
+ <ctl name="SpkrLeft COMP Switch" value="1" />
+ <ctl name="SpkrLeft BOOST Switch" value="1" />
+ <ctl name="SpkrLeft VISENSE Switch" value="1" />
+ <ctl name="SpkrLeft SWR DAC_Port Switch" value="1" />
+ <ctl name="SpkrLeft WSA PA Mute" value="0" />
+ </path>
+
+ <path name="speaker-mono">
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="RX4 MIX1 INP1" value="RX4" />
+ <ctl name="COMP1 Switch" value="1" />
+ <ctl name="SpkrLeft COMP Switch" value="1" />
+ <ctl name="SpkrLeft BOOST Switch" value="1" />
+ <ctl name="SpkrLeft VISENSE Switch" value="1" />
+ <ctl name="SpkrLeft SWR DAC_Port Switch" value="1" />
+ <ctl name="SpkrLeft WSA PA Mute" value="0" />
+ </path>
+
+ <path name="speaker-mono-2">
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="RX5 MIX1 INP1" value="RX4" />
+ <ctl name="COMP2 Switch" value="1" />
+ <ctl name="SpkrRight COMP Switch" value="1" />
+ <ctl name="SpkrRight BOOST Switch" value="1" />
+ <ctl name="SpkrRight VISENSE Switch" value="1" />
+ <ctl name="SpkrRight SWR DAC_Port Switch" value="1" />
+ <ctl name="SpkrRight WSA PA Mute" value="0" />
+ </path>
+
+ <path name="speaker-fluid">
+ <path name="speaker-mono" />
+ </path>
+
+ <path name="speaker-liquid">
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-vbat-mono">
+ <path name="speaker-mono" />
+ </path>
+
+ <path name="speaker-vbat-mono-2">
+ <path name="speaker-mono-2" />
+ </path>
+
+ <path name="speaker-vbat">
+ <path name="speaker" />
+ </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="RX1 MIX2 INP1" value="IIR1" />
+ <ctl name="RX2 MIX2 INP1" value="IIR1" />
+ <ctl name="IIR1 INP1 Volume" value="53" />
+ </path>
+
+ <path name="sidetone-handset">
+ <path name="sidetone-iir" />
+ <ctl name="IIR1 INP1 Volume" value="53" />
+ <ctl name="RX1 MIX2 INP1" value="IIR1" />
+ </path>
+
+ <path name="speaker-mic">
+ <path name="dmic1" />
+ </path>
+
+ <path name="speaker-mic-liquid">
+ <path name="dmic2" />
+ </path>
+
+ <path name="speaker-mic-sbc">
+ </path>
+
+ <path name="speaker-protected">
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_1" value="1" />
+ <path name="speaker" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="INT5_MI2S_TX" />
+ </path>
+
+ <path name="voice-speaker-protected">
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_1" value="1" />
+ <path name="speaker-mono" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="INT5_MI2S_TX" />
+ </path>
+
+ <path name="voice-speaker-2-protected">
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_2" value="1" />
+ <path name="speaker-mono-2" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="INT5_MI2S_TX" />
+ <ctl name="INT5 MI2S VI MONO" value="Right" />
+ </path>
+
+ <path name="vi-feedback">
+ </path>
+
+ <path name="vi-feedback-mono-1">
+ </path>
+
+ <path name="vi-feedback-mono-2">
+ </path>
+
+ <path name="speaker-protected-vbat">
+ <path name="speaker-protected" />
+ </path>
+
+ <path name="voice-speaker-protected-vbat">
+ <path name="voice-speaker-protected" />
+ </path>
+
+ <path name="voice-speaker-2-protected-vbat">
+ <path name="voice-speaker-2-protected" />
+ </path>
+
+ <path name="handset">
+ <ctl name="INT0_MI2S_RX Channels" value="One" />
+ <ctl name="EAR PA Boost" value="DISABLE" />
+ <ctl name="RX1 MIX1 INP1" value="RX1" />
+ <ctl name="RDAC2 MUX" value="RX1" />
+ <ctl name="EAR_S" value="Switch" />
+ </path>
+
+ <path name="handset-mic">
+ <path name="dmic1" />
+ </path>
+
+ <path name="handset-mic-db">
+ </path>
+
+ <path name="handset-mic-cdp">
+ <path name="adc1" />
+ </path>
+
+ <path name="handset-mic-sbc">
+ </path>
+
+ <path name="three-mic">
+ <ctl name="INT3_MI2S_TX Channels" value="Three" />
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ <ctl name="DEC2 MUX" value="DMIC1" />
+ <ctl name="DEC3 MUX" value="DMIC3" />
+ <ctl name="I2S TX2 INP1" value="DEC3" />
+ </path>
+
+ <path name="anc-handset">
+ </path>
+
+ <path name="headphones">
+ <ctl name="INT0_MI2S_RX Channels" value="Two" />
+ <ctl name="RX1 MIX1 INP1" value="RX1" />
+ <ctl name="RX2 MIX1 INP1" value="RX2" />
+ <ctl name="RDAC2 MUX" value="RX2" />
+ <ctl name="RX HPH Mode" value="HD2" />
+ <ctl name="COMP0 RX1" value="1" />
+ <ctl name="COMP0 RX2" value="1" />
+ <ctl name="HPHL" value="Switch" />
+ <ctl name="HPHR" value="Switch" />
+ </path>
+
+ <path name="headphones-44.1">
+ <path name="headphones" />
+ </path>
+
+ <path name="true-native-mode">
+ </path>
+
+ <path name="line">
+ <path name="headphones" />
+ </path>
+
+ <path name="headset-mic">
+ <path name="dmic2" />
+ </path>
+
+ <path name="headset-mic-liquid">
+ <path name="adc2" />
+ </path>
+
+ <path name="voice-handset">
+ <path name="handset" />
+ </path>
+
+ <path name="voice-handset-tmus">
+ <path name="handset" />
+ </path>
+
+ <path name="voice-speaker">
+ <path name="speaker-mono" />
+ </path>
+
+ <path name="voice-speaker-2">
+ <path name="speaker-mono-2" />
+ </path>
+
+ <path name="voice-speaker-fluid">
+ <path name="speaker-fluid" />
+ </path>
+
+ <path name="voice-speaker-mic">
+ <path name="speaker-mic" />
+ </path>
+
+ <path name="voice-speaker-vbat">
+ <path name="speaker-vbat-mono" />
+ </path>
+
+ <path name="voice-speaker-2-vbat">
+ <path name="speaker-vbat-mono-2" />
+ </path>
+
+ <path name="voice-headphones">
+ <path name="headphones" />
+ </path>
+
+ <path name="voice-line">
+ <path name="voice-headphones" />
+ </path>
+
+ <path name="voice-headset-mic">
+ <path name="headset-mic" />
+ </path>
+
+ <path name="speaker-and-headphones">
+ <path name="headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-and-line">
+ <path name="speaker-and-headphones" />
+ </path>
+
+ <path name="speaker-and-headphones-liquid">
+ <path name="headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-and-line-liquid">
+ <path name="speaker-and-headphones-liquid" />
+ </path>
+
+ <path name="usb-headphones">
+ </path>
+
+ <path name="usb-headset">
+ </path>
+
+ <path name="afe-proxy">
+ </path>
+
+ <path name="anc-headphones">
+ <path name="headphones" />
+ </path>
+
+ <path name="speaker-and-anc-headphones">
+ <path name="anc-headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="anc-fb-headphones">
+ <path name="anc-headphones" />
+ </path>
+
+ <path name="speaker-and-anc-fb-headphones">
+ <path name="anc-fb-headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="voice-anc-headphones">
+ <path name="voice-headphones" />
+ </path>
+
+ <path name="voice-anc-fb-headphones">
+ <path name="voice-headphones" />
+ </path>
+
+ <path name="speaker-and-anc-headphones-liquid">
+ <path name="anc-headphones" />
+ </path>
+
+ <path name="hdmi">
+ </path>
+
+ <path name="display-port">
+ </path>
+
+ <path name="speaker-and-usb-headphones">
+ <path name="speaker" />
+ <path name="usb-headphones" />
+ </path>
+
+ <path name="speaker-and-hdmi">
+ <path name="speaker" />
+ <path name="hdmi" />
+ </path>
+
+ <path name="speaker-and-display-port">
+ <path name="speaker" />
+ <path name="display-port" />
+ </path>
+
+ <path name="voice-rec-mic">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="camcorder-mic">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="hdmi-tx">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="bt-sco-headset">
+ </path>
+
+ <path name="bt-sco-mic">
+ </path>
+
+ <path name="bt-sco-headset-wb">
+ </path>
+
+ <path name="bt-sco-mic-wb">
+ </path>
+
+ <path name="usb-headset-mic">
+ </path>
+
+ <path name="capture-fm">
+ </path>
+
+ <path name="aanc-path">
+ </path>
+
+ <path name="aanc-handset-mic">
+ </path>
+
+ <!-- Dual MIC devices -->
+ <path name="handset-dmic-endfire">
+ <ctl name="INT3_MI2S_TX Channels" value="Two" />
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ <ctl name="DEC2 MUX" value="DMIC1" />
+ </path>
+
+ <path name="speaker-dmic-endfire">
+ <ctl name="INT3_MI2S_TX Channels" value="Two" />
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ <ctl name="DEC2 MUX" value="DMIC1" />
+ </path>
+
+ <path name="dmic-endfire">
+ <path name="handset-dmic-endfire" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="dmic-endfire-liquid">
+ <path name="handset-dmic-endfire" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="handset-stereo-dmic-ef">
+ <path name="handset-dmic-endfire" />
+ </path>
+
+ <path name="speaker-stereo-dmic-ef">
+ <path name="speaker-dmic-endfire" />
+ </path>
+
+ <path name="voice-dmic-ef-tmus">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-dmic-ef">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-speaker-dmic-ef">
+ <path name="speaker-dmic-endfire" />
+ </path>
+
+ <path name="voice-rec-dmic-ef">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-rec-dmic-ef-fluence">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="handset-stereo-dmic-ef-liquid">
+ <path name="handset-dmic-endfire" />
+ </path>
+
+ <path name="speaker-stereo-dmic-ef-liquid">
+ <path name="speaker-dmic-endfire" />
+ </path>
+
+ <path name="voice-dmic-ef-liquid-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="voice-speaker-dmic-ef-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="voice-rec-dmic-ef-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="voice-rec-dmic-ef-fluence-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="speaker-dmic-broadside">
+ <ctl name="INT3_MI2S_TX Channels" value="Two" />
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ <ctl name="DEC2 MUX" value="DMIC1" />
+ </path>
+
+ <path name="dmic-broadside">
+ <path name="speaker-dmic-broadside" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="voice-speaker-dmic-broadside">
+ <path name="dmic-broadside" />
+ </path>
+
+ <!-- Quad MIC devices -->
+ <path name="speaker-qmic">
+ <ctl name="INT3_MI2S_TX Channels" value="Four" />
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ <ctl name="DEC2 MUX" value="DMIC1" />
+ <ctl name="DEC3 MUX" value="DMIC3" />
+ <ctl name="I2S TX2 INP1" value="DEC3" />
+ <ctl name="DEC4 MUX" value="DMIC4" />
+ <ctl name="I2S TX2 INP2" value="DEC4" />
+ </path>
+
+ <path name="speaker-qmic-liquid">
+ </path>
+
+ <path name="voice-speaker-qmic">
+ <path name="speaker-qmic" />
+ </path>
+
+ <path name="quad-mic">
+ <path name="speaker-qmic" />
+ </path>
+
+ <path name="voice-speaker-qmic-liquid">
+ <path name="speaker-qmic-liquid" />
+ </path>
+
+ <path name="quad-mic-liquid">
+ <path name="speaker-qmic-liquid" />
+ </path>
+
+ <!-- TTY devices -->
+
+ <path name="tty-headphones">
+ <ctl name="RX1 MIX1 INP1" value="RX1" />
+ <ctl name="HPHL" value="Switch" />
+ </path>
+
+ <path name="voice-tty-full-headphones">
+ <ctl name="TTY Mode" value="FULL" />
+ <path name="tty-headphones" />
+ </path>
+
+ <path name="voice-tty-vco-headphones">
+ <ctl name="TTY Mode" value="VCO" />
+ <path name="tty-headphones" />
+ </path>
+
+ <path name="voice-tty-hco-handset">
+ <ctl name="TTY Mode" value="HCO" />
+ <path name="handset" />
+ </path>
+
+ <path name="voice-tty-full-headset-mic">
+ <path name="adc2" />
+ </path>
+
+ <path name="voice-tty-hco-headset-mic">
+ <path name="voice-tty-full-headset-mic" />
+ </path>
+
+ <path name="voice-tty-vco-handset-mic">
+ <path name="dmic4" />
+ </path>
+
+ <path name="unprocessed-handset-mic">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="unprocessed-mic">
+ <path name="unprocessed-handset-mic" />
+ </path>
+ <!-- USB TTY start -->
+
+ <!-- full: both end tty -->
+ <path name="voice-tty-full-usb">
+ <ctl name="TTY Mode" value="FULL" />
+ <path name="usb-headphones" />
+ </path>
+
+ <path name="voice-tty-full-usb-mic">
+ <path name="usb-headset-mic" />
+ </path>
+
+ <!-- vco, in: handset mic use existing, out: tty -->
+ <path name="voice-tty-vco-usb">
+ <ctl name="TTY Mode" value="VCO" />
+ <path name="usb-headphones" />
+ </path>
+
+ <!-- hco, in: tty, out: speaker, use existing handset -->
+ <path name="voice-tty-hco-usb-mic">
+ <path name="voice-tty-full-usb-mic" />
+ </path>
+
+ <!-- USB TTY end -->
+
+ <!-- Added for ADSP testfwk -->
+ <path name="ADSP testfwk">
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="bt-a2dp">
+ <ctl name="BT SampleRate" value="KHZ_48" />
+ <ctl name="AFE Input Channels" value="Two" />
+ <ctl name="SLIM7_RX ADM Channels" value="Two" />
+ </path>
+
+ <path name="speaker-and-bt-a2dp">
+ <path name="speaker" />
+ <path name="bt-a2dp" />
+ </path>
+
+ <path name="deep-buffer-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="low-latency-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="compress-offload-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-bt-a2dp">
+ <path name="deep-buffer-playback bt-a2dp" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-bt-a2dp">
+ <path name="compress-offload-playback bt-a2dp" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-a2dp">
+ <path name="low-latency-playback bt-a2dp" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback2 bt-a2dp" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback3 bt-a2dp" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback4 bt-a2dp" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback5 bt-a2dp" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback6 bt-a2dp" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback7 bt-a2dp" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback8 bt-a2dp" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback9 bt-a2dp" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-bt-a2dp">
+ <path name="audio-ull-playback bt-a2dp" />
+ <path name="audio-ull-playback" />
+ </path>
+</mixer>
diff --git a/configs/sdm670/mixer_paths_i2s.xml b/configs/sdm670/mixer_paths_i2s.xml
index bcf433b..fa8377b 100644
--- a/configs/sdm670/mixer_paths_i2s.xml
+++ b/configs/sdm670/mixer_paths_i2s.xml
@@ -73,6 +73,10 @@
<ctl name="RT_PROXY_1_TX SetCalMode" value="CAL_MODE_NONE" />
<!-- RT Proxy Cal end -->
+ <!-- mixer control to disable lowlatency qos voting -->
+ <ctl name="MultiMedia5_RX QOS Vote" value="Disable" />
+ <!-- mixer control to disable lowlatency qos voting 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" />
@@ -82,6 +86,10 @@
<ctl name="AUX_PCM_RX Audio Mixer MultiMedia5" value="1" />
</path>
+ <path name="low-latency-playback resume">
+ <ctl name="MultiMedia5_RX QOS Vote" value="Enable" />
+ </path>
+
<path name="compress-offload-playback">
<ctl name="AUX_PCM_RX Audio Mixer MultiMedia4" value="1" />
</path>
diff --git a/configs/sdm670/mixer_paths_mtp.xml b/configs/sdm670/mixer_paths_mtp.xml
index 9b462a4..c5d2cf2 100644
--- a/configs/sdm670/mixer_paths_mtp.xml
+++ b/configs/sdm670/mixer_paths_mtp.xml
@@ -67,6 +67,9 @@
<ctl name="MultiMedia1 Mixer SLIM_7_TX" value="0" />
<ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="0" />
<ctl name="MultiMedia8 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer AFE_PCM_TX" value="0" />
<ctl name="DISPLAY_PORT Mixer MultiMedia1" value="0" />
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="0" />
<ctl name="DISPLAY_PORT Mixer MultiMedia3" value="0" />
@@ -135,9 +138,11 @@
<ctl name="MultiMedia2 Mixer USB_AUDIO_TX" value="0" />
<ctl name="MultiMedia5 Mixer USB_AUDIO_TX" value="0" />
<ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer USB_AUDIO_TX" value="0" />
<ctl name="USB_AUDIO_TX Format" value="S16_LE" />
<ctl name="USB_AUDIO_TX SampleRate" value="KHZ_48" />
<ctl name="USB_AUDIO_TX Channels" value="One" />
+ <ctl name="ADC1_INP1 Switch" value="0" />
<ctl name="MultiMedia6 Mixer INT3_MI2S_TX" value="0" />
<ctl name="INT4_MI2S_RX Channels" value="One" />
<ctl name="INT0_MI2S_RX Channels" value="One" />
@@ -373,6 +378,10 @@
<!-- Codec controls end -->
+ <!-- mixer control to disable lowlatency qos voting -->
+ <ctl name="MultiMedia5_RX QOS Vote" value="Disable" />
+ <!-- mixer control to disable lowlatency qos voting end -->
+
<!-- These are audio route (FE to BE) specific mixer settings -->
<path name="gsm-mode">
<ctl name="GSM mode Enable" value="ON" />
@@ -446,6 +455,16 @@
<path name="deep-buffer-playback" />
</path>
+ <path name="deep-buffer-playback speaker-and-bt-sco">
+ <path name="deep-buffer-playback bt-sco" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-bt-sco-wb">
+ <path name="deep-buffer-playback bt-sco-wb" />
+ <path name="deep-buffer-playback" />
+ </path>
+
<path name="low-latency-playback">
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia5" value="1" />
</path>
@@ -503,6 +522,20 @@
<path name="low-latency-playback" />
</path>
+ <path name="low-latency-playback resume">
+ <ctl name="MultiMedia5_RX QOS Vote" value="Enable" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-sco">
+ <path name="low-latency-playback bt-sco" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-sco-wb">
+ <path name="low-latency-playback bt-sco-wb" />
+ <path name="low-latency-playback" />
+ </path>
+
<path name="audio-ull-playback">
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia8" value="1" />
</path>
@@ -555,6 +588,16 @@
<ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="1" />
</path>
+ <path name="audio-ull-playback speaker-and-bt-sco">
+ <path name="audio-ull-playback bt-sco" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-bt-sco-wb">
+ <path name="audio-ull-playback bt-sco-wb" />
+ <path name="audio-ull-playback" />
+ </path>
+
<path name="multi-channel-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
</path>
@@ -631,6 +674,16 @@
<path name="compress-offload-playback" />
</path>
+ <path name="compress-offload-playback speaker-and-bt-sco">
+ <path name="compress-offload-playback bt-sco" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback bt-sco-wb" />
+ <path name="compress-offload-playback" />
+ </path>
+
<path name="compress-offload-playback2">
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia7" value="1" />
</path>
@@ -691,6 +744,16 @@
<path name="compress-offload-playback2" />
</path>
+ <path name="compress-offload-playback2 speaker-and-bt-sco">
+ <path name="compress-offload-playback2 bt-sco" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback2 bt-sco-wb" />
+ <path name="compress-offload-playback2" />
+ </path>
+
<path name="compress-offload-playback3">
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia10" value="1" />
</path>
@@ -751,6 +814,16 @@
<path name="compress-offload-playback3" />
</path>
+ <path name="compress-offload-playback3 speaker-and-bt-sco">
+ <path name="compress-offload-playback3 bt-sco" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback3 bt-sco-wb" />
+ <path name="compress-offload-playback3" />
+ </path>
+
<path name="compress-offload-playback4">
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia11" value="1" />
</path>
@@ -812,6 +885,16 @@
<path name="compress-offload-playback4" />
</path>
+ <path name="compress-offload-playback4 speaker-and-bt-sco">
+ <path name="compress-offload-playback4 bt-sco" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback4 bt-sco-wb" />
+ <path name="compress-offload-playback4" />
+ </path>
+
<path name="compress-offload-playback5">
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia12" value="1" />
</path>
@@ -872,6 +955,16 @@
<path name="compress-offload-playback5" />
</path>
+ <path name="compress-offload-playback5 speaker-and-bt-sco">
+ <path name="compress-offload-playback5 bt-sco" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback5 bt-sco-wb" />
+ <path name="compress-offload-playback5" />
+ </path>
+
<path name="compress-offload-playback6">
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia13" value="1" />
</path>
@@ -932,6 +1025,16 @@
<path name="compress-offload-playback6" />
</path>
+ <path name="compress-offload-playback6 speaker-and-bt-sco">
+ <path name="compress-offload-playback6 bt-sco" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback6 bt-sco-wb" />
+ <path name="compress-offload-playback6" />
+ </path>
+
<path name="compress-offload-playback7">
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia14" value="1" />
</path>
@@ -992,6 +1095,16 @@
<path name="compress-offload-playback7" />
</path>
+ <path name="compress-offload-playback7 speaker-and-bt-sco">
+ <path name="compress-offload-playback7 bt-sco" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback7 bt-sco-wb" />
+ <path name="compress-offload-playback7" />
+ </path>
+
<path name="compress-offload-playback8">
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia15" value="1" />
</path>
@@ -1052,6 +1165,16 @@
<path name="compress-offload-playback8" />
</path>
+ <path name="compress-offload-playback8 speaker-and-bt-sco">
+ <path name="compress-offload-playback8 bt-sco" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback8 bt-sco-wb" />
+ <path name="compress-offload-playback8" />
+ </path>
+
<path name="compress-offload-playback9">
<ctl name="INT4_MI2S_RX Audio Mixer MultiMedia16" value="1" />
</path>
@@ -1112,6 +1235,16 @@
<path name="compress-offload-playback9" />
</path>
+ <path name="compress-offload-playback9 speaker-and-bt-sco">
+ <path name="compress-offload-playback9 bt-sco" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback9 bt-sco-wb" />
+ <path name="compress-offload-playback9" />
+ </path>
+
<path name="audio-record">
<ctl name="MultiMedia1 Mixer INT3_MI2S_TX" value="1" />
</path>
@@ -1447,6 +1580,63 @@
<ctl name="VoiceMMode2_Tx Mixer USB_AUDIO_TX_MMode2" value="1" />
</path>
+ <!-- VOIP Rx settings -->
+ <path name="audio-playback-voip">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-playback-voip bt-sco" />
+ </path>
+
+ <path name="audio-playback-voip afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip display-port">
+ <ctl name="DISPLAY_PORT Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip speaker-and-display-port">
+ <path name="audio-playback-voip display-port" />
+ <path name="audio-playback-voip" />
+ </path>
+
+ <!-- VoIP Tx settings -->
+ <path name="audio-record-voip">
+ <ctl name="MultiMedia10 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="audio-record-voip usb-headset-mic">
+ <ctl name="MultiMedia10 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="audio-record-voip bt-sco">
+ <ctl name="MultiMedia10 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="audio-record-voip bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-record-voip bt-sco" />
+ </path>
+
<path name="spkr-rx-calib">
<ctl name="INT4_MI2S_RX_DL_HL Switch" value="1" />
</path>
@@ -1458,6 +1648,7 @@
<path name="adc1">
<ctl name="ADC1 Volume" value="6" />
<ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
</path>
<path name="adc2">
@@ -1973,6 +2164,23 @@
<path name="unprocessed-mic">
<path name="unprocessed-handset-mic" />
</path>
+
+ <path name="unprocessed-stereo-mic">
+ <path name="voice-rec-dmic-ef" />
+ </path>
+
+ <path name="unprocessed-three-mic">
+ <path name="three-mic" />
+ </path>
+
+ <path name="unprocessed-quad-mic">
+ <path name="quad-mic" />
+ </path>
+
+ <path name="unprocessed-headset-mic">
+ <path name="headset-mic" />
+ </path>
+
<!-- USB TTY start -->
<!-- full: both end tty -->
@@ -2004,8 +2212,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
@@ -2122,6 +2328,84 @@
<path name="audio-ull-playback" />
</path>
+ <path name="mmap-playback">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-headphones">
+ <path name="mmap-playback" />
+ <path name="mmap-playback headphones" />
+ </path>
+
+ <path name="mmap-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="16000" />
+ <path name="mmap-playback bt-sco" />
+ </path>
+
+ <path name="mmap-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-buffer-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-hdmi">
+ <path name="mmap-playback hdmi" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-playback speaker-and-display-port">
+ <path name="mmap-playback display-port" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-playback speaker-and-usb-headphones">
+ <path name="mmap-playback usb-headphones" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-record">
+ <ctl name="MultiMedia16 Mixer INT3_MI2S_TX " value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco">
+ <ctl name="MultiMedia16 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="mmap-record bt-sco" />
+ </path>
+
+ <path name="mmap-record capture-fm">
+ <ctl name="MultiMedia16 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="mmap-record usb-headset-mic">
+ <ctl name="MultiMedia16 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
<path name="hifi-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
</path>
diff --git a/configs/sdm670/mixer_paths_skuw.xml b/configs/sdm670/mixer_paths_skuw.xml
new file mode 100644
index 0000000..2b3c8bb
--- /dev/null
+++ b/configs/sdm670/mixer_paths_skuw.xml
@@ -0,0 +1,2627 @@
+<?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, -->
+<!-- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
+<!-- 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="Voip Tx Mute" id="0" value="0" />
+ <ctl name="Voip Tx Mute" id="1" value="500" />
+ <ctl name="Voip Rx Gain" id="0" value="0" />
+ <ctl name="Voip Rx Gain" id="1" value="20" />
+ <ctl name="Voip Mode Config" value="12" />
+ <ctl name="Voip Rate Config" value="0" />
+ <ctl name="Voip Evrc Min Max Rate Config" id="0" value="1" />
+ <ctl name="Voip Evrc Min Max Rate Config" id="1" value="4" />
+ <ctl name="Voip Dtx Mode" value="0" />
+ <ctl name="TTY Mode" value="OFF" />
+ <ctl name="INT4_MI2S_RX Port Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="INT0_MI2S_RX Port Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer AFE_PCM_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer SLIM_8_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia1 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer AFE_PCM_TX" value="0" />
+ <ctl name="HDMI Mixer MultiMedia1" value="0" />
+ <ctl name="HDMI Mixer MultiMedia2" value="0" />
+ <ctl name="HDMI Mixer MultiMedia3" value="0" />
+ <ctl name="HDMI Mixer MultiMedia4" value="0" />
+ <ctl name="HDMI Mixer MultiMedia5" value="0" />
+ <ctl name="HDMI Mixer MultiMedia7" value="0" />
+ <ctl name="HDMI Mixer MultiMedia9" value="0" />
+ <ctl name="HDMI Mixer MultiMedia10" value="0" />
+ <ctl name="HDMI Mixer MultiMedia11" value="0" />
+ <ctl name="HDMI Mixer MultiMedia12" value="0" />
+ <ctl name="HDMI Mixer MultiMedia13" value="0" />
+ <ctl name="HDMI Mixer MultiMedia14" value="0" />
+ <ctl name="HDMI Mixer MultiMedia15" value="0" />
+ <ctl name="HDMI Mixer MultiMedia16" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia1" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia2" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia3" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia4" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia5" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia6" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia7" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia8" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia9" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia10" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia11" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia12" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia13" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia14" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia15" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="0" />
+ <ctl name="Display Port RX Bit Format" value="S16_LE" />
+ <ctl name="Display Port RX SampleRate" value="KHZ_48" />
+ <ctl name="Display Port RX Channels" value="Two" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia3" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia3" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia3" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="USB_AUDIO_RX Format" value="S16_LE" />
+ <ctl name="USB_AUDIO_RX SampleRate" value="KHZ_48" />
+ <ctl name="USB_AUDIO_RX Channels" value="Two" />
+ <ctl name="MultiMedia1 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="USB_AUDIO_TX Format" value="S16_LE" />
+ <ctl name="USB_AUDIO_TX SampleRate" value="KHZ_48" />
+ <ctl name="USB_AUDIO_TX Channels" value="One" />
+ <ctl name="MultiMedia6 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="INT0_MI2S_RX Channels" value="One" />
+ <ctl name="INT3_MI2S_TX Channels" value="One" />
+ <ctl name="I2S TX2 INP1" value="ZERO" />
+ <ctl name="I2S TX2 INP2" value="ZERO" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="ZERO" />
+ <ctl name="INT4_MI2S_RX_VI_FB_STEREO_CH_MUX" value="ZERO" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_1" value="0" />
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_2" value="0" />
+ <ctl name="INT5 MI2S VI MONO" value="Left" />
+ <!-- HFP start -->
+ <ctl name="HFP_SLIM7_UL_HL Switch" value="0" />
+ <ctl name="INT4_MI2S_RX Port Mixer SLIM_7_TX" value="0" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_7_TX" value="0" />
+ <!-- HFP end -->
+ <!-- echo reference -->
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="None" />
+ <!-- usb headset -->
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="MultiMedia1 Mixer AFE_PCM_TX" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia5" value="0" />
+ <!-- usb headset end -->
+ <!-- fm -->
+ <ctl name="SLIMBUS_8 LOOPBACK Volume" value="0" />
+ <ctl name="INT4_MI2S_RX Port Mixer SLIM_8_TX" value="0" />
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_8_TX" value="0" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_8_TX" value="0" />
+ <ctl name="MultiMedia2 Mixer SLIM_8_TX" value="0" />
+ <!-- fm end -->
+
+ <!-- Multimode Voice1 -->
+ <ctl name="INT4_MI2S_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="0" />
+ <!-- Multimode Voice1 HDMI -->
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode1" value="0" />
+ <!-- Multimode Voice1 BTSCO -->
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer SLIM_7_TX_MMode1" value="0" />
+ <!-- Multimode Voice1 USB headset -->
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1" value="0" />
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer USB_AUDIO_TX_MMode1" value="0" />
+ <!-- Miltimode Voice1 end-->
+
+ <!-- Multimode Voice2 -->
+ <ctl name="INT4_MI2S_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="0" />
+ <!-- Multimode Voice2 HDMI -->
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode2" value="0" />
+ <!-- Multimode Voice2 BTSCO -->
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer SLIM_7_TX_MMode2" value="0" />
+ <!-- Multimode Voice2 USB headset -->
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer AFE_PCM_TX_MMode2" value="0" />
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer USB_AUDIO_TX_MMode2" value="0" />
+ <!-- Multimode Voice2 end-->
+
+ <!-- Voice external ec. reference -->
+ <ctl name="VOC_EXT_EC MUX" value="NONE" />
+ <!-- Voice external ec. reference 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 -->
+
+ <!-- Incall Recording -->
+ <ctl name="MultiMedia1 Mixer VOC_REC_UL" value="0" />
+ <ctl name="MultiMedia1 Mixer VOC_REC_DL" value="0" />
+ <ctl name="MultiMedia8 Mixer VOC_REC_UL" value="0" />
+ <ctl name="MultiMedia8 Mixer VOC_REC_DL" value="0" />
+ <!-- Incall Recording End -->
+
+ <!-- Incall Music -->
+ <ctl name="Incall_Music Audio Mixer MultiMedia2" value="0" />
+ <!-- Incall Music End -->
+
+ <!-- compress-voip-call start -->
+ <ctl name="INT4_MI2S_RX_Voice Mixer Voip" value="0" />
+ <ctl name="INT0_MI2S_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="0" />
+ <ctl name="SLIM_7_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer SLIM_7_TX_Voip" value="0" />
+ <ctl name="AFE_PCM_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer AFE_PCM_TX_Voip" value="0" />
+ <ctl name="USB_AUDIO_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer USB_AUDIO_TX_Voip" value="0" />
+ <!-- compress-voip-call end-->
+
+ <!-- Audio BTSCO -->
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia6" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_7_TX" value="0" />
+ <!-- audio record compress-->
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer AFE_PCM_TX" value="0" />
+ <!-- audio record compress end-->
+
+ <!-- split a2dp -->
+ <ctl name="BT SampleRate" value="KHZ_8" />
+ <ctl name="AFE Input Channels" value="Zero" />
+ <ctl name="SLIM7_RX ADM Channels" value="Zero" />
+ <!-- split a2dp end-->
+
+ <!-- ADSP testfwk -->
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="0" />
+ <!-- ADSP testfwk end-->
+
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia3" value="0" />
+
+ <!-- Codec controls -->
+ <!-- WSA controls -->
+ <ctl name="SpkrLeft COMP Switch" value="0" />
+ <ctl name="SpkrRight COMP Switch" value="0" />
+ <ctl name="SpkrLeft BOOST Switch" value="0" />
+ <ctl name="SpkrRight BOOST Switch" value="0" />
+ <ctl name="SpkrLeft VISENSE Switch" value="0" />
+ <ctl name="SpkrRight VISENSE Switch" value="0" />
+ <ctl name="SpkrLeft SWR DAC_Port Switch" value="0" />
+ <ctl name="SpkrRight SWR DAC_Port Switch" value="0" />
+ <ctl name="SpkrLeft WSA PA Gain" value="G_0_DB" />
+ <ctl name="EAR SPKR PA Gain" value="G_DEFAULT" />
+
+ <!-- EAR controls -->
+ <ctl name="EAR_S" value="ZERO" />
+
+ <!-- Volume controls -->
+ <ctl name="HPHL Volume" value="9" />
+ <ctl name="HPHR Volume" value="9" />
+ <ctl name="EAR PA Gain" value="POS_1P5_DB" />
+ <ctl name="EAR PA Boost" value="DISABLE" />
+
+ <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="RX5 Digital Volume" value="84" />
+ <ctl name="ADC1 Volume" value="4" />
+ <ctl name="ADC2 Volume" value="4" />
+ <ctl name="ADC3 Volume" value="4" />
+ <ctl name="DEC1 Volume" value="84" />
+ <ctl name="DEC2 Volume" value="84" />
+ <ctl name="DEC3 Volume" value="84" />
+ <ctl name="DEC4 Volume" value="84" />
+
+ <!-- Compander controls -->
+ <ctl name="COMP1 Switch" value="1" />
+ <ctl name="COMP2 Switch" value="1" />
+
+ <!-- MUX controls -->
+ <ctl name="DEC1 MUX" value="ZERO" />
+ <ctl name="DEC2 MUX" value="ZERO" />
+ <ctl name="DEC3 MUX" value="ZERO" />
+ <ctl name="DEC4 MUX" value="ZERO" />
+ <ctl name="ADC2 MUX" value="ZERO" />
+ <ctl name="RDAC2 MUX" value="ZERO" />
+ <ctl name="ADC1_INP1 Switch" value="0" />
+
+ <!-- Interpolator chain controls -->
+ <!-- ADD RX Chain Controls -->
+
+ <ctl name="RX1 MIX1 INP1" value="ZERO" />
+ <ctl name="RX2 MIX1 INP1" value="ZERO" />
+ <ctl name="RDAC2 MUX" value="ZERO" />
+ <ctl name="HPHL" value="ZERO" />
+ <ctl name="HPHR" value="ZERO" />
+ <ctl name="RX1 MIX2 INP1" value="ZERO" />
+ <ctl name="RX2 MIX2 INP1" value="ZERO" />
+ <ctl name="RX3 MIX1 INP1" value="ZERO" />
+ <ctl name="RX4 MIX1 INP1" value="ZERO" />
+ <ctl name="RX5 MIX1 INP1" value="ZERO" />
+ <ctl name="RX HPH Mode" value="NORMAL" />
+ <ctl name="COMP0 RX1" value="0" />
+ <ctl name="COMP0 RX2" value="0" />
+
+ <!-- IIR/voice anc -->
+ <ctl name="IIR1 Band1" id ="0" value="268435456" />
+ <ctl name="IIR1 Band1" id ="1" value="0" />
+ <ctl name="IIR1 Band1" id ="2" value="0" />
+ <ctl name="IIR1 Band1" id ="3" value="0" />
+ <ctl name="IIR1 Band1" id ="4" value="0" />
+ <ctl name="IIR1 Band2" id ="0" value="268435456" />
+ <ctl name="IIR1 Band2" id ="1" value="0" />
+ <ctl name="IIR1 Band2" id ="2" value="0" />
+ <ctl name="IIR1 Band2" id ="3" value="0" />
+ <ctl name="IIR1 Band2" id ="4" value="0" />
+ <ctl name="IIR1 Band3" id ="0" value="268435456" />
+ <ctl name="IIR1 Band3" id ="1" value="0" />
+ <ctl name="IIR1 Band3" id ="2" value="0" />
+ <ctl name="IIR1 Band3" id ="3" value="0" />
+ <ctl name="IIR1 Band3" id ="4" value="0" />
+ <ctl name="IIR1 Band4" id ="0" value="268435456" />
+ <ctl name="IIR1 Band4" id ="1" value="0" />
+ <ctl name="IIR1 Band4" id ="2" value="0" />
+ <ctl name="IIR1 Band4" id ="3" value="0" />
+ <ctl name="IIR1 Band4" id ="4" value="0" />
+ <ctl name="IIR1 Band5" id ="0" value="268435456" />
+ <ctl name="IIR1 Band5" id ="1" value="0" />
+ <ctl name="IIR1 Band5" id ="2" value="0" />
+ <ctl name="IIR1 Band5" id ="3" value="0" />
+ <ctl name="IIR1 Band5" id ="4" value="0" />
+ <ctl name="IIR1 Enable Band1" value="0" />
+ <ctl name="IIR1 Enable Band2" value="0" />
+ <ctl name="IIR1 Enable Band3" value="0" />
+ <ctl name="IIR1 Enable Band4" value="0" />
+ <ctl name="IIR1 Enable Band5" value="0" />
+ <ctl name="IIR1 INP1 Volume" value="53" />
+ <ctl name="IIR1 INP2 Volume" value="53" />
+ <ctl name="IIR1 INP3 Volume" value="53" />
+ <ctl name="IIR1 INP4 Volume" value="53" />
+ <ctl name="IIR1 INP1 MUX" value="ZERO" />
+
+ <!-- anc related -->
+
+ <!-- Codec controls end -->
+
+ <!-- mixer control to disable lowlatency qos voting -->
+ <ctl name="MultiMedia5_RX QOS Vote" value="Disable" />
+ <!-- mixer control to disable lowlatency qos voting end -->
+
+ <!-- These are audio route (FE to BE) specific mixer settings -->
+ <path name="gsm-mode">
+ <ctl name="GSM mode Enable" value="ON" />
+ </path>
+
+ <path name="echo-reference speaker-vbat-mono">
+ </path>
+
+ <path name="echo-reference speaker-vbat-mono-2">
+ </path>
+
+ <path name="echo-reference speaker-vbat">
+ </path>
+
+ <path name="echo-reference">
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="INT4_MI2S_RX" />
+ </path>
+
+ <path name="echo-reference headphones">
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="INT0_MI2S_RX" />
+ </path>
+
+ <path name="echo-reference headphones-44.1">
+ </path>
+
+ <path name="deep-buffer-playback">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-protected">
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-hdmi">
+ <path name="deep-buffer-playback hdmi" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-display-port">
+ <path name="deep-buffer-playback display-port" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="deep-buffer-playback bt-sco" />
+ </path>
+
+ <path name="deep-buffer-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-usb-headphones">
+ <path name="deep-buffer-playback usb-headphones" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-headphones">
+ <path name="deep-buffer-playback headphones" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-bt-sco">
+ <path name="deep-buffer-playback bt-sco" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-bt-sco-wb">
+ <path name="deep-buffer-playback bt-sco-wb" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="low-latency-playback">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback speaker-protected">
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="low-latency-playback bt-sco" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-hdmi">
+ <path name="low-latency-playback hdmi" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-display-port">
+ <path name="low-latency-playback display-port" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-usb-headphones">
+ <path name="low-latency-playback usb-headphones" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-headphones">
+ <path name="low-latency-playback headphones" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback resume">
+ <ctl name="MultiMedia5_RX QOS Vote" value="Enable" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-sco">
+ <path name="low-latency-playback bt-sco" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-sco-wb">
+ <path name="low-latency-playback bt-sco-wb" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="audio-ull-playback">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback speaker-protected">
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-headphones">
+ <path name="audio-ull-playback" />
+ <path name="audio-ull-playback headphones" />
+ </path>
+
+ <path name="audio-ull-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-ull-playback bt-sco" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-hdmi">
+ <path name="audio-ull-playback hdmi" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-display-port">
+ <path name="audio-ull-playback display-port" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-bt-sco">
+ <path name="audio-ull-playback bt-sco" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-bt-sco-wb">
+ <path name="audio-ull-playback bt-sco-wb" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="multi-channel-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="multi-channel-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="multi-channel-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="compress-offload-playback">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback speaker-protected">
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="silence-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia9" value="1" />
+ </path>
+
+ <path name="compress-offload-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="silence-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia9" value="1" />
+ </path>
+
+ <path name="compress-offload-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-hdmi">
+ <path name="compress-offload-playback hdmi" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-display-port">
+ <path name="compress-offload-playback display-port" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-usb-headphones">
+ <path name="compress-offload-playback usb-headphones" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback speaker-and-headphones">
+ <path name="compress-offload-playback headphones" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-bt-sco">
+ <path name="compress-offload-playback bt-sco" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback bt-sco-wb" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback2">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 hdmi">
+ <ctl name="HDMI Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback2 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-hdmi">
+ <path name="compress-offload-playback2 hdmi" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-display-port">
+ <path name="compress-offload-playback2 display-port" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-usb-headphones">
+ <path name="compress-offload-playback2 usb-headphones" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-headphones">
+ <path name="compress-offload-playback2 headphones" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-bt-sco">
+ <path name="compress-offload-playback2 bt-sco" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback2 bt-sco-wb" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback3">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 hdmi">
+ <ctl name="HDMI Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback3 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-hdmi">
+ <path name="compress-offload-playback3 hdmi" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-display-port">
+ <path name="compress-offload-playback3 display-port" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-usb-headphones">
+ <path name="compress-offload-playback3 usb-headphones" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-headphones">
+ <path name="compress-offload-playback3 headphones" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-bt-sco">
+ <path name="compress-offload-playback3 bt-sco" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback3 bt-sco-wb" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback4">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 hdmi">
+ <ctl name="HDMI Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback4 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-hdmi">
+ <path name="compress-offload-playback4 hdmi" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-display-port">
+ <path name="compress-offload-playback4 display-port" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+
+ <path name="compress-offload-playback4 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-usb-headphones">
+ <path name="compress-offload-playback4 usb-headphones" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback4 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-headphones">
+ <path name="compress-offload-playback4 headphones" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-bt-sco">
+ <path name="compress-offload-playback4 bt-sco" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback4 bt-sco-wb" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback5">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 hdmi">
+ <ctl name="HDMI Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback5 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-hdmi">
+ <path name="compress-offload-playback5 hdmi" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-display-port">
+ <path name="compress-offload-playback5 display-port" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-usb-headphones">
+ <path name="compress-offload-playback5 usb-headphones" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-headphones">
+ <path name="compress-offload-playback5 headphones" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-bt-sco">
+ <path name="compress-offload-playback5 bt-sco" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback5 bt-sco-wb" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback6">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 hdmi">
+ <ctl name="HDMI Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback6 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-hdmi">
+ <path name="compress-offload-playback6 hdmi" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-display-port">
+ <path name="compress-offload-playback6 display-port" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-usb-headphones">
+ <path name="compress-offload-playback6 usb-headphones" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-headphones">
+ <path name="compress-offload-playback6 headphones" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-bt-sco">
+ <path name="compress-offload-playback6 bt-sco" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback6 bt-sco-wb" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback7">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 hdmi">
+ <ctl name="HDMI Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback7 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-hdmi">
+ <path name="compress-offload-playback7 hdmi" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-display-port">
+ <path name="compress-offload-playback7 display-port" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-usb-headphones">
+ <path name="compress-offload-playback7 usb-headphones" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-headphones">
+ <path name="compress-offload-playback7 headphones" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-bt-sco">
+ <path name="compress-offload-playback7 bt-sco" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback7 bt-sco-wb" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback8">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 hdmi">
+ <ctl name="HDMI Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback8 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-hdmi">
+ <path name="compress-offload-playback8 hdmi" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-display-port">
+ <path name="compress-offload-playback8 display-port" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-usb-headphones">
+ <path name="compress-offload-playback8 usb-headphones" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-headphones">
+ <path name="compress-offload-playback8 headphones" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-bt-sco">
+ <path name="compress-offload-playback8 bt-sco" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback8 bt-sco-wb" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback9">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 hdmi">
+ <ctl name="HDMI Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-offload-playback9 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-hdmi">
+ <path name="compress-offload-playback9 hdmi" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-display-port">
+ <path name="compress-offload-playback9 display-port" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-usb-headphones">
+ <path name="compress-offload-playback9 usb-headphones" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-headphones">
+ <path name="compress-offload-playback9 headphones" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-bt-sco">
+ <path name="compress-offload-playback9 bt-sco" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback9 bt-sco-wb" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="audio-record">
+ <ctl name="MultiMedia1 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="audio-record usb-headset-mic">
+ <ctl name="MultiMedia1 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="audio-record bt-sco">
+ <ctl name="MultiMedia1 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="audio-record bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-record bt-sco" />
+ </path>
+
+ <path name="audio-record capture-fm">
+ <ctl name="MultiMedia1 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="audio-record-compress">
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="audio-record-compress bt-sco">
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="audio-record-compress bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-record-compress bt-sco" />
+ </path>
+
+ <path name="audio-record-compress usb-headset-mic">
+ <ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record">
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record bt-sco">
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="low-latency-record bt-sco" />
+ </path>
+
+ <path name="low-latency-record usb-headset-mic">
+ <ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record capture-fm">
+ <ctl name="MultiMedia8 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="fm-virtual-record capture-fm">
+ <ctl name="MultiMedia2 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="play-fm">
+ <ctl name="SLIMBUS_8 LOOPBACK Volume" value="1" />
+ <ctl name="INT4_MI2S_RX Port Mixer SLIM_8_TX" value="1" />
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="play-fm headphones">
+ <ctl name="SLIMBUS_8 LOOPBACK Volume" value="1" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_8_TX" value="1" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="incall-rec-uplink">
+ <ctl name="MultiMedia1 Mixer VOC_REC_UL" value="1" />
+ </path>
+
+ <path name="incall-rec-uplink bt-sco">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink bt-sco-wb">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink usb-headset-mic">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink afe-proxy">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink-compress">
+ <ctl name="MultiMedia8 Mixer VOC_REC_UL" value="1" />
+ </path>
+
+ <path name="incall-rec-uplink-compress bt-sco">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-compress bt-sco-wb">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-compress usb-headset-mic">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-compress afe-proxy">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink">
+ <ctl name="MultiMedia1 Mixer VOC_REC_DL" value="1" />
+ </path>
+
+ <path name="incall-rec-downlink bt-sco">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink bt-sco-wb">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink usb-headset-mic">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink afe-proxy">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink-compress">
+ <ctl name="MultiMedia8 Mixer VOC_REC_DL" value="1" />
+ </path>
+
+ <path name="incall-rec-downlink-compress bt-sco">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink-compress bt-sco-wb">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink-compress usb-headset-mic">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink-compress afe-proxy">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink">
+ <path name="incall-rec-uplink" />
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink bt-sco">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink bt-sco-wb">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink usb-headset-mic">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink afe-proxy">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress">
+ <path name="incall-rec-uplink-compress" />
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress bt-sco">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress bt-sco-wb">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress usb-headset-mic">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress afe-proxy">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="hfp-sco">
+ <ctl name="HFP_SLIM7_UL_HL Switch" value="1" />
+ <ctl name="INT4_MI2S_RX Port Mixer SLIM_7_TX" value="1" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia6" value="1" />
+ <ctl name="MultiMedia6 Mixer INT3_MI2S_TX" value="1" />
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="hfp-sco headphones">
+ <ctl name="HFP_SLIM7_UL_HL Switch" value="1" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_7_TX" value="1" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia6" value="1" />
+ <ctl name="MultiMedia6 Mixer INT3_MI2S_TX" value="1" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="hfp-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="hfp-sco" />
+ </path>
+
+ <path name="hfp-sco-wb headphones">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="hfp-sco headphones" />
+ </path>
+
+ <path name="compress-voip-call">
+ <ctl name="INT4_MI2S_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call bt-a2dp">
+ <ctl name="SLIM_7_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call handset">
+ <ctl name="INT0_MI2S_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call headphones">
+ <ctl name="INT0_MI2S_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call bt-sco">
+ <ctl name="SLIM_7_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer SLIM_7_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="compress-voip-call bt-sco" />
+ </path>
+
+ <path name="compress-voip-call afe-proxy">
+ <ctl name="AFE_PCM_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer AFE_PCM_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call usb-headphones">
+ <ctl name="USB_AUDIO_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call usb-headset">
+ <ctl name="USB_AUDIO_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer USB_AUDIO_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call voice-speaker-vbat">
+ <path name="echo-reference speaker-vbat-mono" />
+ <path name="compress-voip-call"/>
+ </path>
+
+ <path name="compress-voip-call voice-speaker-2-vbat">
+ <path name="echo-reference speaker-vbat-mono-2" />
+ <path name="compress-voip-call"/>
+ </path>
+
+ <path name="voicemmode1-call">
+ <ctl name="INT4_MI2S_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call handset">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call headphones">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call hdmi">
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call bt-sco">
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer SLIM_7_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="voicemmode1-call bt-sco" />
+ </path>
+
+ <path name="voicemmode1-call afe-proxy">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call usb-headphones">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call usb-headset">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer USB_AUDIO_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call voice-speaker-vbat">
+ <path name="echo-reference speaker-vbat-mono" />
+ <path name="voicemmode1-call"/>
+ </path>
+
+ <path name="voicemmode1-call voice-speaker-2-vbat">
+ <path name="echo-reference speaker-vbat-mono-2" />
+ <path name="voicemmode1-call"/>
+ </path>
+
+ <path name="voicemmode2-call">
+ <ctl name="INT4_MI2S_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call handset">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call headphones">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call hdmi">
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call bt-sco">
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer SLIM_7_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="voicemmode2-call bt-sco" />
+ </path>
+
+ <path name="voicemmode2-call afe-proxy">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer AFE_PCM_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call usb-headphones">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call usb-headset">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer USB_AUDIO_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call voice-speaker-vbat">
+ <path name="echo-reference speaker-vbat-mono" />
+ <path name="voicemmode2-call"/>
+ </path>
+
+ <path name="voicemmode2-call voice-speaker-2-vbat">
+ <path name="echo-reference speaker-vbat-mono-2" />
+ <path name="voicemmode2-call"/>
+ </path>
+
+ <!-- VoIP Rx settings -->
+ <path name="audio-playback-voip">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip handset">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-playback-voip bt-sco" />
+ </path>
+
+ <path name="audio-playback-voip afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip speaker-and-display-port">
+ <path name="audio-playback-voip display-port" />
+ <path name="audio-playback-voip" />
+ </path>
+
+ <!-- VoIP Tx settings -->
+ <path name="audio-record-voip">
+ <ctl name="MultiMedia10 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="audio-record-voip usb-headset-mic">
+ <ctl name="MultiMedia10 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="audio-record-voip bt-sco">
+ <ctl name="MultiMedia10 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="audio-record-voip bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-record-voip bt-sco" />
+ </path>
+
+ <path name="spkr-rx-calib">
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="spkr-vi-record">
+ </path>
+
+ <!-- These are actual sound device specific mixer settings -->
+ <path name="adc1">
+ <ctl name="ADC1 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
+ </path>
+
+ <path name="adc2">
+ <ctl name="ADC2 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP2" />
+ </path>
+
+ <path name="adc3">
+ <ctl name="ADC3 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP3" />
+ </path>
+
+ <!-- DMIC numbered from 1 to 4 -->
+ <path name="dmic1">
+ <ctl name="DEC1 MUX" value="DMIC1" />
+ </path>
+
+ <path name="dmic2">
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ </path>
+
+ <path name="dmic3">
+ <ctl name="DEC1 MUX" value="DMIC3" />
+ </path>
+
+ <path name="dmic4">
+ <ctl name="DEC1 MUX" value="DMIC4" />
+ </path>
+
+ <path name="speaker">
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="RX4 MIX1 INP1" value="RX4" />
+ <ctl name="COMP1 Switch" value="1" />
+ <ctl name="SpkrLeft COMP Switch" value="1" />
+ <ctl name="SpkrLeft BOOST Switch" value="1" />
+ <ctl name="SpkrLeft VISENSE Switch" value="1" />
+ <ctl name="SpkrLeft SWR DAC_Port Switch" value="1" />
+ <ctl name="SpkrLeft WSA PA Mute" value="0" />
+ </path>
+
+ <path name="speaker-mono">
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="RX4 MIX1 INP1" value="RX4" />
+ <ctl name="COMP1 Switch" value="1" />
+ <ctl name="SpkrLeft COMP Switch" value="1" />
+ <ctl name="SpkrLeft BOOST Switch" value="1" />
+ <ctl name="SpkrLeft VISENSE Switch" value="1" />
+ <ctl name="SpkrLeft SWR DAC_Port Switch" value="1" />
+ <ctl name="SpkrLeft WSA PA Mute" value="0" />
+ </path>
+
+ <path name="speaker-mono-2">
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="RX5 MIX1 INP1" value="RX4" />
+ <ctl name="COMP2 Switch" value="1" />
+ <ctl name="SpkrRight COMP Switch" value="1" />
+ <ctl name="SpkrRight BOOST Switch" value="1" />
+ <ctl name="SpkrRight VISENSE Switch" value="1" />
+ <ctl name="SpkrRight SWR DAC_Port Switch" value="1" />
+ <ctl name="SpkrRight WSA PA Mute" value="0" />
+ </path>
+
+ <path name="speaker-fluid">
+ <path name="speaker-mono" />
+ </path>
+
+ <path name="speaker-liquid">
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-vbat-mono">
+ <path name="speaker-mono" />
+ </path>
+
+ <path name="speaker-vbat-mono-2">
+ <path name="speaker-mono-2" />
+ </path>
+
+ <path name="speaker-vbat">
+ <path name="speaker" />
+ </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="RX1 MIX2 INP1" value="IIR1" />
+ <ctl name="RX2 MIX2 INP1" value="IIR1" />
+ <ctl name="IIR1 INP1 Volume" value="53" />
+ </path>
+
+ <path name="sidetone-handset">
+ <path name="sidetone-iir" />
+ <ctl name="IIR1 INP1 Volume" value="53" />
+ <ctl name="RX1 MIX2 INP1" value="IIR1" />
+ </path>
+
+ <path name="speaker-mic">
+ <path name="adc1" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="speaker-mic-liquid">
+ <path name="dmic2" />
+ </path>
+
+ <path name="speaker-mic-sbc">
+ </path>
+
+ <path name="speaker-protected">
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_1" value="1" />
+ <path name="speaker" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="INT5_MI2S_TX" />
+ </path>
+
+ <path name="voice-speaker-protected">
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_1" value="1" />
+ <path name="speaker-mono" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="INT5_MI2S_TX" />
+ </path>
+
+ <path name="voice-speaker-2-protected">
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_2" value="1" />
+ <path name="speaker-mono-2" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="INT5_MI2S_TX" />
+ <ctl name="INT5 MI2S VI MONO" value="Right" />
+ </path>
+
+ <path name="vi-feedback">
+ </path>
+
+ <path name="vi-feedback-mono-1">
+ </path>
+
+ <path name="vi-feedback-mono-2">
+ </path>
+
+ <path name="speaker-protected-vbat">
+ <path name="speaker-protected" />
+ </path>
+
+ <path name="voice-speaker-protected-vbat">
+ <path name="voice-speaker-protected" />
+ </path>
+
+ <path name="voice-speaker-2-protected-vbat">
+ <path name="voice-speaker-2-protected" />
+ </path>
+
+ <path name="handset">
+ <ctl name="INT0_MI2S_RX Channels" value="One" />
+ <ctl name="EAR PA Boost" value="DISABLE" />
+ <ctl name="RX1 MIX1 INP1" value="RX1" />
+ <ctl name="RDAC2 MUX" value="RX1" />
+ <ctl name="EAR_S" value="Switch" />
+ </path>
+
+ <path name="handset-mic">
+ <path name="adc1" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="handset-mic-db">
+ </path>
+
+ <path name="handset-mic-cdp">
+ <path name="adc1" />
+ </path>
+
+ <path name="handset-mic-sbc">
+ </path>
+
+ <path name="three-mic">
+ </path>
+
+ <path name="anc-handset">
+ </path>
+
+ <path name="headphones">
+ <ctl name="INT0_MI2S_RX Channels" value="Two" />
+ <ctl name="RX1 MIX1 INP1" value="RX1" />
+ <ctl name="RX2 MIX1 INP1" value="RX2" />
+ <ctl name="RDAC2 MUX" value="RX2" />
+ <ctl name="RX HPH Mode" value="HD2" />
+ <ctl name="COMP0 RX1" value="1" />
+ <ctl name="COMP0 RX2" value="1" />
+ <ctl name="HPHL" value="Switch" />
+ <ctl name="HPHR" value="Switch" />
+ </path>
+
+ <path name="headphones-44.1">
+ <path name="headphones" />
+ </path>
+
+ <path name="true-native-mode">
+ </path>
+
+ <path name="line">
+ <path name="headphones" />
+ </path>
+
+ <path name="headset-mic">
+ <path name="adc2" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="headset-mic-liquid">
+ <path name="adc2" />
+ </path>
+
+ <path name="voice-handset">
+ <path name="handset" />
+ </path>
+
+ <path name="voice-handset-tmus">
+ <path name="handset" />
+ </path>
+
+ <path name="voice-speaker">
+ <path name="speaker-mono" />
+ </path>
+
+ <path name="voice-speaker-2">
+ <path name="speaker-mono-2" />
+ </path>
+
+ <path name="voice-speaker-fluid">
+ <path name="speaker-fluid" />
+ </path>
+
+ <path name="voice-speaker-mic">
+ <path name="speaker-mic" />
+ </path>
+
+ <path name="voice-speaker-vbat">
+ <path name="speaker-vbat-mono" />
+ </path>
+
+ <path name="voice-speaker-2-vbat">
+ <path name="speaker-vbat-mono-2" />
+ </path>
+
+ <path name="voice-headphones">
+ <path name="headphones" />
+ </path>
+
+ <path name="voice-line">
+ <path name="voice-headphones" />
+ </path>
+
+ <path name="voice-headset-mic">
+ <path name="headset-mic" />
+ </path>
+
+ <path name="speaker-and-headphones">
+ <path name="headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-and-line">
+ <path name="speaker-and-headphones" />
+ </path>
+
+ <path name="speaker-and-headphones-liquid">
+ <path name="headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-and-line-liquid">
+ <path name="speaker-and-headphones-liquid" />
+ </path>
+
+ <path name="usb-headphones">
+ </path>
+
+ <path name="usb-headset">
+ </path>
+
+ <path name="afe-proxy">
+ </path>
+
+ <path name="anc-headphones">
+ <path name="headphones" />
+ </path>
+
+ <path name="speaker-and-anc-headphones">
+ <path name="anc-headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="anc-fb-headphones">
+ <path name="anc-headphones" />
+ </path>
+
+ <path name="speaker-and-anc-fb-headphones">
+ <path name="anc-fb-headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="voice-anc-headphones">
+ <path name="voice-headphones" />
+ </path>
+
+ <path name="voice-anc-fb-headphones">
+ <path name="voice-headphones" />
+ </path>
+
+ <path name="speaker-and-anc-headphones-liquid">
+ <path name="anc-headphones" />
+ </path>
+
+ <path name="hdmi">
+ </path>
+
+ <path name="display-port">
+ </path>
+
+ <path name="speaker-and-usb-headphones">
+ <path name="speaker" />
+ <path name="usb-headphones" />
+ </path>
+
+ <path name="speaker-and-hdmi">
+ <path name="speaker" />
+ <path name="hdmi" />
+ </path>
+
+ <path name="speaker-and-display-port">
+ <path name="speaker" />
+ <path name="display-port" />
+ </path>
+
+ <path name="voice-rec-mic">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="camcorder-mic">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="hdmi-tx">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="bt-sco-headset">
+ </path>
+
+ <path name="bt-sco-mic">
+ </path>
+
+ <path name="bt-sco-headset-wb">
+ </path>
+
+ <path name="bt-sco-mic-wb">
+ </path>
+
+ <path name="usb-headset-mic">
+ </path>
+
+ <path name="capture-fm">
+ </path>
+
+ <path name="aanc-path">
+ </path>
+
+ <path name="aanc-handset-mic">
+ </path>
+
+ <!-- Dual MIC devices -->
+ <path name="handset-dmic-endfire">
+ <ctl name="ADC1 Volume" value="6" />
+ <ctl name="ADC3 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
+ <ctl name="DEC2 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP3" />
+ <ctl name="INT3_MI2S_TX Channels" value="Two" />
+ </path>
+
+ <path name="speaker-dmic-endfire">
+ <ctl name="ADC1 Volume" value="6" />
+ <ctl name="ADC3 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
+ <ctl name="DEC2 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP3" />
+ <ctl name="INT3_MI2S_TX Channels" value="Two" />
+ </path>
+
+ <path name="dmic-endfire">
+ <path name="handset-dmic-endfire" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="dmic-endfire-liquid">
+ <path name="handset-dmic-endfire" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="handset-stereo-dmic-ef">
+ <path name="handset-dmic-endfire" />
+ </path>
+
+ <path name="speaker-stereo-dmic-ef">
+ <path name="speaker-dmic-endfire" />
+ </path>
+
+ <path name="voice-dmic-ef-tmus">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-dmic-ef">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-speaker-dmic-ef">
+ <path name="speaker-dmic-endfire" />
+ </path>
+
+ <path name="voice-rec-dmic-ef">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-rec-dmic-ef-fluence">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="handset-stereo-dmic-ef-liquid">
+ <path name="handset-dmic-endfire" />
+ </path>
+
+ <path name="speaker-stereo-dmic-ef-liquid">
+ <path name="speaker-dmic-endfire" />
+ </path>
+
+ <path name="voice-dmic-ef-liquid-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="voice-speaker-dmic-ef-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="voice-rec-dmic-ef-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="voice-rec-dmic-ef-fluence-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="speaker-dmic-broadside">
+ <ctl name="INT3_MI2S_TX Channels" value="Two" />
+ <ctl name="ADC1 Volume" value="6" />
+ <ctl name="ADC3 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
+ <ctl name="DEC2 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP3" />
+ </path>
+
+ <path name="dmic-broadside">
+ <path name="speaker-dmic-broadside" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="voice-speaker-dmic-broadside">
+ <path name="dmic-broadside" />
+ </path>
+
+ <!-- Quad MIC devices -->
+ <path name="speaker-qmic">
+ </path>
+
+ <path name="speaker-qmic-liquid">
+ </path>
+
+ <path name="voice-speaker-qmic">
+ <path name="speaker-qmic" />
+ </path>
+
+ <path name="quad-mic">
+ <path name="speaker-qmic" />
+ </path>
+
+ <path name="voice-speaker-qmic-liquid">
+ <path name="speaker-qmic-liquid" />
+ </path>
+
+ <path name="quad-mic-liquid">
+ <path name="speaker-qmic-liquid" />
+ </path>
+
+ <!-- TTY devices -->
+
+ <path name="tty-headphones">
+ <ctl name="RX1 MIX1 INP1" value="RX1" />
+ <ctl name="HPHL" value="Switch" />
+ </path>
+
+ <path name="voice-tty-full-headphones">
+ <ctl name="TTY Mode" value="FULL" />
+ <path name="tty-headphones" />
+ </path>
+
+ <path name="voice-tty-vco-headphones">
+ <ctl name="TTY Mode" value="VCO" />
+ <path name="tty-headphones" />
+ </path>
+
+ <path name="voice-tty-hco-handset">
+ <ctl name="TTY Mode" value="HCO" />
+ <path name="handset" />
+ </path>
+
+ <path name="voice-tty-full-headset-mic">
+ <path name="adc2" />
+ </path>
+
+ <path name="voice-tty-hco-headset-mic">
+ <path name="voice-tty-full-headset-mic" />
+ </path>
+
+ <path name="voice-tty-vco-handset-mic">
+ <path name="dmic4" />
+ </path>
+
+ <path name="unprocessed-handset-mic">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="unprocessed-mic">
+ <path name="unprocessed-handset-mic" />
+ </path>
+
+ <path name="unprocessed-stereo-mic">
+ <path name="voice-rec-dmic-ef" />
+ </path>
+
+ <path name="unprocessed-three-mic">
+ <path name="three-mic" />
+ </path>
+
+ <path name="unprocessed-quad-mic">
+ <path name="quad-mic" />
+ </path>
+
+ <path name="unprocessed-headset-mic">
+ <path name="headset-mic" />
+ </path>
+
+ <!-- USB TTY start -->
+
+ <!-- full: both end tty -->
+ <path name="voice-tty-full-usb">
+ <ctl name="TTY Mode" value="FULL" />
+ <path name="usb-headphones" />
+ </path>
+
+ <path name="voice-tty-full-usb-mic">
+ <path name="usb-headset-mic" />
+ </path>
+
+ <!-- vco, in: handset mic use existing, out: tty -->
+ <path name="voice-tty-vco-usb">
+ <ctl name="TTY Mode" value="VCO" />
+ <path name="usb-headphones" />
+ </path>
+
+ <!-- hco, in: tty, out: speaker, use existing handset -->
+ <path name="voice-tty-hco-usb-mic">
+ <path name="voice-tty-full-usb-mic" />
+ </path>
+
+ <!-- USB TTY end -->
+
+ <!-- Added for ADSP testfwk -->
+ <path name="ADSP testfwk">
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="bt-a2dp">
+ <ctl name="BT SampleRate" value="KHZ_48" />
+ <ctl name="AFE Input Channels" value="Two" />
+ <ctl name="SLIM7_RX ADM Channels" value="Two" />
+ </path>
+
+ <path name="speaker-and-bt-a2dp">
+ <path name="speaker" />
+ <path name="bt-a2dp" />
+ </path>
+
+ <path name="deep-buffer-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="low-latency-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="compress-offload-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-bt-a2dp">
+ <path name="deep-buffer-playback bt-a2dp" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-bt-a2dp">
+ <path name="compress-offload-playback bt-a2dp" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-a2dp">
+ <path name="low-latency-playback bt-a2dp" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback2 bt-a2dp" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback3 bt-a2dp" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback4 bt-a2dp" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback5 bt-a2dp" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback6 bt-a2dp" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback7 bt-a2dp" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback8 bt-a2dp" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback9 bt-a2dp" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-bt-a2dp">
+ <path name="audio-ull-playback bt-a2dp" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="mmap-playback">
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-headphones">
+ <path name="mmap-playback" />
+ <path name="mmap-playback headphones" />
+ </path>
+
+ <path name="mmap-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="16000" />
+ <path name="mmap-playback bt-sco" />
+ </path>
+
+ <path name="mmap-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-buffer-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-hdmi">
+ <path name="mmap-playback hdmi" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-playback speaker-and-display-port">
+ <path name="mmap-playback display-port" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-playback speaker-and-usb-headphones">
+ <path name="mmap-playback usb-headphones" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-record">
+ <ctl name="MultiMedia16 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco">
+ <ctl name="MultiMedia16 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="mmap-record bt-sco" />
+ </path>
+
+ <path name="mmap-record capture-fm">
+ <ctl name="MultiMedia16 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="mmap-record usb-headset-mic">
+ <ctl name="MultiMedia16 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+</mixer>
diff --git a/configs/sdm670/mixer_paths_tasha.xml b/configs/sdm670/mixer_paths_tasha.xml
index cbb74a5..4db4271 100644
--- a/configs/sdm670/mixer_paths_tasha.xml
+++ b/configs/sdm670/mixer_paths_tasha.xml
@@ -566,6 +566,10 @@
<ctl name="SLIMBUS6_DL_HL Switch" value="0" />
<!-- ADSP testfwk end-->
+ <!-- mixer control to disable lowlatency qos voting -->
+ <ctl name="MultiMedia5_RX QOS Vote" value="Disable" />
+ <!-- mixer control to disable lowlatency qos voting end -->
+
<ctl name="AFE_PCM_RX Audio Mixer MultiMedia3" value="0" />
<!-- These are audio route (FE to BE) specific mixer settings -->
@@ -669,6 +673,16 @@
<path name="deep-buffer-playback" />
</path>
+ <path name="deep-buffer-playback speaker-and-bt-sco">
+ <path name="deep-buffer-playback bt-sco" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-bt-sco-wb">
+ <path name="deep-buffer-playback bt-sco-wb" />
+ <path name="deep-buffer-playback" />
+ </path>
+
<path name="low-latency-playback">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia5" value="1" />
</path>
@@ -726,6 +740,20 @@
<path name="low-latency-playback" />
</path>
+ <path name="low-latency-playback resume">
+ <ctl name="MultiMedia5_RX QOS Vote" value="Enable" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-sco">
+ <path name="low-latency-playback bt-sco" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-sco-wb">
+ <path name="low-latency-playback bt-sco-wb" />
+ <path name="low-latency-playback" />
+ </path>
+
<path name="audio-ull-playback">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia8" value="1" />
</path>
@@ -778,6 +806,16 @@
<ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="1" />
</path>
+ <path name="audio-ull-playback speaker-and-bt-sco">
+ <path name="audio-ull-playback bt-sco" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-bt-sco-wb">
+ <path name="audio-ull-playback bt-sco-wb" />
+ <path name="audio-ull-playback" />
+ </path>
+
<path name="multi-channel-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
</path>
@@ -851,6 +889,16 @@
<path name="compress-offload-playback" />
</path>
+ <path name="compress-offload-playback speaker-and-bt-sco">
+ <path name="compress-offload-playback bt-sco" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback bt-sco-wb" />
+ <path name="compress-offload-playback" />
+ </path>
+
<path name="compress-offload-playback2">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia7" value="1" />
</path>
@@ -908,6 +956,16 @@
<path name="compress-offload-playback2" />
</path>
+ <path name="compress-offload-playback2 speaker-and-bt-sco">
+ <path name="compress-offload-playback2 bt-sco" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback2 bt-sco-wb" />
+ <path name="compress-offload-playback2" />
+ </path>
+
<path name="compress-offload-playback3">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia10" value="1" />
</path>
@@ -965,6 +1023,16 @@
<path name="compress-offload-playback3" />
</path>
+ <path name="compress-offload-playback3 speaker-and-bt-sco">
+ <path name="compress-offload-playback3 bt-sco" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback3 bt-sco-wb" />
+ <path name="compress-offload-playback3" />
+ </path>
+
<path name="compress-offload-playback4">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia11" value="1" />
</path>
@@ -1023,6 +1091,16 @@
<path name="compress-offload-playback4" />
</path>
+ <path name="compress-offload-playback4 speaker-and-bt-sco">
+ <path name="compress-offload-playback4 bt-sco" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback4 bt-sco-wb" />
+ <path name="compress-offload-playback4" />
+ </path>
+
<path name="compress-offload-playback5">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia12" value="1" />
</path>
@@ -1080,6 +1158,16 @@
<path name="compress-offload-playback5" />
</path>
+ <path name="compress-offload-playback5 speaker-and-bt-sco">
+ <path name="compress-offload-playback5 bt-sco" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback5 bt-sco-wb" />
+ <path name="compress-offload-playback5" />
+ </path>
+
<path name="compress-offload-playback6">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia13" value="1" />
</path>
@@ -1137,6 +1225,16 @@
<path name="compress-offload-playback6" />
</path>
+ <path name="compress-offload-playback6 speaker-and-bt-sco">
+ <path name="compress-offload-playback6 bt-sco" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback6 bt-sco-wb" />
+ <path name="compress-offload-playback6" />
+ </path>
+
<path name="compress-offload-playback7">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia14" value="1" />
</path>
@@ -1194,6 +1292,16 @@
<path name="compress-offload-playback7" />
</path>
+ <path name="compress-offload-playback7 speaker-and-bt-sco">
+ <path name="compress-offload-playback7 bt-sco" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback7 bt-sco-wb" />
+ <path name="compress-offload-playback7" />
+ </path>
+
<path name="compress-offload-playback8">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia15" value="1" />
</path>
@@ -1251,6 +1359,16 @@
<path name="compress-offload-playback8" />
</path>
+ <path name="compress-offload-playback8 speaker-and-bt-sco">
+ <path name="compress-offload-playback8 bt-sco" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback8 bt-sco-wb" />
+ <path name="compress-offload-playback8" />
+ </path>
+
<path name="compress-offload-playback9">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia16" value="1" />
</path>
@@ -1308,6 +1426,16 @@
<path name="compress-offload-playback9" />
</path>
+ <path name="compress-offload-playback9 speaker-and-bt-sco">
+ <path name="compress-offload-playback9 bt-sco" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback9 bt-sco-wb" />
+ <path name="compress-offload-playback9" />
+ </path>
+
<path name="audio-record">
<ctl name="MultiMedia1 Mixer SLIM_0_TX" value="1" />
</path>
@@ -2604,6 +2732,22 @@
<path name="unprocessed-handset-mic" />
</path>
+ <path name="unprocessed-stereo-mic">
+ <path name="voice-rec-dmic-ef" />
+ </path>
+
+ <path name="unprocessed-three-mic">
+ <path name="three-mic" />
+ </path>
+
+ <path name="unprocessed-quad-mic">
+ <path name="quad-mic" />
+ </path>
+
+ <path name="unprocessed-headset-mic">
+ <path name="headset-mic" />
+ </path>
+
<!-- USB TTY start -->
<!-- full: both end tty -->
@@ -2635,8 +2779,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
@@ -2753,6 +2895,84 @@
<path name="audio-ull-playback" />
</path>
+ <path name="mmap-playback">
+ <ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback headphones">
+ <ctl name="SLIMBUS_6_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-headphones">
+ <path name="mmap-playback" />
+ <path name="mmap-playback headphones" />
+ </path>
+
+ <path name="mmap-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="16000" />
+ <path name="mmap-playback bt-sco" />
+ </path>
+
+ <path name="mmap-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-buffer-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-hdmi">
+ <path name="mmap-playback hdmi" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-playback speaker-and-display-port">
+ <path name="mmap-playback display-port" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-playback speaker-and-usb-headphones">
+ <path name="mmap-playback usb-headphones" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-record">
+ <ctl name="MultiMedia16 Mixer SLIM_0_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco">
+ <ctl name="MultiMedia16 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="mmap-record bt-sco" />
+ </path>
+
+ <path name="mmap-record capture-fm">
+ <ctl name="MultiMedia16 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="mmap-record usb-headset-mic">
+ <ctl name="MultiMedia16 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
<path name="hifi-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
</path>
diff --git a/configs/sdm670/mixer_paths_tashalite.xml b/configs/sdm670/mixer_paths_tashalite.xml
index e4ea674..97b6911 100644
--- a/configs/sdm670/mixer_paths_tashalite.xml
+++ b/configs/sdm670/mixer_paths_tashalite.xml
@@ -566,6 +566,10 @@
<ctl name="SLIMBUS6_DL_HL Switch" value="0" />
<!-- ADSP testfwk end-->
+ <!-- mixer control to disable lowlatency qos voting -->
+ <ctl name="MultiMedia5_RX QOS Vote" value="Disable" />
+ <!-- mixer control to disable lowlatency qos voting end -->
+
<ctl name="AFE_PCM_RX Audio Mixer MultiMedia3" value="0" />
<!-- These are audio route (FE to BE) specific mixer settings -->
@@ -669,6 +673,16 @@
<path name="deep-buffer-playback" />
</path>
+ <path name="deep-buffer-playback speaker-and-bt-sco">
+ <path name="deep-buffer-playback bt-sco" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-bt-sco-wb">
+ <path name="deep-buffer-playback bt-sco-wb" />
+ <path name="deep-buffer-playback" />
+ </path>
+
<path name="low-latency-playback">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia5" value="1" />
</path>
@@ -726,6 +740,20 @@
<path name="low-latency-playback" />
</path>
+ <path name="low-latency-playback resume">
+ <ctl name="MultiMedia5_RX QOS Vote" value="Enable" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-sco">
+ <path name="low-latency-playback bt-sco" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-sco-wb">
+ <path name="low-latency-playback bt-sco-wb" />
+ <path name="low-latency-playback" />
+ </path>
+
<path name="audio-ull-playback">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia8" value="1" />
</path>
@@ -778,6 +806,16 @@
<ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="1" />
</path>
+ <path name="audio-ull-playback speaker-and-bt-sco">
+ <path name="audio-ull-playback bt-sco" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-bt-sco-wb">
+ <path name="audio-ull-playback bt-sco-wb" />
+ <path name="audio-ull-playback" />
+ </path>
+
<path name="multi-channel-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
</path>
@@ -851,6 +889,16 @@
<path name="compress-offload-playback" />
</path>
+ <path name="compress-offload-playback speaker-and-bt-sco">
+ <path name="compress-offload-playback bt-sco" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback bt-sco-wb" />
+ <path name="compress-offload-playback" />
+ </path>
+
<path name="compress-offload-playback2">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia7" value="1" />
</path>
@@ -908,6 +956,16 @@
<path name="compress-offload-playback2" />
</path>
+ <path name="compress-offload-playback2 speaker-and-bt-sco">
+ <path name="compress-offload-playback2 bt-sco" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback2 bt-sco-wb" />
+ <path name="compress-offload-playback2" />
+ </path>
+
<path name="compress-offload-playback3">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia10" value="1" />
</path>
@@ -965,6 +1023,16 @@
<path name="compress-offload-playback3" />
</path>
+ <path name="compress-offload-playback3 speaker-and-bt-sco">
+ <path name="compress-offload-playback3 bt-sco" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback3 bt-sco-wb" />
+ <path name="compress-offload-playback3" />
+ </path>
+
<path name="compress-offload-playback4">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia11" value="1" />
</path>
@@ -1023,6 +1091,16 @@
<path name="compress-offload-playback4" />
</path>
+ <path name="compress-offload-playback4 speaker-and-bt-sco">
+ <path name="compress-offload-playback4 bt-sco" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback4 bt-sco-wb" />
+ <path name="compress-offload-playback4" />
+ </path>
+
<path name="compress-offload-playback5">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia12" value="1" />
</path>
@@ -1080,6 +1158,16 @@
<path name="compress-offload-playback5" />
</path>
+ <path name="compress-offload-playback5 speaker-and-bt-sco">
+ <path name="compress-offload-playback5 bt-sco" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback5 bt-sco-wb" />
+ <path name="compress-offload-playback5" />
+ </path>
+
<path name="compress-offload-playback6">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia13" value="1" />
</path>
@@ -1137,6 +1225,16 @@
<path name="compress-offload-playback6" />
</path>
+ <path name="compress-offload-playback6 speaker-and-bt-sco">
+ <path name="compress-offload-playback6 bt-sco" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback6 bt-sco-wb" />
+ <path name="compress-offload-playback6" />
+ </path>
+
<path name="compress-offload-playback7">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia14" value="1" />
</path>
@@ -1194,6 +1292,16 @@
<path name="compress-offload-playback7" />
</path>
+ <path name="compress-offload-playback7 speaker-and-bt-sco">
+ <path name="compress-offload-playback7 bt-sco" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback7 bt-sco-wb" />
+ <path name="compress-offload-playback7" />
+ </path>
+
<path name="compress-offload-playback8">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia15" value="1" />
</path>
@@ -1251,6 +1359,16 @@
<path name="compress-offload-playback8" />
</path>
+ <path name="compress-offload-playback8 speaker-and-bt-sco">
+ <path name="compress-offload-playback8 bt-sco" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback8 bt-sco-wb" />
+ <path name="compress-offload-playback8" />
+ </path>
+
<path name="compress-offload-playback9">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia16" value="1" />
</path>
@@ -1308,6 +1426,16 @@
<path name="compress-offload-playback9" />
</path>
+ <path name="compress-offload-playback9 speaker-and-bt-sco">
+ <path name="compress-offload-playback9 bt-sco" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback9 bt-sco-wb" />
+ <path name="compress-offload-playback9" />
+ </path>
+
<path name="audio-record">
<ctl name="MultiMedia1 Mixer SLIM_0_TX" value="1" />
</path>
@@ -2582,6 +2710,22 @@
<path name="unprocessed-handset-mic" />
</path>
+ <path name="unprocessed-stereo-mic">
+ <path name="voice-rec-dmic-ef" />
+ </path>
+
+ <path name="unprocessed-three-mic">
+ <path name="three-mic" />
+ </path>
+
+ <path name="unprocessed-quad-mic">
+ <path name="quad-mic" />
+ </path>
+
+ <path name="unprocessed-headset-mic">
+ <path name="headset-mic" />
+ </path>
+
<!-- USB TTY start -->
<!-- full: both end tty -->
@@ -2613,8 +2757,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
@@ -2731,6 +2873,84 @@
<path name="audio-ull-playback" />
</path>
+ <path name="mmap-playback">
+ <ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback headphones">
+ <ctl name="SLIMBUS_6_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-headphones">
+ <path name="mmap-playback" />
+ <path name="mmap-playback headphones" />
+ </path>
+
+ <path name="mmap-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="16000" />
+ <path name="mmap-playback bt-sco" />
+ </path>
+
+ <path name="mmap-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-buffer-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-hdmi">
+ <path name="mmap-playback hdmi" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-playback speaker-and-display-port">
+ <path name="mmap-playback display-port" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-playback speaker-and-usb-headphones">
+ <path name="mmap-playback usb-headphones" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-record">
+ <ctl name="MultiMedia16 Mixer SLIM_0_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco">
+ <ctl name="MultiMedia16 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="mmap-record bt-sco" />
+ </path>
+
+ <path name="mmap-record capture-fm">
+ <ctl name="MultiMedia16 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="mmap-record usb-headset-mic">
+ <ctl name="MultiMedia16 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
<path name="hifi-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
</path>
diff --git a/configs/sdm670/mixer_paths_tavil.xml b/configs/sdm670/mixer_paths_tavil.xml
index f822423..d77f623 100644
--- a/configs/sdm670/mixer_paths_tavil.xml
+++ b/configs/sdm670/mixer_paths_tavil.xml
@@ -72,6 +72,9 @@
<ctl name="MultiMedia8 Mixer SLIM_0_TX" value="0" />
<ctl name="MultiMedia8 Mixer SLIM_4_TX" value="0" />
<ctl name="MultiMedia8 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer SLIM_0_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer AFE_PCM_TX" value="0" />
<ctl name="DISPLAY_PORT Mixer MultiMedia1" value="0" />
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="0" />
<ctl name="DISPLAY_PORT Mixer MultiMedia3" value="0" />
@@ -160,6 +163,7 @@
<ctl name="MultiMedia2 Mixer USB_AUDIO_TX" value="0" />
<ctl name="MultiMedia5 Mixer USB_AUDIO_TX" value="0" />
<ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="MultiMedia10 Mixer USB_AUDIO_TX" value="0" />
<ctl name="USB_AUDIO_TX Format" value="S16_LE" />
<ctl name="USB_AUDIO_TX SampleRate" value="KHZ_48" />
<ctl name="USB_AUDIO_TX Channels" value="One" />
@@ -524,6 +528,10 @@
<!-- Codec controls end -->
+ <!-- mixer control to disable lowlatency qos voting -->
+ <ctl name="MultiMedia5_RX QOS Vote" value="Disable" />
+ <!-- mixer control to disable lowlatency qos voting end -->
+
<!-- These are audio route (FE to BE) specific mixer settings -->
<path name="echo-reference">
<ctl name="AUDIO_REF_EC_UL1 MUX" value="SLIM_RX" />
@@ -588,6 +596,16 @@
<path name="deep-buffer-playback" />
</path>
+ <path name="deep-buffer-playback speaker-and-bt-sco">
+ <path name="deep-buffer-playback bt-sco" />
+ <path name="deep-buffer-playback" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-bt-sco-wb">
+ <path name="deep-buffer-playback bt-sco-wb" />
+ <path name="deep-buffer-playback" />
+ </path>
+
<path name="low-latency-playback">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia5" value="1" />
</path>
@@ -640,6 +658,20 @@
<path name="low-latency-playback" />
</path>
+ <path name="low-latency-playback resume">
+ <ctl name="MultiMedia5_RX QOS Vote" value="Enable" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-sco">
+ <path name="low-latency-playback bt-sco" />
+ <path name="low-latency-playback" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-sco-wb">
+ <path name="low-latency-playback bt-sco-wb" />
+ <path name="low-latency-playback" />
+ </path>
+
<path name="audio-ull-playback">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia8" value="1" />
</path>
@@ -687,6 +719,16 @@
<ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="1" />
</path>
+ <path name="audio-ull-playback speaker-and-bt-sco">
+ <path name="audio-ull-playback bt-sco" />
+ <path name="audio-ull-playback" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-bt-sco-wb">
+ <path name="audio-ull-playback bt-sco-wb" />
+ <path name="audio-ull-playback" />
+ </path>
+
<path name="multi-channel-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
</path>
@@ -759,6 +801,16 @@
<path name="compress-offload-playback" />
</path>
+ <path name="compress-offload-playback speaker-and-bt-sco">
+ <path name="compress-offload-playback bt-sco" />
+ <path name="compress-offload-playback" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback bt-sco-wb" />
+ <path name="compress-offload-playback" />
+ </path>
+
<path name="compress-offload-playback2">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia7" value="1" />
</path>
@@ -815,6 +867,16 @@
<path name="compress-offload-playback2" />
</path>
+ <path name="compress-offload-playback2 speaker-and-bt-sco">
+ <path name="compress-offload-playback2 bt-sco" />
+ <path name="compress-offload-playback2" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback2 bt-sco-wb" />
+ <path name="compress-offload-playback2" />
+ </path>
+
<path name="compress-offload-playback3">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia10" value="1" />
</path>
@@ -871,6 +933,16 @@
<path name="compress-offload-playback3" />
</path>
+ <path name="compress-offload-playback3 speaker-and-bt-sco">
+ <path name="compress-offload-playback3 bt-sco" />
+ <path name="compress-offload-playback3" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback3 bt-sco-wb" />
+ <path name="compress-offload-playback3" />
+ </path>
+
<path name="compress-offload-playback4">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia11" value="1" />
</path>
@@ -928,6 +1000,16 @@
<path name="compress-offload-playback4" />
</path>
+ <path name="compress-offload-playback4 speaker-and-bt-sco">
+ <path name="compress-offload-playback4 bt-sco" />
+ <path name="compress-offload-playback4" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback4 bt-sco-wb" />
+ <path name="compress-offload-playback4" />
+ </path>
+
<path name="compress-offload-playback5">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia12" value="1" />
</path>
@@ -984,6 +1066,16 @@
<path name="compress-offload-playback5" />
</path>
+ <path name="compress-offload-playback5 speaker-and-bt-sco">
+ <path name="compress-offload-playback5 bt-sco" />
+ <path name="compress-offload-playback5" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback5 bt-sco-wb" />
+ <path name="compress-offload-playback5" />
+ </path>
+
<path name="compress-offload-playback6">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia13" value="1" />
</path>
@@ -1040,6 +1132,16 @@
<path name="compress-offload-playback6" />
</path>
+ <path name="compress-offload-playback6 speaker-and-bt-sco">
+ <path name="compress-offload-playback6 bt-sco" />
+ <path name="compress-offload-playback6" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback6 bt-sco-wb" />
+ <path name="compress-offload-playback6" />
+ </path>
+
<path name="compress-offload-playback7">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia14" value="1" />
</path>
@@ -1096,6 +1198,16 @@
<path name="compress-offload-playback7" />
</path>
+ <path name="compress-offload-playback7 speaker-and-bt-sco">
+ <path name="compress-offload-playback7 bt-sco" />
+ <path name="compress-offload-playback7" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback7 bt-sco-wb" />
+ <path name="compress-offload-playback7" />
+ </path>
+
<path name="compress-offload-playback8">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia15" value="1" />
</path>
@@ -1152,6 +1264,16 @@
<path name="compress-offload-playback8" />
</path>
+ <path name="compress-offload-playback8 speaker-and-bt-sco">
+ <path name="compress-offload-playback8 bt-sco" />
+ <path name="compress-offload-playback8" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback8 bt-sco-wb" />
+ <path name="compress-offload-playback8" />
+ </path>
+
<path name="compress-offload-playback9">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia16" value="1" />
</path>
@@ -1208,6 +1330,16 @@
<path name="compress-offload-playback9" />
</path>
+ <path name="compress-offload-playback9 speaker-and-bt-sco">
+ <path name="compress-offload-playback9 bt-sco" />
+ <path name="compress-offload-playback9" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-bt-sco-wb">
+ <path name="compress-offload-playback9 bt-sco-wb" />
+ <path name="compress-offload-playback9" />
+ </path>
+
<path name="audio-record">
<ctl name="MultiMedia1 Mixer SLIM_0_TX" value="1" />
</path>
@@ -1541,6 +1673,63 @@
<ctl name="VoiceMMode2_Tx Mixer USB_AUDIO_TX_MMode2" value="1" />
</path>
+ <!-- VOIP Rx settings -->
+ <path name="audio-playback-voip">
+ <ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip headphones">
+ <ctl name="SLIMBUS_6_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-playback-voip bt-sco" />
+ </path>
+
+ <path name="audio-playback-voip afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip display-port">
+ <ctl name="DISPLAY_PORT Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="audio-playback-voip speaker-and-display-port">
+ <path name="audio-playback-voip display-port" />
+ <path name="audio-playback-voip" />
+ </path>
+
+ <!-- VoIP Tx settings -->
+ <path name="audio-record-voip">
+ <ctl name="MultiMedia10 Mixer SLIM_0_TX" value="1" />
+ </path>
+
+ <path name="audio-record-voip usb-headset-mic">
+ <ctl name="MultiMedia10 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="audio-record-voip bt-sco">
+ <ctl name="MultiMedia10 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="audio-record-voip bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="audio-record-voip bt-sco" />
+ </path>
+
<path name="spkr-rx-calib">
<ctl name="SLIMBUS_DL_HL Switch" value="1" />
</path>
@@ -2240,6 +2429,22 @@
<path name="unprocessed-handset-mic" />
</path>
+ <path name="unprocessed-stereo-mic">
+ <path name="voice-rec-dmic-ef" />
+ </path>
+
+ <path name="unprocessed-three-mic">
+ <path name="three-mic" />
+ </path>
+
+ <path name="unprocessed-quad-mic">
+ <path name="quad-mic" />
+ </path>
+
+ <path name="unprocessed-headset-mic">
+ <path name="headset-mic" />
+ </path>
+
<!-- USB TTY start -->
<!-- full: both end tty -->
@@ -2271,8 +2476,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
@@ -2389,6 +2592,84 @@
<path name="audio-ull-playback" />
</path>
+ <path name="mmap-playback">
+ <ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback headphones">
+ <ctl name="SLIMBUS_6_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-headphones">
+ <path name="mmap-playback" />
+ <path name="mmap-playback headphones" />
+ </path>
+
+ <path name="mmap-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback bt-sco-wb">
+ <ctl name="BT SampleRate" value="16000" />
+ <path name="mmap-playback bt-sco" />
+ </path>
+
+ <path name="mmap-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-buffer-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-hdmi">
+ <path name="mmap-playback hdmi" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-playback speaker-and-display-port">
+ <path name="mmap-playback display-port" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-playback speaker-and-usb-headphones">
+ <path name="mmap-playback usb-headphones" />
+ <path name="mmap-playback" />
+ </path>
+
+ <path name="mmap-record">
+ <ctl name="MultiMedia16 Mixer SLIM_0_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco">
+ <ctl name="MultiMedia16 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="mmap-record bt-sco" />
+ </path>
+
+ <path name="mmap-record capture-fm">
+ <ctl name="MultiMedia16 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="mmap-record usb-headset-mic">
+ <ctl name="MultiMedia16 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
<path name="hifi-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
</path>
diff --git a/configs/sdm670/sdm670.mk b/configs/sdm670/sdm670.mk
index d220650..cfe7517 100644
--- a/configs/sdm670/sdm670.mk
+++ b/configs/sdm670/sdm670.mk
@@ -6,7 +6,7 @@
ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
USE_CUSTOM_AUDIO_POLICY := 1
AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false
-AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true
+AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false
AUDIO_FEATURE_ENABLED_DYNAMIC_ECNS := false
AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
@@ -89,14 +89,18 @@
hardware/qcom/audio/configs/sdm670/mixer_paths_tasha.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tasha.xml \
hardware/qcom/audio/configs/sdm670/mixer_paths_tashalite.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tashalite.xml \
hardware/qcom/audio/configs/sdm670/mixer_paths_i2s.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_i2s.xml \
+ hardware/qcom/audio/configs/sdm670/mixer_paths_skuw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_skuw.xml \
+ hardware/qcom/audio/configs/sdm670/mixer_paths_360cam.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_360cam.xml \
hardware/qcom/audio/configs/sdm670/audio_tuning_mixer.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer.txt \
hardware/qcom/audio/configs/sdm670/audio_tuning_mixer_tavil.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer_tavil.txt \
hardware/qcom/audio/configs/sdm670/audio_tuning_mixer_tasha.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer_tasha.txt \
hardware/qcom/audio/configs/sdm670/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_intcodec.xml \
hardware/qcom/audio/configs/sdm670/audio_platform_info_i2s.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_i2s.xml \
hardware/qcom/audio/configs/sdm670/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
+ hardware/qcom/audio/configs/sdm670/audio_platform_info_skuw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_skuw.xml \
hardware/qcom/audio/configs/sdm670/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
hardware/qcom/audio/configs/sdm670/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
+ hardware/qcom/audio/configs/sdm670/sound_trigger_mixer_paths_skuw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_skuw.xml \
hardware/qcom/audio/configs/sdm670/sound_trigger_mixer_paths_wcd9335.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9335.xml \
hardware/qcom/audio/configs/sdm670/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
hardware/qcom/audio/configs/sdm670/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
@@ -136,6 +140,11 @@
persist.vendor.audio.fluence.voicerec=false\
persist.vendor.audio.fluence.speaker=true
+##speaker protection v3 switch and ADSP AFE API version
+PRODUCT_PROPERTY_OVERRIDES += \
+persist.vendor.audio.spv3.enable=true\
+persist.vendor.audio.avs.afe_api_version=2
+
#disable tunnel encoding
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.tunnel.encode=false
@@ -235,6 +244,10 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.offload.pstimeout.secs=3
+#Set AudioFlinger client heap size
+PRODUCT_PROPERTY_OVERRIDES += \
+ro.af.client_heap_size_kbyte=7168
+
# for HIDL related packages
PRODUCT_PACKAGES += \
android.hardware.audio@2.0-service \
diff --git a/configs/sdm670/sound_trigger_mixer_paths_skuw.xml b/configs/sdm670/sound_trigger_mixer_paths_skuw.xml
new file mode 100644
index 0000000..6497073
--- /dev/null
+++ b/configs/sdm670/sound_trigger_mixer_paths_skuw.xml
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--- Copyright (c) 2014-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, -->
+<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
+<!--- 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="LSM1 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM2 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM3 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM4 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM5 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM6 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM7 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM8 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM1 Port" value="None" />
+ <ctl name="LSM2 Port" value="None" />
+ <ctl name="LSM3 Port" value="None" />
+ <ctl name="LSM4 Port" value="None" />
+ <ctl name="LSM5 Port" value="None" />
+ <ctl name="LSM6 Port" value="None" />
+ <ctl name="LSM7 Port" value="None" />
+ <ctl name="LSM8 Port" value="None" />
+ <ctl name="INT3_MI2S_TX LSM Function" value="None" />
+ <ctl name="DEC1 MUX" value="ZERO" />
+ <ctl name="ADC1_INP1 Switch" value="0" />
+
+ <path name="listen-voice-wakeup-1">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM1 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM1 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-2">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM2 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM2 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-3">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM3 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM3 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-4">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM4 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM4 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-5">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM5 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM5 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-6">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM6 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM6 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-7">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM7 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM7 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-8">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM8 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM8 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-1 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM1 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM1 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-2 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM2 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM2 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-3 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM3 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM3 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-4 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM4 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM4 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-5 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM5 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM5 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-6 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM6 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM6 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-7 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM7 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM7 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-8 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM8 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM8 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-ape-handset-mic">
+ <ctl name="ADC1 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
+ </path>
+
+ <path name="listen-ape-handset-mic-preproc">
+ <path name="listen-ape-handset-mic"/>
+ </path>
+
+ <path name="echo-reference">
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="INT4_MI2S_RX"/>
+ <ctl name="EC Reference Channels" value="Two"/>
+ <ctl name="EC Reference Bit Format" value="S16_LE"/>
+ <ctl name="EC Reference SampleRate" value="48000"/>
+ </path>
+
+
+</mixer>
diff --git a/configs/sdm845/mixer_paths_qvr.xml b/configs/sdm845/mixer_paths_qvr.xml
index 65ce1b3..d552852 100644
--- a/configs/sdm845/mixer_paths_qvr.xml
+++ b/configs/sdm845/mixer_paths_qvr.xml
@@ -2463,8 +2463,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm845/mixer_paths_skuk.xml b/configs/sdm845/mixer_paths_skuk.xml
index 242fa57..d59b25e 100644
--- a/configs/sdm845/mixer_paths_skuk.xml
+++ b/configs/sdm845/mixer_paths_skuk.xml
@@ -2164,8 +2164,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm845/mixer_paths_tavil.xml b/configs/sdm845/mixer_paths_tavil.xml
index 8a6360b..d5d2878 100644
--- a/configs/sdm845/mixer_paths_tavil.xml
+++ b/configs/sdm845/mixer_paths_tavil.xml
@@ -1841,6 +1841,10 @@
<path name="speaker-mono-2" />
</path>
+ <path name="speaker-hdk">
+ <path name="speaker-mono" />
+ </path>
+
<path name="speaker-fluid">
<path name="speaker-mono" />
</path>
@@ -2063,6 +2067,14 @@
<path name="handset-qrd" />
</path>
+ <path name="voice-handset-hdk">
+ <path name="handset-qrd" />
+ </path>
+
+ <path name="voice-handset-tmus-hdk">
+ <path name="handset-qrd" />
+ </path>
+
<path name="voice-speaker">
<path name="speaker-mono" />
</path>
@@ -2071,6 +2083,10 @@
<path name="speaker-mono-2" />
</path>
+ <path name="voice-speaker-hdk">
+ <path name="speaker-mono" />
+ </path>
+
<path name="voice-speaker-2">
<path name="speaker-mono-2" />
</path>
@@ -2412,6 +2428,11 @@
<path name="handset-qrd" />
</path>
+ <path name="voice-tty-hco-handset-hdk">
+ <ctl name="TTY Mode" value="HCO" />
+ <path name="handset-qrd" />
+ </path>
+
<path name="voice-tty-full-headset-mic">
<path name="amic2" />
<ctl name="ADC2 Volume" value="0" />
@@ -2480,8 +2501,6 @@
</path>
<path name="bt-a2dp">
- <ctl name="BT SampleRate" value="KHZ_48" />
- <ctl name="AFE Input Channels" value="Two" />
<ctl name="SLIM7_RX ADM Channels" value="Two" />
</path>
diff --git a/configs/sdm845/sdm845.mk b/configs/sdm845/sdm845.mk
index e6f2b3d..83751da 100644
--- a/configs/sdm845/sdm845.mk
+++ b/configs/sdm845/sdm845.mk
@@ -219,6 +219,18 @@
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
+
+#Set HAL buffer size to 3 ms
+PRODUCT_PROPERTY_OVERRIDES += \
+vendor.audio_hal.period_multiplier=3
+
+#ADM Buffering size in ms
+PRODUCT_PROPERTY_OVERRIDES += \
+vendor.audio.adm.buffering.ms=2
+
# for HIDL related packages
PRODUCT_PACKAGES += \
android.hardware.audio@2.0-service \
diff --git a/configure.ac b/configure.ac
index 9a17458..805d00c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,6 +75,7 @@
fi
AC_SUBST([TARGET_CFLAGS])
+AM_CONDITIONAL([QTI_AUDIO_SERVER_ENABLED],[test x$BOARD_SUPPORTS_QTI_AUDIO_SERVER = xtrue])
AM_CONDITIONAL([QAHW_SUPPORT], [test x$BOARD_SUPPORTS_QAHW = xtrue])
AM_CONDITIONAL([HDMI_EDID], [test x$AUDIO_FEATURE_ENABLED_HDMI_EDID = xtrue])
AM_CONDITIONAL([FM_POWER_OPT], [test x$AUDIO_FEATURE_ENABLED_FM_POWER_OPT = xtrue])
diff --git a/hal/Android.mk b/hal/Android.mk
index cbf766a..9b320f0 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -8,7 +8,7 @@
AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM)
-ifneq ($(filter msm8974 msm8226 msm8610 apq8084 msm8994 msm8992 msm8996 msm8998 apq8098_latv sdm845 sdm670,$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter msm8974 msm8226 msm8610 apq8084 msm8994 msm8992 msm8996 msm8998 apq8098_latv sdm845 sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
# B-family platform uses msm8974 code base
AUDIO_PLATFORM = msm8974
MULTIPLE_HW_VARIANTS_ENABLED := true
@@ -39,6 +39,9 @@
ifneq ($(filter sdm670,$(TARGET_BOARD_PLATFORM)),)
LOCAL_CFLAGS := -DPLATFORM_SDM670
endif
+ifneq ($(filter qcs605,$(TARGET_BOARD_PLATFORM)),)
+ LOCAL_CFLAGS := -DPLATFORM_QCS605
+endif
endif
ifneq ($(filter msm8916 msm8909 msm8952 msm8937 thorium msm8953 msmgold sdm660,$(TARGET_BOARD_PLATFORM)),)
@@ -65,6 +68,11 @@
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+ifneq ($(filter sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
+ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
+ LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
+endif
+
LOCAL_CFLAGS += -DUSE_VENDOR_EXTN
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_EDID)),true)
@@ -261,6 +269,11 @@
LOCAL_SRC_FILES += audio_extn/a2dp.c
endif
+ifeq ($(strip $(AUDIO_FEATURE_IP_HDLR_ENABLED)),true)
+ LOCAL_CFLAGS += -DAUDIO_EXTN_IP_HDLR_ENABLED
+ LOCAL_SRC_FILES += audio_extn/ip_hdlr_intf.c
+endif
+
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_QAF)),true)
LOCAL_CFLAGS += -DQAF_EXTN_ENABLED
LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/qaf/
@@ -363,11 +376,6 @@
LOCAL_SHARED_LIBRARIES += libaudio_log_utils
endif
-ifeq ($(strip $($AUDIO_FEATURE_IP_HDLR_ENABLED)),true)
- LOCAL_CFLAGS += -DAUDIO_EXTN_IP_HDLR_ENABLED
- LOCAL_SRC_FILES += audio_extn/ip_hdlr_intf.c
-endif
-
ifeq ($(strip $($AUDIO_FEATURE_ENABLED_DYNAMIC_ECNS)),true)
LOCAL_CFLAGS += -DDYNAMIC_ECNS_ENABLED
endif
diff --git a/hal/audio_extn/a2dp.c b/hal/audio_extn/a2dp.c
index 2c0c53b..1335a0e 100644
--- a/hal/audio_extn/a2dp.c
+++ b/hal/audio_extn/a2dp.c
@@ -56,6 +56,7 @@
#define ENC_MEDIA_FMT_APTX_HD 0x00013200
#define ENC_MEDIA_FMT_SBC 0x00010BF2
#define ENC_MEDIA_FMT_CELT 0x00013221
+#define ENC_MEDIA_FMT_LDAC 0x00013224
#define MEDIA_FMT_AAC_AOT_LC 2
#define MEDIA_FMT_AAC_AOT_SBR 5
#define MEDIA_FMT_AAC_AOT_PS 29
@@ -70,6 +71,9 @@
#define MEDIA_FMT_SBC_ALLOCATION_METHOD_SNR 1
#define MIXER_ENC_CONFIG_BLOCK "SLIM_7_RX Encoder Config"
#define MIXER_ENC_BIT_FORMAT "AFE Input Bit Format"
+#define MIXER_SCRAMBLER_MODE "AFE Scrambler Mode"
+#define MIXER_SAMPLE_RATE "BT SampleRate"
+#define MIXER_AFE_IN_CHANNELS "AFE Input Channels"
#define MIXER_ENC_FMT_SBC "SBC"
#define MIXER_ENC_FMT_AAC "AAC"
#define MIXER_ENC_FMT_APTX "APTX"
@@ -79,14 +83,16 @@
#define ENCODER_LATENCY_APTX 40
#define ENCODER_LATENCY_APTX_HD 20
#define ENCODER_LATENCY_AAC 70
-//To Do: Fine Tune Encoder CELT latency.
+//To Do: Fine Tune Encoder CELT/LDAC latency.
#define ENCODER_LATENCY_CELT 40
+#define ENCODER_LATENCY_LDAC 40
#define DEFAULT_SINK_LATENCY_SBC 140
#define DEFAULT_SINK_LATENCY_APTX 160
#define DEFAULT_SINK_LATENCY_APTX_HD 180
#define DEFAULT_SINK_LATENCY_AAC 180
-//To Do: Fine Tune Default CELT Latency.
+//To Do: Fine Tune Default CELT/LDAC Latency.
#define DEFAULT_SINK_LATENCY_CELT 180
+#define DEFAULT_SINK_LATENCY_LDAC 180
/*
* Below enum values are extended from audio_base.h to
@@ -95,12 +101,13 @@
* between IPC lib and Audio HAL.
*/
typedef enum {
- ENC_CODEC_TYPE_INVALID = 4294967295u, // 0xFFFFFFFFUL
- ENC_CODEC_TYPE_AAC = 67108864u, // 0x04000000UL
- ENC_CODEC_TYPE_SBC = 520093696u, // 0x1F000000UL
- ENC_CODEC_TYPE_APTX = 536870912u, // 0x20000000UL
- ENC_CODEC_TYPE_APTX_HD = 553648128u, // 0x21000000UL
+ ENC_CODEC_TYPE_INVALID = AUDIO_FORMAT_INVALID, // 0xFFFFFFFFUL
+ ENC_CODEC_TYPE_AAC = AUDIO_FORMAT_AAC, // 0x04000000UL
+ ENC_CODEC_TYPE_SBC = AUDIO_FORMAT_SBC, // 0x1F000000UL
+ ENC_CODEC_TYPE_APTX = AUDIO_FORMAT_APTX, // 0x20000000UL
+ ENC_CODEC_TYPE_APTX_HD = AUDIO_FORMAT_APTX_HD, // 0x21000000UL
ENC_CODEC_TYPE_APTX_DUAL_MONO = 570425344u, // 0x22000000UL
+ ENC_CODEC_TYPE_LDAC = AUDIO_FORMAT_LDAC, // 0x23000000UL
ENC_CODEC_TYPE_CELT = 603979776u, // 0x24000000UL
}enc_codec_t;
@@ -115,6 +122,7 @@
enc_codec_t *codec_type);
typedef int (*audio_check_a2dp_ready_t)(void);
typedef uint16_t (*audio_get_a2dp_sink_latency_t)(void);
+typedef int (*audio_is_scrambling_enabled_t)(void);
enum A2DP_STATE {
A2DP_STATE_CONNECTED,
@@ -140,9 +148,11 @@
audio_get_codec_config_t audio_get_codec_config;
audio_check_a2dp_ready_t audio_check_a2dp_ready;
audio_get_a2dp_sink_latency_t audio_get_a2dp_sink_latency;
+ audio_is_scrambling_enabled_t audio_is_scrambling_enabled;
enum A2DP_STATE bt_state;
enc_codec_t bt_encoder_format;
uint32_t enc_sampling_rate;
+ uint32_t enc_channels;
bool a2dp_started;
bool a2dp_suspended;
int a2dp_total_active_session_request;
@@ -241,6 +251,19 @@
struct aptx_v2_enc_cfg_ext_t aptx_v2_cfg;
} __packed;
+struct ldac_specific_enc_cfg_t
+{
+ uint32_t bit_rate;
+ uint16_t channel_mode;
+ uint16_t mtu;
+} __packed;
+
+struct ldac_enc_cfg_t
+{
+ struct custom_enc_cfg_t custom_cfg;
+ struct ldac_specific_enc_cfg_t ldac_cfg;
+} __packed;
+
/* In LE BT source code uses system/audio.h for below
* structure definition. To avoid multiple definition
* compilation error for audiohal in LE , masking structure
@@ -313,6 +336,17 @@
uint32_t bitrate; /*32000 - 1536000, 139500*/
} audio_celt_encoder_config;
+/* Information about BT LDAC encoder configuration
+ * This data is used between audio HAL module and
+ * BT IPC library to configure DSP encoder
+ */
+typedef struct {
+ uint32_t sampling_rate; /*44100,48000,88200,96000*/
+ uint32_t bit_rate; /*303000,606000,909000(in bits per second)*/
+ uint16_t channel_mode; /* 0, 4, 2, 1*/
+ uint16_t mtu; /*679*/
+} audio_ldac_encoder_config;
+
/*********** END of DSP configurable structures ********************/
/* API to identify DSP encoder captabilities */
@@ -346,6 +380,10 @@
ALOGD("%s: celt offload supported\n",__func__);
a2dp.is_a2dp_offload_supported = true;
break;
+ } else if (strcmp(tok, "ldac") == 0) {
+ ALOGD("%s: ldac offload supported\n",__func__);
+ a2dp.is_a2dp_offload_supported = true;
+ break;
}
tok = strtok_r(NULL, "-", &saveptr);
};
@@ -399,6 +437,8 @@
dlsym(a2dp.bt_lib_handle,"audio_check_a2dp_ready");
a2dp.audio_get_a2dp_sink_latency = (audio_get_a2dp_sink_latency_t)
dlsym(a2dp.bt_lib_handle,"audio_get_a2dp_sink_latency");
+ a2dp.audio_is_scrambling_enabled = (audio_is_scrambling_enabled_t)
+ dlsym(a2dp.bt_lib_handle,"audio_is_scrambling_enabled");
}
}
@@ -444,11 +484,138 @@
a2dp.a2dp_suspended = false;
a2dp.bt_encoder_format = ENC_CODEC_TYPE_INVALID;
a2dp.enc_sampling_rate = 48000;
+ a2dp.enc_channels = 2;
a2dp.bt_state = A2DP_STATE_DISCONNECTED;
return 0;
}
+static void a2dp_check_and_set_scrambler()
+{
+ bool scrambler_mode = false;
+ struct mixer_ctl *ctrl_scrambler_mode = NULL;
+ if (a2dp.audio_is_scrambling_enabled && (a2dp.bt_state != A2DP_STATE_DISCONNECTED))
+ scrambler_mode = a2dp.audio_is_scrambling_enabled();
+
+ if (scrambler_mode) {
+ //enable scrambler in dsp
+ ctrl_scrambler_mode = mixer_get_ctl_by_name(a2dp.adev->mixer,
+ MIXER_SCRAMBLER_MODE);
+ if (!ctrl_scrambler_mode) {
+ ALOGE(" ERROR scrambler mode mixer control not identifed");
+ return;
+ } else {
+ if (mixer_ctl_set_value(ctrl_scrambler_mode, 0, true) != 0) {
+ ALOGE("%s: Could not set scrambler mode", __func__);
+ return;
+ }
+ }
+ }
+}
+
+static void a2dp_set_backend_cfg()
+{
+ char *rate_str = NULL, *in_channels = NULL;
+ uint32_t sampling_rate = a2dp.enc_sampling_rate;
+ struct mixer_ctl *ctl_sample_rate = NULL, *ctrl_in_channels = NULL;
+
+ //For LDAC encoder open slimbus port at 96Khz for 48Khz input
+ //and 88.2Khz for 44.1Khz input.
+ if ((a2dp.bt_encoder_format == ENC_CODEC_TYPE_LDAC) &&
+ (sampling_rate == 48000 || sampling_rate == 44100 )) {
+ sampling_rate = sampling_rate *2;
+ }
+ //Configure backend sampling rate
+ switch (sampling_rate) {
+ case 44100:
+ rate_str = "KHZ_44P1";
+ break;
+ case 48000:
+ rate_str = "KHZ_48";
+ break;
+ case 88200:
+ rate_str = "KHZ_88P2";
+ break;
+ case 96000:
+ rate_str = "KHZ_96";
+ break;
+ default:
+ rate_str = "KHZ_48";
+ break;
+ }
+
+ ALOGD("%s: set backend sample rate =%s", __func__, rate_str);
+ ctl_sample_rate = mixer_get_ctl_by_name(a2dp.adev->mixer,
+ MIXER_SAMPLE_RATE);
+ if (!ctl_sample_rate) {
+ ALOGE(" ERROR backend sample rate mixer control not identifed");
+ return;
+ } else {
+ if (mixer_ctl_set_enum_by_string(ctl_sample_rate, rate_str) != 0) {
+ ALOGE("%s: Failed to set backend sample rate =%s", __func__, rate_str);
+ return;
+ }
+ }
+
+ //Configure AFE input channels
+ switch (a2dp.enc_channels) {
+ case 1:
+ in_channels = "One";
+ break;
+ case 2:
+ default:
+ in_channels = "Two";
+ break;
+ }
+
+ ALOGD("%s: set afe input channels =%d", __func__, a2dp.enc_channels);
+ ctrl_in_channels = mixer_get_ctl_by_name(a2dp.adev->mixer,
+ MIXER_AFE_IN_CHANNELS);
+ if (!ctrl_in_channels) {
+ ALOGE(" ERROR AFE input channels mixer control not identifed");
+ return;
+ } else {
+ if (mixer_ctl_set_enum_by_string(ctrl_in_channels, in_channels) != 0) {
+ ALOGE("%s: Failed to set AFE in channels =%d", __func__, a2dp.enc_channels);
+ return;
+ }
+ }
+}
+
+static void a2dp_reset_backend_cfg()
+{
+ char *rate_str = "KHZ_8", *in_channels = "Zero";
+ struct mixer_ctl *ctl_sample_rate = NULL, *ctrl_in_channels = NULL;
+
+ //reset backend sampling rate
+ ALOGD("%s: reset backend sample rate =%s", __func__, rate_str);
+ ctl_sample_rate = mixer_get_ctl_by_name(a2dp.adev->mixer,
+ MIXER_SAMPLE_RATE);
+ if (!ctl_sample_rate) {
+ ALOGE(" ERROR backend sample rate mixer control not identifed");
+ return;
+ } else {
+ if (mixer_ctl_set_enum_by_string(ctl_sample_rate, rate_str) != 0) {
+ ALOGE("%s: Failed to reset backend sample rate =%s", __func__, rate_str);
+ return;
+ }
+ }
+
+ //reset AFE input channels
+ ALOGD("%s: reset afe input channels =%s", __func__, in_channels);
+ ctrl_in_channels = mixer_get_ctl_by_name(a2dp.adev->mixer,
+ MIXER_AFE_IN_CHANNELS);
+ if (!ctrl_in_channels) {
+ ALOGE(" ERROR AFE input channels mixer control not identifed");
+ return;
+ } else {
+ if (mixer_ctl_set_enum_by_string(ctrl_in_channels, in_channels) != 0) {
+ ALOGE("%s: Failed to reset AFE in channels =%d", __func__, a2dp.enc_channels);
+ return;
+ }
+ }
+}
+
/* API to configure SBC DSP encoder */
bool configure_sbc_enc_format(audio_sbc_encoder_config *sbc_bt_cfg)
{
@@ -514,6 +681,12 @@
is_configured = true;
a2dp.bt_encoder_format = ENC_CODEC_TYPE_SBC;
a2dp.enc_sampling_rate = sbc_bt_cfg->sampling_rate;
+
+ if (sbc_dsp_cfg.channel_mode == MEDIA_FMT_SBC_CHANNEL_MODE_MONO)
+ a2dp.enc_channels = 1;
+ else
+ a2dp.enc_channels = 2;
+
ALOGV("Successfully updated SBC enc format with samplingrate: %d channelmode:%d",
sbc_dsp_cfg.sample_rate, sbc_dsp_cfg.channel_mode);
fail:
@@ -583,6 +756,7 @@
}
is_configured = true;
a2dp.bt_encoder_format = ENC_CODEC_TYPE_APTX;
+ a2dp.enc_channels = aptx_dsp_cfg.custom_cfg.num_channels;
if (!a2dp.is_aptx_dual_mono_supported) {
a2dp.enc_sampling_rate = aptx_bt_cfg->default_cfg->sampling_rate;
ALOGV("Successfully updated APTX enc format with samplingrate: %d \
@@ -655,6 +829,7 @@
is_configured = true;
a2dp.bt_encoder_format = ENC_CODEC_TYPE_APTX_HD;
a2dp.enc_sampling_rate = aptx_bt_cfg->sampling_rate;
+ a2dp.enc_channels = aptx_bt_cfg->channels;
ALOGV("Successfully updated APTX HD encformat with samplingrate: %d channels:%d",
aptx_dsp_cfg.sample_rate, aptx_dsp_cfg.num_channels);
fail:
@@ -719,6 +894,7 @@
is_configured = true;
a2dp.bt_encoder_format = ENC_CODEC_TYPE_AAC;
a2dp.enc_sampling_rate = aac_bt_cfg->sampling_rate;
+ a2dp.enc_channels = aac_bt_cfg->channels;;
ALOGV("Successfully updated AAC enc format with samplingrate: %d channels:%d",
aac_dsp_cfg.sample_rate, aac_dsp_cfg.channel_cfg);
fail:
@@ -786,11 +962,79 @@
is_configured = true;
a2dp.bt_encoder_format = ENC_CODEC_TYPE_CELT;
a2dp.enc_sampling_rate = celt_bt_cfg->sampling_rate;
+ a2dp.enc_channels = celt_bt_cfg->channels;
ALOGV("Successfully updated CELT encformat with samplingrate: %d channels:%d",
celt_dsp_cfg.custom_cfg.sample_rate, celt_dsp_cfg.custom_cfg.num_channels);
fail:
return is_configured;
}
+
+bool configure_ldac_enc_format(audio_ldac_encoder_config *ldac_bt_cfg)
+{
+ struct mixer_ctl *ldac_enc_data = NULL, *ctrl_bit_format = NULL;
+ struct ldac_enc_cfg_t ldac_dsp_cfg;
+ bool is_configured = false;
+ int ret = 0;
+ if(ldac_bt_cfg == NULL)
+ return false;
+
+ ldac_enc_data = mixer_get_ctl_by_name(a2dp.adev->mixer, MIXER_ENC_CONFIG_BLOCK);
+ if (!ldac_enc_data) {
+ ALOGE(" ERROR a2dp encoder CONFIG data mixer control not identifed");
+ is_configured = false;
+ goto fail;
+ }
+ memset(&ldac_dsp_cfg, 0x0, sizeof(struct ldac_enc_cfg_t));
+
+ ldac_dsp_cfg.custom_cfg.enc_format = ENC_MEDIA_FMT_LDAC;
+ ldac_dsp_cfg.custom_cfg.sample_rate = ldac_bt_cfg->sampling_rate;
+ ldac_dsp_cfg.ldac_cfg.channel_mode = ldac_bt_cfg->channel_mode;
+ switch(ldac_dsp_cfg.ldac_cfg.channel_mode) {
+ case 4:
+ ldac_dsp_cfg.custom_cfg.channel_mapping[0] = PCM_CHANNEL_C;
+ ldac_dsp_cfg.custom_cfg.num_channels = 1;
+ break;
+ case 2:
+ case 1:
+ default:
+ ldac_dsp_cfg.custom_cfg.channel_mapping[0] = PCM_CHANNEL_L;
+ ldac_dsp_cfg.custom_cfg.channel_mapping[1] = PCM_CHANNEL_R;
+ ldac_dsp_cfg.custom_cfg.num_channels = 2;
+ break;
+ }
+
+ ldac_dsp_cfg.custom_cfg.custom_size = sizeof(struct ldac_enc_cfg_t);
+ ldac_dsp_cfg.ldac_cfg.mtu = ldac_bt_cfg->mtu;
+ ldac_dsp_cfg.ldac_cfg.bit_rate = ldac_bt_cfg->bit_rate;
+ ret = mixer_ctl_set_array(ldac_enc_data, (void *)&ldac_dsp_cfg,
+ sizeof(struct ldac_enc_cfg_t));
+ if (ret != 0) {
+ ALOGE("%s: Failed to set LDAC encoder config", __func__);
+ is_configured = false;
+ goto fail;
+ }
+ ctrl_bit_format = mixer_get_ctl_by_name(a2dp.adev->mixer, MIXER_ENC_BIT_FORMAT);
+ if (!ctrl_bit_format) {
+ ALOGE(" ERROR bit format CONFIG data mixer control not identifed");
+ is_configured = false;
+ goto fail;
+ }
+ ret = mixer_ctl_set_enum_by_string(ctrl_bit_format, "S16_LE");
+ if (ret != 0) {
+ ALOGE("%s: Failed to set bit format to encoder", __func__);
+ is_configured = false;
+ goto fail;
+ }
+ is_configured = true;
+ a2dp.bt_encoder_format = ENC_CODEC_TYPE_LDAC;
+ a2dp.enc_sampling_rate = ldac_bt_cfg->sampling_rate;
+ a2dp.enc_channels = ldac_dsp_cfg.custom_cfg.num_channels;
+ ALOGV("Successfully updated LDAC encformat with samplingrate: %d channels:%d",
+ ldac_dsp_cfg.custom_cfg.sample_rate, ldac_dsp_cfg.custom_cfg.num_channels);
+fail:
+ return is_configured;
+}
+
bool configure_a2dp_encoder_format()
{
void *codec_info = NULL;
@@ -842,6 +1086,11 @@
is_configured =
configure_celt_enc_format((audio_celt_encoder_config *)codec_info);
break;
+ case ENC_CODEC_TYPE_LDAC:
+ ALOGD(" Received LDAC encoder supported BT device");
+ is_configured =
+ configure_ldac_enc_format((audio_ldac_encoder_config *)codec_info);
+ break;
default:
ALOGD(" Received Unsupported encoder formar");
is_configured = false;
@@ -889,8 +1138,11 @@
}
}
- if (a2dp.a2dp_started)
+ if (a2dp.a2dp_started) {
a2dp.a2dp_total_active_session_request++;
+ a2dp_check_and_set_scrambler();
+ a2dp_set_backend_cfg();
+ }
ALOGD("start A2DP playback total active sessions :%d",
a2dp.a2dp_total_active_session_request);
@@ -947,6 +1199,7 @@
else
ALOGV("stop steam to BT IPC lib successful");
reset_a2dp_enc_config_params();
+ a2dp_reset_backend_cfg();
}
if(!a2dp.a2dp_total_active_session_request)
a2dp.a2dp_started = false;
@@ -969,9 +1222,9 @@
ret = str_parms_get_str(parms, AUDIO_PARAMETER_DEVICE_CONNECT, value,
sizeof(value));
- if( ret >= 0) {
+ if (ret >= 0) {
val = atoi(value);
- if (val & AUDIO_DEVICE_OUT_ALL_A2DP) {
+ if (audio_is_a2dp_out_device(val)) {
ALOGV("Received device connect request for A2DP");
open_a2dp_output();
}
@@ -981,9 +1234,9 @@
ret = str_parms_get_str(parms, AUDIO_PARAMETER_DEVICE_DISCONNECT, value,
sizeof(value));
- if( ret >= 0) {
+ if (ret >= 0) {
val = atoi(value);
- if (val & AUDIO_DEVICE_OUT_ALL_A2DP) {
+ if (audio_is_a2dp_out_device(val)) {
ALOGV("Received device dis- connect request");
reset_a2dp_enc_config_params();
close_a2dp_output();
@@ -1067,13 +1320,8 @@
return a2dp.is_handoff_in_progress || !a2dp.a2dp_started;
}
-void audio_extn_a2dp_get_apptype_params(uint32_t *sample_rate,
- uint32_t *bit_width)
+void audio_extn_a2dp_get_sample_rate(int *sample_rate)
{
- if(a2dp.bt_encoder_format == ENC_CODEC_TYPE_APTX_HD)
- *bit_width = 24;
- else
- *bit_width = 16;
*sample_rate = a2dp.enc_sampling_rate;
}
@@ -1117,14 +1365,15 @@
{
uint32_t latency = 0;
int avsync_runtime_prop = 0;
- int sbc_offset = 0, aptx_offset = 0, aptxhd_offset = 0, aac_offset = 0, celt_offset = 0;
+ int sbc_offset = 0, aptx_offset = 0, aptxhd_offset = 0,
+ aac_offset = 0, celt_offset = 0, ldac_offset = 0;
char value[PROPERTY_VALUE_MAX];
memset(value, '\0', sizeof(char)*PROPERTY_VALUE_MAX);
avsync_runtime_prop = property_get("vendor.audio.a2dp.codec.latency", value, NULL);
if (avsync_runtime_prop > 0) {
- if (sscanf(value, "%d/%d/%d/%d/%d",
- &sbc_offset, &aptx_offset, &aptxhd_offset, &aac_offset, &celt_offset) != 5) {
+ if (sscanf(value, "%d/%d/%d/%d/%d%d",
+ &sbc_offset, &aptx_offset, &aptxhd_offset, &aac_offset, &celt_offset, &ldac_offset) != 6) {
ALOGI("Failed to parse avsync offset params from '%s'.", value);
avsync_runtime_prop = 0;
}
@@ -1156,6 +1405,10 @@
latency = (avsync_runtime_prop > 0) ? celt_offset : ENCODER_LATENCY_CELT;
latency += (slatency <= 0) ? DEFAULT_SINK_LATENCY_CELT : slatency;
break;
+ case ENC_CODEC_TYPE_LDAC:
+ latency = (avsync_runtime_prop > 0) ? ldac_offset : ENCODER_LATENCY_LDAC;
+ latency += (slatency <= 0) ? DEFAULT_SINK_LATENCY_LDAC : slatency;
+ break;
default:
latency = 200;
break;
diff --git a/hal/audio_extn/adsp_hdlr.h b/hal/audio_extn/adsp_hdlr.h
index b265e42..1c257fc 100644
--- a/hal/audio_extn/adsp_hdlr.h
+++ b/hal/audio_extn/adsp_hdlr.h
@@ -66,7 +66,7 @@
#define audio_extn_adsp_hdlr_stream_close(handle) (0)
#define audio_extn_adsp_hdlr_stream_set_callback(handle, callback, cookie) (0)
#define audio_extn_adsp_hdlr_stream_set_param(handle, cmd, param) (0)
-#define audio_extn_adsp_hdlr_stream_register_event(stream_data, param, cb) (0)
+#define audio_extn_adsp_hdlr_stream_register_event(handle, param, cb, cookie) (0)
#define audio_extn_adsp_hdlr_stream_deregister_event(handle, param) (0)
#endif
diff --git a/hal/audio_extn/audio_defs.h b/hal/audio_extn/audio_defs.h
index 7abc89b..2a81ba1 100644
--- a/hal/audio_extn/audio_defs.h
+++ b/hal/audio_extn/audio_defs.h
@@ -122,13 +122,13 @@
uint16_t doa_speech;
uint16_t doa_noise[3];
uint8_t polar_activity[360];
-};
+} __attribute__((packed));
struct sound_focus_param {
uint16_t start_angle[MAX_SECTORS];
uint8_t enable[MAX_SECTORS];
uint16_t gain_step;
-};
+} __attribute__((packed));
struct aptx_dec_bt_addr {
uint32_t nap;
@@ -162,7 +162,7 @@
* timer in microseconds.
*/
uint32_t ref_timer_abs_ts_msw;
-};
+} __attribute__((packed));
/*use these for setting infine window.i.e free run mode */
#define AUDIO_MAX_RENDER_START_WINDOW 0x8000000000000000
diff --git a/hal/audio_extn/audio_extn.c b/hal/audio_extn/audio_extn.c
index c1c4460..c598990 100644
--- a/hal/audio_extn/audio_extn.c
+++ b/hal/audio_extn/audio_extn.c
@@ -611,7 +611,7 @@
{
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Playback Device Channel Map";
- int set_values[8] = {0};
+ long set_values[8] = {0};
int ret;
ALOGV("%s channel_count:%d",__func__, channel_count);
@@ -650,7 +650,7 @@
__func__, mixer_ctl_name);
return -EINVAL;
}
- ALOGV("AFE: set mapping(%d %d %d %d %d %d %d %d) for channel:%d",
+ ALOGV("AFE: set mapping(%ld %ld %ld %ld %ld %ld %ld %ld) for channel:%d",
set_values[0], set_values[1], set_values[2], set_values[3], set_values[4],
set_values[5], set_values[6], set_values[7], channel_count);
ret = mixer_ctl_set_array(ctl, set_values, channel_count);
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
index 072d202..fdab426 100644
--- a/hal/audio_extn/audio_extn.h
+++ b/hal/audio_extn/audio_extn.h
@@ -216,6 +216,7 @@
#define audio_extn_usb_get_max_channels(p) (0)
#define audio_extn_usb_get_max_bit_width(p) (0)
#define audio_extn_usb_get_sup_sample_rates(t, s, l) (0)
+#define audio_extn_usb_is_tunnel_supported() (0)
#else
void audio_extn_usb_init(void *adev);
void audio_extn_usb_deinit();
@@ -232,6 +233,7 @@
int audio_extn_usb_get_max_channels(bool playback);
int audio_extn_usb_get_max_bit_width(bool playback);
int audio_extn_usb_get_sup_sample_rates(int type, uint32_t *sr, uint32_t l);
+bool audio_extn_usb_is_tunnel_supported();
#endif
#ifndef SPLIT_A2DP_ENABLED
@@ -241,7 +243,7 @@
#define audio_extn_a2dp_set_parameters(parms) (0)
#define audio_extn_a2dp_is_force_device_switch() (0)
#define audio_extn_a2dp_set_handoff_mode(is_on) (0)
-#define audio_extn_a2dp_get_apptype_params(sample_rate,bit_width) (0)
+#define audio_extn_a2dp_get_sample_rate(sample_rate) (0)
#define audio_extn_a2dp_get_encoder_latency() (0)
#define audio_extn_a2dp_is_ready() (0)
#define audio_extn_a2dp_is_suspended() (0)
@@ -252,8 +254,7 @@
void audio_extn_a2dp_set_parameters(struct str_parms *parms);
bool audio_extn_a2dp_is_force_device_switch();
void audio_extn_a2dp_set_handoff_mode(bool is_on);
-void audio_extn_a2dp_get_apptype_params(uint32_t *sample_rate,
- uint32_t *bit_width);
+void audio_extn_a2dp_get_sample_rate(int *sample_rate);
uint32_t audio_extn_a2dp_get_encoder_latency();
bool audio_extn_a2dp_is_ready();
bool audio_extn_a2dp_is_suspended();
@@ -629,6 +630,9 @@
int audio_extn_utils_get_snd_card_num();
bool audio_extn_is_dsp_bit_width_enforce_mode_supported(audio_output_flags_t flags);
bool audio_extn_utils_is_dolby_format(audio_format_t format);
+int audio_extn_utils_get_bit_width_from_string(const char *);
+int audio_extn_utils_get_sample_rate_from_string(const char *);
+int audio_extn_utils_get_channels_from_string(const char *);
#ifdef DS2_DOLBY_DAP_ENABLED
#define LIB_DS2_DAP_HAL "vendor/lib/libhwdaphal.so"
diff --git a/hal/audio_extn/compress_in.c b/hal/audio_extn/compress_in.c
index 49997f5..305ed5b 100644
--- a/hal/audio_extn/compress_in.c
+++ b/hal/audio_extn/compress_in.c
@@ -82,7 +82,9 @@
static const audio_usecase_t cin_usecases[] = {
USECASE_AUDIO_RECORD_COMPRESS2,
USECASE_AUDIO_RECORD_COMPRESS3,
- USECASE_AUDIO_RECORD_COMPRESS4
+ USECASE_AUDIO_RECORD_COMPRESS4,
+ USECASE_AUDIO_RECORD_COMPRESS5,
+ USECASE_AUDIO_RECORD_COMPRESS6
};
static pthread_mutex_t cin_lock = PTHREAD_MUTEX_INITIALIZER;
diff --git a/hal/audio_extn/dolby.c b/hal/audio_extn/dolby.c
index fda9a1a..ffd256f 100644
--- a/hal/audio_extn/dolby.c
+++ b/hal/audio_extn/dolby.c
@@ -196,7 +196,7 @@
bool set_cache __unused)
{
int idx, i;
- int ddp_endp_params_data[2*DDP_ENDP_NUM_PARAMS + 1];
+ long ddp_endp_params_data[2*DDP_ENDP_NUM_PARAMS + 1];
int length = 0;
for(idx=0; idx<DDP_ENDP_NUM_DEVICES; idx++) {
if(ddp_endp_params[idx].device & device) {
diff --git a/hal/audio_extn/ffv.c b/hal/audio_extn/ffv.c
index cb4978f..50b776b 100644
--- a/hal/audio_extn/ffv.c
+++ b/hal/audio_extn/ffv.c
@@ -653,7 +653,7 @@
void audio_extn_ffv_append_ec_ref_dev_name(char *device_name)
{
- if (ffvmod.ec_ref_dev == AUDIO_DEVICE_OUT_AUX_LINE)
+ if (ffvmod.ec_ref_dev == AUDIO_DEVICE_OUT_LINE)
strlcat(device_name, " lineout", DEVICE_NAME_MAX_SIZE);
ALOGD("%s: ec ref dev name %s", __func__, device_name);
}
@@ -878,9 +878,9 @@
if (val & AUDIO_DEVICE_OUT_SPEAKER) {
ALOGD("%s: capture ec ref from speaker", __func__);
ffvmod.ec_ref_dev = AUDIO_DEVICE_OUT_SPEAKER;
- } else if (val & AUDIO_DEVICE_OUT_AUX_LINE) {
+ } else if (val & AUDIO_DEVICE_OUT_LINE) {
ALOGD("%s: capture ec ref from line out", __func__);
- ffvmod.ec_ref_dev = AUDIO_DEVICE_OUT_AUX_LINE;
+ ffvmod.ec_ref_dev = AUDIO_DEVICE_OUT_LINE;
} else {
ALOGE("%s: Invalid ec ref out device", __func__);
}
diff --git a/hal/audio_extn/gef.c b/hal/audio_extn/gef.c
index 0781f4c..4525f08 100644
--- a/hal/audio_extn/gef.c
+++ b/hal/audio_extn/gef.c
@@ -56,7 +56,7 @@
#ifdef AUDIO_GENERIC_EFFECT_FRAMEWORK_ENABLED
#if LINUX_ENABLED
-#define GEF_LIBRARY "/usr/lib/libqtigef.so"
+#define GEF_LIBRARY "libqtigef.so"
#else
#define GEF_LIBRARY "/vendor/lib/libqtigef.so"
#endif
@@ -109,69 +109,63 @@
void audio_extn_gef_init(struct audio_device *adev)
{
- int ret = 0;
const char* error = NULL;
ALOGV("%s: Enter with error", __func__);
memset(&gef_hal_handle, 0, sizeof(gef_data));
- ret = access(GEF_LIBRARY, R_OK);
- if (ret == 0) {
- //: check error for dlopen
- gef_hal_handle.handle = dlopen(GEF_LIBRARY, RTLD_LAZY);
- if (gef_hal_handle.handle == NULL) {
- ALOGE("%s: DLOPEN failed for %s with error %s",
- __func__, GEF_LIBRARY, dlerror());
- goto ERROR_RETURN;
- } else {
- ALOGV("%s: DLOPEN successful for %s", __func__, GEF_LIBRARY);
-
- //call dlerror to clear the error
- dlerror();
- gef_hal_handle.init =
- (gef_init_t)dlsym(gef_hal_handle.handle, "gef_init");
- error = dlerror();
-
- if(error != NULL) {
- ALOGE("%s: dlsym of %s failed with error %s",
- __func__, "gef_init", error);
- goto ERROR_RETURN;
- }
-
- //call dlerror to clear the error
- dlerror();
- gef_hal_handle.deinit =
- (gef_deinit_t)dlsym(gef_hal_handle.handle, "gef_deinit");
- error = dlerror();
-
- if(error != NULL) {
- ALOGE("%s: dlsym of %s failed with error %s",
- __func__, "gef_deinit", error);
- goto ERROR_RETURN;
- }
-
- //call dlerror to clear the error
- error = dlerror();
- gef_hal_handle.device_config_cb =
- (gef_device_config_cb_t)dlsym(gef_hal_handle.handle,
- "gef_device_config_cb");
- error = dlerror();
-
- if(error != NULL) {
- ALOGE("%s: dlsym of %s failed with error %s",
- __func__, "gef_device_config_cb", error);
- goto ERROR_RETURN;
- }
-
- gef_hal_handle.gef_ptr = gef_hal_handle.init((void*)adev);
- }
+ //: check error for dlopen
+ gef_hal_handle.handle = dlopen(GEF_LIBRARY, RTLD_LAZY);
+ if (gef_hal_handle.handle == NULL) {
+ ALOGE("%s: DLOPEN failed for %s with error %s",
+ __func__, GEF_LIBRARY, dlerror());
+ goto ERROR_RETURN;
} else {
- ALOGE("%s: %s access failed", __func__, GEF_LIBRARY);
+ ALOGV("%s: DLOPEN successful for %s", __func__, GEF_LIBRARY);
+
+ //call dlerror to clear the error
+ dlerror();
+ gef_hal_handle.init =
+ (gef_init_t)dlsym(gef_hal_handle.handle, "gef_init");
+ error = dlerror();
+
+ if(error != NULL) {
+ ALOGE("%s: dlsym of %s failed with error %s",
+ __func__, "gef_init", error);
+ goto ERROR_RETURN;
+ }
+
+ //call dlerror to clear the error
+ dlerror();
+ gef_hal_handle.deinit =
+ (gef_deinit_t)dlsym(gef_hal_handle.handle, "gef_deinit");
+ error = dlerror();
+
+ if(error != NULL) {
+ ALOGE("%s: dlsym of %s failed with error %s",
+ __func__, "gef_deinit", error);
+ goto ERROR_RETURN;
+ }
+
+ //call dlerror to clear the error
+ error = dlerror();
+ gef_hal_handle.device_config_cb =
+ (gef_device_config_cb_t)dlsym(gef_hal_handle.handle,
+ "gef_device_config_cb");
+ error = dlerror();
+
+ if(error != NULL) {
+ ALOGE("%s: dlsym of %s failed with error %s",
+ __func__, "gef_device_config_cb", error);
+ goto ERROR_RETURN;
+ }
+
+ gef_hal_handle.gef_ptr = gef_hal_handle.init((void*)adev);
}
ERROR_RETURN:
- ALOGV("%s: Exit with error %d", __func__, ret);
+ ALOGV("%s: Exit with error ", __func__);
return;
}
diff --git a/hal/audio_extn/hfp.c b/hal/audio_extn/hfp.c
index 748562a..0d9f9ae 100644
--- a/hal/audio_extn/hfp.c
+++ b/hal/audio_extn/hfp.c
@@ -55,7 +55,7 @@
#define HFP_RX_VOLUME "SEC AUXPCM LOOPBACK Volume"
#elif defined PLATFORM_MSM8996
#define HFP_RX_VOLUME "PRI AUXPCM LOOPBACK Volume"
-#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670)
+#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) || defined (PLATFORM_QCS605)
#define HFP_RX_VOLUME "SLIMBUS_7 LOOPBACK Volume"
#else
#define HFP_RX_VOLUME "Internal HFP RX Volume"
@@ -312,7 +312,7 @@
{
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "HFP TX Mute";
- uint32_t set_values[ ] = {0};
+ long set_values[ ] = {0};
ALOGI("%s: enter, state=%d", __func__, state);
diff --git a/hal/audio_extn/ip_hdlr_intf.c b/hal/audio_extn/ip_hdlr_intf.c
old mode 100644
new mode 100755
index a94e6de..ece7af3
--- a/hal/audio_extn/ip_hdlr_intf.c
+++ b/hal/audio_extn/ip_hdlr_intf.c
@@ -37,7 +37,7 @@
#endif
#ifdef LINUX_ENABLED
-#define LIB_PATH "/usr/lib/libaudio_ip_handler.so"
+#define LIB_PATH "libaudio_ip_handler.so"
#else
#define LIB_PATH "/system/vendor/lib/libaudio_ip_handler.so"
#endif
@@ -48,10 +48,14 @@
#include <dlfcn.h>
#include <cutils/log.h>
#include <sound/asound.h>
+#include <cutils/properties.h>
#include "audio_hw.h"
#include "audio_defs.h"
#include "platform.h"
+#include "audio_extn.h"
+#include "platform_api.h"
+#include "adsp_hdlr.h"
/* These values defined by ADSP */
#define ADSP_DEC_SERVICE_ID 1
@@ -136,7 +140,7 @@
return false;
}
-int audio_extn_ip_hdlr_intf_event(void *stream_handle, void *payload, void *ip_hdlr_handle)
+int audio_extn_ip_hdlr_intf_event(void *stream_handle __unused, void *payload, void *ip_hdlr_handle )
{
ALOGVV("%s:[%d] handle = %p",__func__, ip_hdlr->ref_cnt, ip_hdlr_handle);
@@ -149,7 +153,6 @@
int ret = 0;
int pcm_device_id = 0;
struct mixer_ctl *ctl = NULL;
- struct stream_out *out = (struct stream_out *)aud_sess_handle;
struct rtic_ack_param param;
struct listnode *node, *tempnode;
struct ip_hdlr_stream *stream_info;
@@ -234,7 +237,7 @@
pthread_mutex_unlock(&inout->pre_lock);
ALOGVV("%s:[%d] calling client callback", __func__, ip_hdlr->ref_cnt);
if (inout && inout->client_callback)
- inout->client_callback(AUDIO_EXTN_STREAM_CBK_EVENT_ERROR, NULL, inout->client_cookie);
+ inout->client_callback((stream_callback_event_t)AUDIO_EXTN_STREAM_CBK_EVENT_ERROR, NULL, inout->client_cookie);
pthread_mutex_unlock(&inout->lock);
break;
} else if (stream_info->stream == aud_sess_handle) {
@@ -244,7 +247,7 @@
pthread_mutex_unlock(&out->pre_lock);
ALOGVV("%s:[%d] calling client callback", __func__, ip_hdlr->ref_cnt);
if (out && out->client_callback)
- out->client_callback(AUDIO_EXTN_STREAM_CBK_EVENT_ERROR, NULL, out->client_cookie);
+ out->client_callback((stream_callback_event_t)AUDIO_EXTN_STREAM_CBK_EVENT_ERROR, NULL, out->client_cookie);
pthread_mutex_unlock(&out->lock);
break;
}
@@ -259,8 +262,6 @@
int ret = 0, fd = 0, pcm_device_id = 0;
struct audio_adsp_event *param;
struct reg_event *reg_ev;
- size_t shm_size;
- void *shm_buf;;
struct stream_out *out;
struct stream_inout *inout;
void *adsp_hdlr_stream_handle;
@@ -302,7 +303,7 @@
audio_extn_ip_hdlr_intf_event,
handle);
if (ret < 0) {
- ALOGE("%s:[%d] failed to register event",__func__, ip_hdlr->ref_cnt, ret);
+ ALOGE("%s:[%d] failed to register event %d",__func__, ip_hdlr->ref_cnt, ret);
goto done;
}
@@ -313,7 +314,7 @@
ret = snprintf(mixer_ctl_name, sizeof(mixer_ctl_name),
"Playback ION FD %d", pcm_device_id);
if (ret < 0) {
- ALOGE("%s:[%d] snprintf failed",__func__, ip_hdlr->ref_cnt, ret);
+ ALOGE("%s:[%d] snprintf failed %d",__func__, ip_hdlr->ref_cnt, ret);
goto done;
}
ALOGV("%s: fd = %d pcm_id = %d", __func__, fd, pcm_device_id);
@@ -371,11 +372,11 @@
pthread_mutex_lock(&ip_hdlr->stream_list_lock);
list_add_tail(&ip_hdlr->stream_list, &stream_info->list);
pthread_mutex_unlock(&ip_hdlr->stream_list_lock);
-done:
+
return ret;
}
-int audio_extn_ip_hdlr_intf_close(void *handle, bool is_dsp_decode, void *aud_sess_handle)
+int audio_extn_ip_hdlr_intf_close(void *handle, bool is_dsp_decode, void *aud_sess_handle __unused)
{
struct audio_adsp_event param;
void *adsp_hdlr_stream_handle;
@@ -484,7 +485,7 @@
ret = snprintf(mixer_ctl_name, sizeof(mixer_ctl_name),
"Playback ION LIB FD %d", pcm_device_id);
if (ret < 0) {
- ALOGE("%s:[%d] snprintf failed",__func__, ip_hdlr->ref_cnt, ret);
+ ALOGE("%s:[%d] snprintf failed %d", __func__, ip_hdlr->ref_cnt, ret);
goto dlclose;
}
ALOGV("%s: fd = %d pcm_id = %d", __func__, lib_fd, pcm_device_id);
diff --git a/hal/audio_extn/keep_alive.c b/hal/audio_extn/keep_alive.c
index dad4946..698d8d0 100644
--- a/hal/audio_extn/keep_alive.c
+++ b/hal/audio_extn/keep_alive.c
@@ -30,6 +30,7 @@
#define LOG_TAG "keep_alive"
/*#define LOG_NDEBUG 0*/
+#include <cutils/properties.h>
#include <stdlib.h>
#include <cutils/log.h>
#include "audio_hw.h"
@@ -194,7 +195,8 @@
{
struct audio_device * adev = (struct audio_device *)ka.userdata;
char mixer_ctl_name[MAX_LENGTH_MIXER_CONTROL_IN_INT];
- int app_type_cfg[MAX_LENGTH_MIXER_CONTROL_IN_INT], len = 0, rc;
+ long app_type_cfg[MAX_LENGTH_MIXER_CONTROL_IN_INT];
+ int len = 0, rc;
struct mixer_ctl *ctl;
int acdb_dev_id, snd_device;
struct listnode *node;
@@ -374,12 +376,13 @@
int ret;
if (ka.state == STATE_DISABLED)
- return;
+ return 0;
ret = str_parms_get_str(parms, AUDIO_PARAMETER_DEVICE_CONNECT, value, sizeof(value));
if (ret >= 0) {
int val = atoi(value);
- if (val & AUDIO_DEVICE_OUT_AUX_DIGITAL) {
+ if (audio_is_output_devices(val) &&
+ (val & AUDIO_DEVICE_OUT_AUX_DIGITAL)) {
if (!audio_extn_passthru_is_active()) {
ALOGV("start keep alive");
audio_extn_keep_alive_start();
@@ -391,7 +394,8 @@
sizeof(value));
if (ret >= 0) {
int val = atoi(value);
- if (val & AUDIO_DEVICE_OUT_AUX_DIGITAL) {
+ if (audio_is_output_devices(val) &&
+ (val & AUDIO_DEVICE_OUT_AUX_DIGITAL)) {
ALOGV("stop keep_alive");
audio_extn_keep_alive_stop();
}
diff --git a/hal/audio_extn/qaf.c b/hal/audio_extn/qaf.c
old mode 100644
new mode 100755
index 20d0ae4..c1c0af7
--- a/hal/audio_extn/qaf.c
+++ b/hal/audio_extn/qaf.c
@@ -115,6 +115,7 @@
#include "audio_extn.h"
#include <qti_audio.h>
#include "sound/compress_params.h"
+#include "ip_hdlr_intf.h"
#ifdef DYNAMIC_LOG_ENABLED
#include <log_xml_parser.h>
@@ -130,6 +131,7 @@
#endif
void set_hdmi_configuration_to_module();
+void set_bt_configuration_to_module();
struct qaf_adsp_hdlr_config_state {
struct audio_adsp_event event_params;
@@ -219,6 +221,7 @@
float vol_right;
bool is_vol_set;
qaf_stream_state stream_state[MAX_QAF_MODULE_IN];
+ bool is_session_closing;
};
struct qaf {
@@ -226,6 +229,7 @@
pthread_mutex_t lock;
+ bool bt_connect;
bool hdmi_connect;
int hdmi_sink_channels;
@@ -806,7 +810,7 @@
/ audio_stream_out_frame_size(stream)
/ out->stream.common.get_sample_rate(&out->stream.common));
}
- } else if (ret < bytes) {
+ } else if (ret < (ssize_t)bytes) {
//partial buffer copied to the module.
DEBUG_MSG_VV("Not enough space available in mm module, post msg to cb thread");
(void)qaf_send_offload_cmd_l(out, OFFLOAD_CMD_WAIT_FOR_BUFFER);
@@ -936,14 +940,20 @@
if ((qaf_mod->stream_out[QAF_OUT_OFFLOAD] != NULL)
|| (qaf_mod->stream_out[QAF_OUT_OFFLOAD_MCH] != NULL)) {
unsigned int sample_rate = 0;
+ audio_usecase_t platform_latency = 0;
if (qaf_mod->stream_out[QAF_OUT_OFFLOAD])
sample_rate = qaf_mod->stream_out[QAF_OUT_OFFLOAD]->sample_rate;
else if (qaf_mod->stream_out[QAF_OUT_OFFLOAD_MCH])
sample_rate = qaf_mod->stream_out[QAF_OUT_OFFLOAD_MCH]->sample_rate;
- audio_usecase_t platform_latency =
+ if (qaf_mod->stream_out[QAF_OUT_OFFLOAD])
+ platform_latency =
platform_render_latency(qaf_mod->stream_out[QAF_OUT_OFFLOAD]->usecase);
+ else
+ platform_latency =
+ platform_render_latency(qaf_mod->stream_out[QAF_OUT_OFFLOAD_MCH]->usecase);
+
dsp_latency = (platform_latency * sample_rate) / 1000000LL;
} else if (qaf_mod->stream_out[QAF_OUT_TRANSCODE_PASSTHROUGH] != NULL) {
unsigned int sample_rate = 0;
@@ -988,6 +998,36 @@
return ret;
}
+static int qaf_out_get_render_position(const struct audio_stream_out *stream,
+ uint32_t *dsp_frames)
+{
+ struct stream_out *out = (struct stream_out *)stream;
+ int ret = 0;
+ uint64_t frames=0;
+ struct qaf_module* qaf_mod = NULL;
+ ALOGV("%s, Output Stream %p,dsp frames %d",__func__, stream, (int)dsp_frames);
+
+ qaf_mod = get_qaf_module_for_input_stream(out);
+ if (!qaf_mod) {
+ ret = out->stream.get_render_position(stream, dsp_frames);
+ ALOGV("%s, non qaf_MOD DSP FRAMES %d",__func__, (int)dsp_frames);
+ return ret;
+ }
+
+ if (p_qaf->passthrough_out) {
+ pthread_mutex_lock(&p_qaf->lock);
+ ret = p_qaf->passthrough_out->stream.get_render_position((struct audio_stream_out *)p_qaf->passthrough_out, dsp_frames);
+ pthread_mutex_unlock(&p_qaf->lock);
+ ALOGV("%s, PASS THROUGH DSP FRAMES %p",__func__, dsp_frames);
+ return ret;
+ }
+ frames=*dsp_frames;
+ ret = qaf_get_rendered_frames(out, &frames);
+ *dsp_frames = (uint32_t)frames;
+ ALOGV("%s, DSP FRAMES %d",__func__, (int)dsp_frames);
+ return ret;
+}
+
static int qaf_out_get_presentation_position(const struct audio_stream_out *stream,
uint64_t *frames,
struct timespec *timestamp)
@@ -1269,11 +1309,15 @@
struct audio_config config;
audio_qaf_media_format_t *media_fmt = NULL;
+ if (qaf_mod->is_session_closing) {
+ DEBUG_MSG("Dropping event as session is closing."
+ "Device 0x%X, Event = 0x%X, Bytes to write %d", device, event_id, size);
+ return;
+ }
+
DEBUG_MSG_VV("Device 0x%X, Event = 0x%X, Bytes to write %d", device, event_id, size);
- pthread_mutex_lock(&p_qaf->lock);
-
/* Default config initialization. */
config.sample_rate = config.offload_info.sample_rate = QAF_OUTPUT_SAMPLING_RATE;
config.offload_info.version = AUDIO_INFO_INITIALIZER.version;
@@ -1283,12 +1327,13 @@
config.offload_info.channel_mask = config.channel_mask = AUDIO_CHANNEL_OUT_STEREO;
if (event_id == AUDIO_SEC_FAIL_EVENT) {
- DEBUG_MSG("%s Security failed, closing session");
+ DEBUG_MSG("%s Security failed, closing session", __func__);
qaf_session_close(qaf_mod);
- pthread_mutex_unlock(&p_qaf->lock);
return;
}
+ pthread_mutex_lock(&p_qaf->lock);
+
if (event_id == AUDIO_DATA_EVENT) {
data_buffer_p = (int8_t*)buf;
buffer_size = size;
@@ -1777,6 +1822,8 @@
{
int j;
+ DEBUG_MSG("Closing Session.");
+
//Check if all streams are closed or not.
for (j = 0; j < MAX_QAF_MODULE_IN; j++) {
if (qaf_mod->stream_in[j] != NULL) {
@@ -1787,6 +1834,9 @@
return 0; //Some stream is already active, Can not close session.
}
+ qaf_mod->is_session_closing = true;
+ pthread_mutex_lock(&p_qaf->lock);
+
if (qaf_mod->session_handle != NULL && qaf_mod->qaf_audio_session_close) {
#ifdef AUDIO_EXTN_IP_HDLR_ENABLED
if (qaf_mod == &p_qaf->qaf_mod[MS12]) {
@@ -1810,6 +1860,8 @@
}
qaf_mod->new_out_format_index = 0;
+ pthread_mutex_unlock(&p_qaf->lock);
+ qaf_mod->is_session_closing = false;
DEBUG_MSG("Session Closed.");
return 0;
@@ -1843,11 +1895,11 @@
}
unlock_output_stream(out);
+ pthread_mutex_unlock(&p_qaf->lock);
+
//If all streams are closed then close the session.
qaf_session_close(qaf_mod);
- pthread_mutex_unlock(&p_qaf->lock);
-
DEBUG_MSG();
return ret;
}
@@ -1858,8 +1910,8 @@
ALOGV("%s %d", __func__, __LINE__);
unsigned char* license_data = NULL;
device_license_config_t lic_config = {NULL, 0, 0};
- int ret = -ENOSYS, size = 0;
- char value[PROPERTY_VALUE_MAX] = {0};
+ int ret = -ENOSYS;
+
struct qaf_module *qaf_mod = NULL;
if (mod_type >= MAX_MM_MODULE_TYPE || !(p_qaf->qaf_mod[mod_type].qaf_audio_session_open))
@@ -1877,6 +1929,9 @@
}
#ifndef AUDIO_EXTN_IP_HDLR_ENABLED
+ {
+ int size=0;
+ char value[PROPERTY_VALUE_MAX] = {0};
if (mod_type == MS12) {
//Getting the license
license_data = platform_get_license((struct audio_hw_device *)(p_qaf->adev->platform),
@@ -1905,6 +1960,7 @@
goto exit;
}
}
+}
#endif
ret = qaf_mod->qaf_audio_session_open(&qaf_mod->session_handle,
@@ -1927,14 +1983,16 @@
qaf_mod,
¬ify_event_callback,
AUDIO_DATA_EVENT_V2);
-
- set_hdmi_configuration_to_module();
+ if(p_qaf->bt_connect)
+ set_bt_configuration_to_module();
+ else
+ set_hdmi_configuration_to_module();
#ifdef AUDIO_EXTN_IP_HDLR_ENABLED
if (mod_type == MS12) {
ret = audio_extn_ip_hdlr_intf_open(qaf_mod->ip_hdlr_hdl, false, qaf_mod->session_handle, out->usecase);
if (ret < 0) {
- ERROR_MSG("audio_extn_ip_hdlr_intf_open failed, ret = %d", __func__, ret);
+ ERROR_MSG("%s audio_extn_ip_hdlr_intf_open failed, ret = %d", __func__, ret);
goto exit;
}
}
@@ -1973,7 +2031,7 @@
if (p_qaf->qaf_mod[mmtype].qaf_audio_session_open == NULL ||
p_qaf->qaf_mod[mmtype].qaf_audio_stream_open == NULL) {
ERROR_MSG("Session or Stream is NULL");
- return status;
+ return -ENOTSUP;
}
//Open the module session, if not opened already.
status = audio_extn_qaf_session_open(mmtype, out);
@@ -2074,7 +2132,7 @@
if (status != 0) {
//If no stream is active then close the session.
qaf_session_close(qaf_mod);
- return status;
+ return 0;
}
//If Device is HDMI, QAF passthrough is enabled and there is no previous QAF passthrough input stream.
@@ -2292,6 +2350,7 @@
*/
out->devices = val;
+#ifndef SPLIT_A2DP_ENABLED
if (val == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP) {
//If device is BT then open the BT stream if not already opened.
if ( audio_extn_bt_hal_get_output_stream(qaf_mod->bt_hdl) == NULL
@@ -2310,6 +2369,7 @@
audio_extn_bt_hal_close_output_stream(qaf_mod->bt_hdl);
}
}
+#endif
if (p_qaf->passthrough_in == out) { //Device routing is received for QAF passthrough stream.
@@ -2488,16 +2548,21 @@
return ret;
}
+#ifndef LINUX_ENABLED
+//Bypass QAF for dummy PCM session opened by APM during boot time
+ if(flags == 0) {
+ ALOGD("bypassing QAF for flags is equal to none");
+ return ret;
+ }
+#endif
+
out = (struct stream_out *)*stream_out;
ret = qaf_stream_open(out, config, flags, devices);
- if (ret == -ENOTSUP) {
+ if (ret < 0) {
+ ERROR_MSG("Error opening QAF stream err[%d]! QAF bypassed.", ret);
//Stream not supported by QAF, Bypass QAF.
return 0;
- } else if (ret < 0) {
- ERROR_MSG("Error opening QAF stream err[%d]!", ret);
- adev_close_output_stream(dev, *stream_out);
- return ret;
}
/* Override function pointers based on qaf definitions */
@@ -2510,6 +2575,7 @@
out->stream.common.standby = qaf_out_standby;
out->stream.common.set_parameters = qaf_out_set_parameters;
out->stream.get_latency = qaf_out_get_latency;
+ out->stream.get_render_position = qaf_out_get_render_position;
out->stream.write = qaf_out_write;
out->stream.get_presentation_position = qaf_out_get_presentation_position;
out->platform_latency = 0;
@@ -2542,7 +2608,7 @@
struct qaf_module* qaf_mod = get_qaf_module_for_input_stream(out);
if (!qaf_mod) {
- DEBUG_MSG("qaf module is NULL, by passing qaf on close output stream");
+ DEBUG_MSG("qaf module is NULL, bypassing qaf on close output stream");
/*closing non-MS12/default output stream opened with qaf */
adev_close_output_stream(dev, stream);
return;
@@ -2585,6 +2651,50 @@
return (prop_enabled);
}
+void set_bt_configuration_to_module()
+{
+ if (!p_qaf) {
+ return;
+ }
+
+ if (!p_qaf->bt_connect) {
+ DEBUG_MSG("BT is not connected.");
+ return;
+ }
+
+ struct str_parms *qaf_params;
+ char *format_params = NULL;
+
+ qaf_params = str_parms_create();
+ if (qaf_params) {
+ //ms12 wrapper don't support bt, treat this as speaker and routign to bt
+ //will take care as a part of data callback notifier
+ str_parms_add_str(qaf_params,
+ AUDIO_QAF_PARAMETER_KEY_DEVICE,
+ AUDIO_QAF_PARAMETER_VALUE_DEVICE_SPEAKER);
+
+ str_parms_add_str(qaf_params,
+ AUDIO_QAF_PARAMETER_KEY_RENDER_FORMAT,
+ AUDIO_QAF_PARAMETER_VALUE_PCM);
+ format_params = str_parms_to_str(qaf_params);
+
+ if (p_qaf->qaf_mod[MS12].session_handle && p_qaf->qaf_mod[MS12].qaf_audio_session_set_param) {
+ ALOGE(" Configuring BT/speaker for MS12 wrapper");
+ p_qaf->qaf_mod[MS12].qaf_audio_session_set_param(p_qaf->qaf_mod[MS12].session_handle,
+ format_params);
+ }
+ if (p_qaf->qaf_mod[DTS_M8].session_handle
+ && p_qaf->qaf_mod[DTS_M8].qaf_audio_session_set_param) {
+ ALOGE(" Configuring BT/speaker for MS12 wrapper");
+ p_qaf->qaf_mod[DTS_M8].qaf_audio_session_set_param(p_qaf->qaf_mod[DTS_M8].session_handle,
+ format_params);
+ }
+ }
+ str_parms_destroy(qaf_params);
+
+}
+
+
/* Query HDMI EDID and sets module output accordingly.*/
void set_hdmi_configuration_to_module()
{
@@ -2775,7 +2885,6 @@
int status = 0, val = 0, k;
char *format_params, *kv_parirs;
struct str_parms *qaf_params;
- char value[32];
DEBUG_MSG("Entry");
@@ -2783,10 +2892,9 @@
return -EINVAL;
}
- status = str_parms_get_str(parms, AUDIO_PARAMETER_DEVICE_CONNECT, value, sizeof(value));
+ status = str_parms_get_int(parms, AUDIO_PARAMETER_DEVICE_CONNECT, &val);
- if (status >= 0) {
- val = atoi(value);
+ if ((status >= 0) && audio_is_output_device(val)) {
if (val & AUDIO_DEVICE_OUT_AUX_DIGITAL) { //HDMI is connected.
p_qaf->hdmi_connect = 1;
@@ -2809,6 +2917,9 @@
set_hdmi_configuration_to_module();
} else if (val & AUDIO_DEVICE_OUT_BLUETOOTH_A2DP) {
+ p_qaf->bt_connect = 1;
+ set_bt_configuration_to_module();
+#ifndef SPLIT_A2DP_ENABLED
for (k = 0; k < MAX_MM_MODULE_TYPE; k++) {
if (!p_qaf->qaf_mod[k].bt_hdl) {
DEBUG_MSG("Opening a2dp output...");
@@ -2819,13 +2930,13 @@
}
}
}
+#endif
}
//TODO else if: Need to consider other devices.
}
- status = str_parms_get_str(parms, AUDIO_PARAMETER_DEVICE_DISCONNECT, value, sizeof(value));
- if (status >= 0) {
- val = atoi(value);
+ status = str_parms_get_int(parms, AUDIO_PARAMETER_DEVICE_DISCONNECT, &val);
+ if ((status >= 0) && audio_is_output_device(val)) {
if (val & AUDIO_DEVICE_OUT_AUX_DIGITAL) { //HDMI is disconnected.
qaf_params = str_parms_create();
@@ -2855,6 +2966,11 @@
str_parms_destroy(qaf_params);
close_qaf_passthrough_stream();
} else if (val & AUDIO_DEVICE_OUT_BLUETOOTH_A2DP) {
+ p_qaf->bt_connect = 0;
+ //reconfig HDMI as end device (if connected)
+ if(p_qaf->hdmi_connect)
+ set_hdmi_configuration_to_module();
+#ifndef SPLIT_A2DP_ENABLED
DEBUG_MSG("Closing a2dp output...");
for (k = 0; k < MAX_MM_MODULE_TYPE; k++) {
if (p_qaf->qaf_mod[k].bt_hdl) {
@@ -2862,6 +2978,7 @@
p_qaf->qaf_mod[k].bt_hdl = NULL;
}
}
+#endif
}
//TODO else if: Need to consider other devices.
}
@@ -2921,7 +3038,7 @@
}
}
#else
- qaf_mod->qaf_lib = dlopen(lib_name, RTLD_NOW);
+ qaf_mod->qaf_lib = dlopen(lib_name, RTLD_NOW);
if (qaf_mod->qaf_lib == NULL) {
ERROR_MSG("DLOPEN failed for %s", lib_name);
continue;
diff --git a/hal/audio_extn/soundtrigger.c b/hal/audio_extn/soundtrigger.c
index a38ca17..c2dee84 100644
--- a/hal/audio_extn/soundtrigger.c
+++ b/hal/audio_extn/soundtrigger.c
@@ -71,7 +71,7 @@
static void get_library_path(char *lib_path)
{
snprintf(lib_path, MAX_LIBRARY_PATH,
- "/usr/lib/sound_trigger.primary.default.so");
+ "sound_trigger.primary.default.so");
}
#else
static void get_library_path(char *lib_path)
diff --git a/hal/audio_extn/source_track.c b/hal/audio_extn/source_track.c
index e5e6c06..e078be4 100644
--- a/hal/audio_extn/source_track.c
+++ b/hal/audio_extn/source_track.c
@@ -161,6 +161,7 @@
case SND_DEVICE_IN_VOICE_SPEAKER_DMIC:
case SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE:
case SND_DEVICE_IN_VOICE_SPEAKER_QMIC:
+ case SND_DEVICE_IN_HANDSET_GENERIC_QMIC:
ret = true;
break;
default:
diff --git a/hal/audio_extn/spkr_protection.c b/hal/audio_extn/spkr_protection.c
index a33d432..ea4d856 100644
--- a/hal/audio_extn/spkr_protection.c
+++ b/hal/audio_extn/spkr_protection.c
@@ -46,6 +46,7 @@
#include <cutils/properties.h>
#include "audio_extn.h"
#include <linux/msm_audio_calibration.h>
+#include <linux/msm_audio.h>
#ifdef DYNAMIC_LOG_ENABLED
#include <log_xml_parser.h>
@@ -59,7 +60,29 @@
#define MIN_SPKR_TEMP_Q6 (-30 * (1 << 6))
#define MAX_SPKR_TEMP_Q6 (80 * (1 << 6))
#define VI_FEED_CHANNEL "VI_FEED_TX Channels"
+#define WSA8815_NAME_LEFT "wsatz.13"
+#define WSA8815_NAME_RIGHT "wsatz.14"
+#define WCD_LEFT_BOOST_MAX_STATE "SPKR Left Boost Max State"
+#define WCD_RIGHT_BOOST_MAX_STATE "SPKR Right Boost Max State"
+#define WSA_LEFT_BOOST_LEVEL "SpkrLeft Boost Level"
+#define WSA_RIGHT_BOOST_LEVEL "SpkrRight Boost Level"
+/* Min and max resistance value in lookup table. */
+#define MIN_RESISTANCE_LOOKUP (3.2)
+#define MAX_RESISTANCE_LOOKUP (8)
+#define SPV3_LOOKUP_TABLE_ROWS (49)
+/* default limiter threshold is 0dB */
+#define DEFAULT_LIMITER_TH (0x0)
+#define AFE_API_VERSION_SUPPORT_SPV3 (0x2)
+enum spv3_boost_max_state {
+ BOOST_NO_MAX_STATE,
+ BOOST_MAX_STATE_1,
+ BOOST_MAX_STATE_2,
+};
+enum sp_version {
+ SP_V2 = 0x1,
+ SP_V3 = AFE_API_VERSION_SUPPORT_SPV3,
+};
/*Set safe temp value to 40C*/
#define SAFE_SPKR_TEMP 40
#define SAFE_SPKR_TEMP_Q6 (SAFE_SPKR_TEMP * (1 << 6))
@@ -162,6 +185,8 @@
pthread_cond_t cal_wait_condition;
bool init_check;
volatile bool thread_exit;
+ unsigned int sp_version;
+ int limiter_th[SP_V2_NUM_MAX_SPKRS];
};
static struct pcm_config pcm_config_skr_prot = {
@@ -180,6 +205,86 @@
char *spkr_2_name;
};
+struct spv3_boost {
+ /* bit7-4: first stage; bit 3-0: second stage */
+ int boost_value;
+ int max_state;
+};
+
+#define SPV3_BOOST_VALUE_STATE(value, state) \
+{ .boost_value = (value), .max_state = (state) }
+
+static struct spv3_boost spv3_boost_lookup_table[SPV3_LOOKUP_TABLE_ROWS] = {
+ SPV3_BOOST_VALUE_STATE(0xc7, BOOST_MAX_STATE_1),
+ SPV3_BOOST_VALUE_STATE(0xd7, BOOST_MAX_STATE_1),
+ SPV3_BOOST_VALUE_STATE(0xd7, BOOST_MAX_STATE_1),
+ SPV3_BOOST_VALUE_STATE(0xe7, BOOST_MAX_STATE_1),
+ SPV3_BOOST_VALUE_STATE(0xe7, BOOST_MAX_STATE_1),
+ SPV3_BOOST_VALUE_STATE(0xf7, BOOST_MAX_STATE_1),
+ SPV3_BOOST_VALUE_STATE(0x70, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x70, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x71, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x71, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x72, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x72, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x73, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x73, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x74, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x75, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x75, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x76, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x76, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x77, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x77, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x78, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x78, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x79, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x79, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7a, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7a, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7a, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7b, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7b, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7c, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7c, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7d, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7d, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7e, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7e, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+ SPV3_BOOST_VALUE_STATE(0x7f, BOOST_MAX_STATE_2),
+};
+
+/* 3.2 ohm in q24 format: (3.2 * (1 << 24)) */
+#define MIN_LOOKUP_RESISTANCE_SPKR_Q24 (53687091)
+/* 8 ohm in q24 format: (8 * (1 << 24)) */
+#define MAX_LOOKUP_RESISTANCE_SPKR_Q24 (134217728)
+/* 0.1 ohm in q24 format: (0.1 * (1 <<24)) */
+#define LOOKUP_RESISTANCE_GAP_SPKR_Q24 (1677722)
+
+/* 3.2ohm : 0.1ohm : 8ohm lookup table */
+static int spv3_limiter_th_q27_table[SPV3_LOOKUP_TABLE_ROWS] = {
+ -526133494, -508685189, -491236884, -473788580, -457682452, -441576325,
+ -426812375, -410706248, -395942298, -382520525, -367756575, -354334802,
+ -340913029, -327491256, -315411661, -301989888, -289910292, -277830697,
+ -265751101, -255013683, -242934088, -232196669, -221459251, -210721833,
+ -199984415, -190589174, -179851756, -170456515, -159719096, -150323855,
+ -140928614, -131533373, -122138132, -114085069, -104689828, -95294587,
+ -87241523, -79188460, -69793219, -61740155, -53687091, -45634028,
+ -37580964, -29527900, -22817014, -14763950, -6710886, 0,
+ 0
+};
static struct speaker_prot_session handle;
static int vi_feed_no_channels;
static struct spkr_tz_names tz_names;
@@ -380,6 +485,11 @@
cal_data.cal_type.cal_info.t0[SP_V2_SPKR_1] = protCfg->t0[SP_V2_SPKR_1];
cal_data.cal_type.cal_info.t0[SP_V2_SPKR_2] = protCfg->t0[SP_V2_SPKR_2];
cal_data.cal_type.cal_info.mode = protCfg->mode;
+#ifdef MSM_SPKR_PROT_SPV3
+ cal_data.cal_type.cal_info.sp_version = protCfg->sp_version;
+ cal_data.cal_type.cal_info.limiter_th[SP_V2_SPKR_1] = protCfg->limiter_th[SP_V2_SPKR_1];
+ cal_data.cal_type.cal_info.limiter_th[SP_V2_SPKR_2] = protCfg->limiter_th[SP_V2_SPKR_2];
+#endif
property_get("persist.vendor.audio.spkr.cal.duration", value, "0");
if (atoi(value) > 0) {
ALOGD("%s: quick calibration enabled", __func__);
@@ -444,6 +554,179 @@
}
}
+static bool is_wsa_present(void)
+{
+ ALOGD("%s: tz1: %s, tz2: %s", __func__,
+ tz_names.spkr_1_name, tz_names.spkr_2_name);
+ handle.spkr_1_tzn = get_tzn(tz_names.spkr_1_name);
+ handle.spkr_2_tzn = get_tzn(tz_names.spkr_2_name);
+ if ((handle.spkr_1_tzn >= 0) || (handle.spkr_2_tzn >= 0))
+ handle.wsa_found = true;
+
+ return handle.wsa_found;
+}
+
+static void audio_extn_check_wsa_support_sp_v3(struct audio_device *adev,
+ unsigned int num_of_spkrs, bool *wsa_support_spv3)
+{
+ unsigned int i = 0;
+ if (!is_wsa_present() ||
+ platform_spkr_prot_is_wsa_analog_mode(adev)){
+ for (i = 0; i < num_of_spkrs; i++)
+ wsa_support_spv3[i] = false;
+
+ return;
+ }
+
+ if (!strncmp(WSA8815_NAME_LEFT, tz_names.spkr_1_name,
+ sizeof(WSA8815_NAME_LEFT)) ||
+ !strncmp(WSA8815_NAME_RIGHT, tz_names.spkr_1_name,
+ sizeof(WSA8815_NAME_RIGHT))) {
+ wsa_support_spv3[SP_V2_SPKR_1] = true;
+ } else {
+ wsa_support_spv3[SP_V2_SPKR_1] = false;
+ ALOGI("%s: Speaker1(%s) is not wsa8815.", __func__, tz_names.spkr_1_name);
+ }
+
+ if (num_of_spkrs == SP_V2_NUM_MAX_SPKRS &&
+ (!strncmp(WSA8815_NAME_RIGHT, tz_names.spkr_2_name,
+ sizeof(WSA8815_NAME_RIGHT)) ||
+ !strncmp(WSA8815_NAME_LEFT, tz_names.spkr_2_name,
+ sizeof(WSA8815_NAME_LEFT)))) {
+ wsa_support_spv3[SP_V2_SPKR_2] = true;
+ } else {
+ wsa_support_spv3[SP_V2_SPKR_2] = false;
+ ALOGI("%s: Speaker2(%s) is not wsa8815.", __func__, tz_names.spkr_2_name);
+ }
+
+}
+
+int audio_extn_set_wcd_boost_max_state(struct audio_device *adev,
+ int boost_max_state, int wsa_num)
+{
+ struct mixer_ctl *ctl = NULL;
+ const char *mixer_ctl_name[] = {
+ WCD_LEFT_BOOST_MAX_STATE,
+ WCD_RIGHT_BOOST_MAX_STATE
+ };
+ int status = 0;
+
+ ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name[wsa_num]);
+ if (!ctl) {
+ ALOGE("%s: Could not get ctl for mixer cmd - %s",
+ __func__, mixer_ctl_name[wsa_num]);
+ return -EINVAL;
+ }
+
+ status = mixer_ctl_set_value(ctl, 0, boost_max_state);
+ if (status < 0) {
+ ALOGE("%s: failed to set WCD boost state.\n", __func__);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+int audio_extn_set_wsa_boost_level(struct audio_device *adev,
+ int wsa_num, int boost_table_index)
+{
+ struct mixer_ctl *ctl;
+ const char *mixer_ctl_name_boost_level[] = {
+ WSA_LEFT_BOOST_LEVEL,
+ WSA_RIGHT_BOOST_LEVEL
+ };
+ int status = 0;
+
+ ctl = mixer_get_ctl_by_name(adev->mixer,
+ mixer_ctl_name_boost_level[wsa_num]);
+ if (!ctl) {
+ ALOGE("%s: Could not get ctl for mixer cmd - %s",
+ __func__, mixer_ctl_name_boost_level[wsa_num]);
+ return -EINVAL;
+ }
+
+ status = mixer_ctl_set_value(ctl, 0,
+ spv3_boost_lookup_table[boost_table_index].boost_value);
+
+ if (status < 0) {
+ ALOGE("%s: Could not set ctl for mixer %s\n", __func__,
+ mixer_ctl_name_boost_level[wsa_num]);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int audio_extn_config_spv3(struct audio_device *adev, unsigned int wsa_num)
+{
+ float dcr = 0;
+ unsigned int r0_index = 0;
+ int boost_max_state = 0;
+ int ret = 0;
+
+ /* get R0 value */
+ dcr = ((float)handle.sp_r0t0_cal.r0[wsa_num] / MIN_RESISTANCE_SPKR_Q24 * 2);
+ if (dcr < MIN_RESISTANCE_LOOKUP) {
+ ALOGV("%s: resistance %f changes to min value of 3.2.",
+ __func__, dcr);
+ dcr = MIN_RESISTANCE_LOOKUP;
+ }
+
+ if (dcr > MAX_RESISTANCE_LOOKUP) {
+ ALOGV("%s: resistance %f changes to max value of 8.",
+ __func__, dcr);
+ dcr = MAX_RESISTANCE_LOOKUP;
+ }
+
+ r0_index = (int)((dcr - MIN_RESISTANCE_LOOKUP) * 10);
+ if (r0_index >= SPV3_LOOKUP_TABLE_ROWS) {
+ ALOGE("%s: r0_index=%d overflows.", __func__, r0_index);
+ return -EINVAL;
+ }
+
+ boost_max_state = spv3_boost_lookup_table[r0_index].max_state;
+ ret = audio_extn_set_wcd_boost_max_state(adev, boost_max_state, wsa_num);
+ if (ret < 0) {
+ ALOGE("%s: failed to set wcd max boost state.",
+ __func__);
+ return -EINVAL;
+ }
+
+ ret = audio_extn_set_wsa_boost_level(adev, wsa_num, r0_index);
+ if (ret < 0) {
+ ALOGE("%s: failed to set wsa boost level.",
+ __func__);
+ return -EINVAL;
+ }
+
+ handle.limiter_th[wsa_num] = spv3_limiter_th_q27_table[r0_index];
+
+ return 0;
+}
+
+static void audio_extn_check_config_sp_v3(struct audio_device *adev,
+ bool spv3_enable, unsigned int afe_api_version)
+{
+ int chn = 0;
+ bool wsa_support_spv3[SP_V2_NUM_MAX_SPKRS] = {false, false};
+
+ if (spv3_enable && afe_api_version >= AFE_API_VERSION_SUPPORT_SPV3) {
+ handle.sp_version = SP_V2;
+ audio_extn_check_wsa_support_sp_v3(adev, vi_feed_no_channels, wsa_support_spv3);
+ /*
+ * In case of WSA8815+8810, invalid limiter threshold is sent to DSP
+ * for WSA8810 speaker. DSP ignores the invalid value and use default one.
+ * The approach let spv3 apply on 8815 and spv2 on 8810 respectively.
+ */
+ for (chn = 0; chn < vi_feed_no_channels; chn++) {
+ if (wsa_support_spv3[chn] && !audio_extn_config_spv3(adev, chn))
+ handle.sp_version = SP_V3;
+ else
+ handle.limiter_th[chn] = DEFAULT_LIMITER_TH;
+ }
+ }
+}
+
static int spkr_calibrate(int t0_spk_1, int t0_spk_2)
{
struct audio_device *adev = handle.adev_handle;
@@ -706,6 +989,8 @@
int spk_1_tzn, spk_2_tzn;
char buf[32] = {0};
int ret;
+ bool spv3_enable = false;
+ unsigned int afe_api_version = 0;
memset(&protCfg, 0, sizeof(protCfg));
/* If the value of this persist.vendor.audio.spkr.cal.duration is 0
@@ -738,6 +1023,9 @@
return NULL;
}
+ spv3_enable = property_get_bool("persist.vendor.audio.spv3.enable", false);
+ afe_api_version = property_get_int32("persist.vendor.audio.avs.afe_api_version", 0);
+
fp = fopen(CALIB_FILE,"rb");
if (fp) {
int i;
@@ -770,6 +1058,9 @@
} else
handle.spkr_prot_mode = MSM_SPKR_PROT_CALIBRATED;
close(acdb_fd);
+
+ audio_extn_check_config_sp_v3(adev, spv3_enable, vi_feed_no_channels);
+
pthread_exit(0);
return NULL;
}
@@ -921,6 +1212,9 @@
if (handle.thermal_handle)
dlclose(handle.thermal_handle);
handle.thermal_handle = NULL;
+
+ audio_extn_check_config_sp_v3(adev, spv3_enable, vi_feed_no_channels);
+
pthread_exit(0);
return NULL;
}
@@ -936,17 +1230,6 @@
return 0;
}
-static bool is_wsa_present(void)
-{
- ALOGD("%s: tz1: %s, tz2: %s", __func__,
- tz_names.spkr_1_name, tz_names.spkr_2_name);
- handle.spkr_1_tzn = get_tzn(tz_names.spkr_1_name);
- handle.spkr_2_tzn = get_tzn(tz_names.spkr_2_name);
- if ((handle.spkr_1_tzn >= 0) || (handle.spkr_2_tzn >= 0))
- handle.wsa_found = true;
- return handle.wsa_found;
-}
-
void audio_extn_spkr_prot_set_parameters(struct str_parms *parms,
char *value, int len)
{
@@ -1449,6 +1732,11 @@
break;
}
protCfg.mode = MSM_SPKR_PROT_CALIBRATED;
+#ifdef MSM_SPKR_PROT_SPV3
+ protCfg.sp_version = handle.sp_version;
+ protCfg.limiter_th[SP_V2_SPKR_1] = handle.limiter_th[SP_V2_SPKR_1];
+ protCfg.limiter_th[SP_V2_SPKR_2] = handle.limiter_th[SP_V2_SPKR_2];
+#endif
ret = set_spkr_prot_cal(acdb_fd, &protCfg);
if (ret)
ALOGE("%s: speaker protection cal data swap failed", __func__);
diff --git a/hal/audio_extn/usb.c b/hal/audio_extn/usb.c
index 60216b1..8fa47a8 100644
--- a/hal/audio_extn/usb.c
+++ b/hal/audio_extn/usb.c
@@ -1005,6 +1005,11 @@
return usbmod->is_capture_supported;
}
+bool audio_extn_usb_is_tunnel_supported()
+{
+ return true;
+}
+
void audio_extn_usb_add_device(audio_devices_t device, int card)
{
struct usb_card_config *usb_card_info;
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index 4b48e3d..e03fdc8 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -106,6 +106,11 @@
#define MAX_CHANNELS_SUPPORTED 8
#endif
+typedef struct {
+ const char *id_string;
+ const int value;
+} mixer_config_lookup;
+
struct string_to_enum {
const char *name;
uint32_t value;
@@ -134,6 +139,7 @@
STRING_TO_ENUM(AUDIO_INPUT_FLAG_RAW),
STRING_TO_ENUM(AUDIO_INPUT_FLAG_SYNC),
STRING_TO_ENUM(AUDIO_INPUT_FLAG_TIMESTAMP),
+ STRING_TO_ENUM(AUDIO_INPUT_FLAG_COMPRESS),
};
const struct string_to_enum s_format_name_to_enum_table[] = {
@@ -188,13 +194,18 @@
/* payload structure avt_device drift query */
struct audio_avt_device_drift_stats {
uint32_t minor_version;
+
/* Indicates the device interface direction as either
* source (Tx) or sink (Rx).
*/
uint16_t device_direction;
- /*params exposed to client */
+
+ /* Reference timer for drift accumulation and time stamp information.
+ * currently it only support AFE_REF_TIMER_TYPE_AVTIMER
+ */
+ uint16_t reference_timer;
struct audio_avt_device_drift_param drift_param;
-};
+} __attribute__((packed));
static char bTable[BASE_TABLE_SIZE] = {
'A','B','C','D','E','F','G','H','I','J','K','L',
@@ -726,12 +737,6 @@
sample_rate = OUTPUT_SAMPLING_RATE_DSD128;
}
- if(devices & AUDIO_DEVICE_OUT_ALL_A2DP) {
- //TODO: Handle fractional sampling rate configuration for LL
- audio_extn_a2dp_get_apptype_params(&sample_rate, &bit_width);
- ALOGI("%s using %d sampling rate %d bit width for A2DP CoPP",
- __func__, sample_rate, bit_width);
- }
ALOGV("%s: flags: %x, format: %x sample_rate %d, profile %s, app_type %d",
__func__, flags, format, sample_rate, profile, app_type_cfg->app_type);
@@ -978,6 +983,14 @@
(usecase->stream.out->sample_rate < OUTPUT_SAMPLING_RATE_44100)) {
/* Reset to default if no native stream is active*/
usecase->stream.out->app_type_cfg.sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE;
+ } else if (usecase->stream.out->devices & AUDIO_DEVICE_OUT_ALL_A2DP) {
+ /*
+ * For a2dp playback get encoder sampling rate and set copp sampling rate,
+ * for bit width use the stream param only.
+ */
+ audio_extn_a2dp_get_sample_rate(&usecase->stream.out->app_type_cfg.sample_rate);
+ ALOGI("%s using %d sample rate rate for A2DP CoPP",
+ __func__, usecase->stream.out->app_type_cfg.sample_rate);
}
sample_rate = usecase->stream.out->app_type_cfg.sample_rate;
@@ -2059,8 +2072,8 @@
#endif
#define MAX_SND_CARD 8
-#define RETRY_US 500000
-#define RETRY_NUMBER 10
+#define RETRY_US 1000000
+#define RETRY_NUMBER 40
int audio_extn_utils_get_snd_card_num()
{
@@ -2068,24 +2081,31 @@
void *hw_info = NULL;
struct mixer *mixer = NULL;
int retry_num = 0;
- int snd_card_num = 0;
+ int snd_card_num = 0, min_snd_card_num = 0;
char* snd_card_name = NULL;
- while (snd_card_num < MAX_SND_CARD) {
- mixer = mixer_open(snd_card_num);
+ /*
+ * Try with all the sound cards ( 0 to 8 ) and if none of them were detected
+ * sleep for 1 sec and try detections with sound card 0 again.
+ * If sound card gets detected, check if it is relevant, if not check with the
+ * other sound cards. To ensure that the irrelevant sound card is not check again,
+ * we maintain it in min_snd_card_num.
+ */
+ while (retry_num < RETRY_NUMBER) {
- while (!mixer && retry_num < RETRY_NUMBER) {
- usleep(RETRY_US);
- mixer = mixer_open(snd_card_num);
- retry_num++;
+ while (snd_card_num <= MAX_SND_CARD) {
+ mixer = mixer_open(snd_card_num);
+ if (!mixer)
+ snd_card_num++;
+ else
+ break;
}
if (!mixer) {
- ALOGE("%s: Unable to open the mixer card: %d", __func__,
- snd_card_num);
- retry_num = 0;
- snd_card_num++;
- continue;
+ usleep(RETRY_US);
+ snd_card_num = min_snd_card_num;
+ retry_num++;
+ continue;
}
snd_card_name = strdup(mixer_get_name(mixer));
@@ -2102,8 +2122,11 @@
break;
}
ALOGE("%s: Failed to init hardware info", __func__);
- retry_num = 0;
- snd_card_num++;
+ min_snd_card_num++;
+ snd_card_num = min_snd_card_num;
+
+ if (snd_card_num >= MAX_SND_CARD)
+ break;
free(snd_card_name);
snd_card_name = NULL;
@@ -2113,12 +2136,14 @@
}
if (snd_card_name)
free(snd_card_name);
+
if (mixer)
mixer_close(mixer);
+
if (hw_info)
hw_info_deinit(hw_info);
- if (snd_card_num >= MAX_SND_CARD) {
+ if ((snd_card_num >= MAX_SND_CARD) || (retry_num >= RETRY_NUMBER)) {
ALOGE("%s: Unable to find correct sound card, aborting.", __func__);
return -1;
}
@@ -2367,4 +2392,63 @@
return false;
}
+int audio_extn_utils_get_bit_width_from_string(const char *id_string)
+{
+ int i;
+ const mixer_config_lookup mixer_bitwidth_config[] = {{"S24_3LE", 24},
+ {"S32_LE", 32},
+ {"S24_LE", 24},
+ {"S16_LE", 16}};
+ int num_configs = sizeof(mixer_bitwidth_config) / sizeof(mixer_bitwidth_config[0]);
+ for (i = 0; i < num_configs; i++) {
+ if (!strcmp(id_string, mixer_bitwidth_config[i].id_string))
+ return mixer_bitwidth_config[i].value;
+ }
+
+ return -EINVAL;
+}
+
+int audio_extn_utils_get_sample_rate_from_string(const char *id_string)
+{
+ int i;
+ const mixer_config_lookup mixer_samplerate_config[] = {{"KHZ_32", 32000},
+ {"KHZ_48", 48000},
+ {"KHZ_96", 96000},
+ {"KHZ_144", 144000},
+ {"KHZ_192", 192000},
+ {"KHZ_384", 384000},
+ {"KHZ_44P1", 44100},
+ {"KHZ_88P2", 88200},
+ {"KHZ_176P4", 176400},
+ {"KHZ_352P8", 352800}};
+ int num_configs = sizeof(mixer_samplerate_config) / sizeof(mixer_samplerate_config[0]);
+
+ for (i = 0; i < num_configs; i++) {
+ if (!strcmp(id_string, mixer_samplerate_config[i].id_string))
+ return mixer_samplerate_config[i].value;
+ }
+
+ return -EINVAL;
+}
+
+int audio_extn_utils_get_channels_from_string(const char *id_string)
+{
+ int i;
+ const mixer_config_lookup mixer_channels_config[] = {{"One", 1},
+ {"Two", 2},
+ {"Three",3},
+ {"Four", 4},
+ {"Five", 5},
+ {"Six", 6},
+ {"Seven", 7},
+ {"Eight", 8}};
+ int num_configs = sizeof(mixer_channels_config) / sizeof(mixer_channels_config[0]);
+
+ for (i = 0; i < num_configs; i++) {
+ if (!strcmp(id_string, mixer_channels_config[i].id_string))
+ return mixer_channels_config[i].value;
+ }
+
+ return -EINVAL;
+}
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index be65139..4506115 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -74,6 +74,7 @@
#include <platform.h>
#include "audio_extn.h"
#include "voice_extn.h"
+#include "ip_hdlr_intf.h"
#include "sound/compress_params.h"
#include "sound/asound.h"
@@ -115,6 +116,8 @@
.period_size = VOIP_IO_BUF_SIZE(DEFAULT_VOIP_SAMP_RATE, DEFAULT_VOIP_BUF_DURATION_MS, DEFAULT_VOIP_BIT_DEPTH_BYTE)/2,
.period_count = 2,
.format = PCM_FORMAT_S16_LE,
+ .avail_min = VOIP_IO_BUF_SIZE(DEFAULT_VOIP_SAMP_RATE, DEFAULT_VOIP_BUF_DURATION_MS, DEFAULT_VOIP_BIT_DEPTH_BYTE)/2,
+ .stop_threshold = INT_MAX,
};
#define MIN_CHANNEL_COUNT 1
@@ -299,6 +302,8 @@
[USECASE_AUDIO_RECORD_COMPRESS2] = "audio-record-compress2",
[USECASE_AUDIO_RECORD_COMPRESS3] = "audio-record-compress3",
[USECASE_AUDIO_RECORD_COMPRESS4] = "audio-record-compress4",
+ [USECASE_AUDIO_RECORD_COMPRESS5] = "audio-record-compress5",
+ [USECASE_AUDIO_RECORD_COMPRESS6] = "audio-record-compress6",
[USECASE_AUDIO_RECORD_LOW_LATENCY] = "low-latency-record",
[USECASE_AUDIO_RECORD_FM_VIRTUAL] = "fm-virtual-record",
[USECASE_AUDIO_RECORD_MMAP] = "mmap-record",
@@ -933,7 +938,6 @@
#define check_and_enable_effect(x) ENOSYS
#endif
-
int pcm_ioctl(struct pcm *pcm, int request, ...)
{
va_list ap;
@@ -2732,10 +2736,11 @@
ret = -errno;
}
else if (ret == -ETIMEDOUT)
- compress_drain(out->compr);
+ ret = compress_drain(out->compr);
else
ALOGE("%s: Next track returned error %d",__func__, ret);
- if (ret != -ENETRESET) {
+ if (-ENETRESET != ret && !(-EINTR == ret &&
+ CARD_STATUS_OFFLINE == out->card_status)) {
send_callback = true;
pthread_mutex_lock(&out->lock);
out->send_new_metadata = 1;
@@ -2748,10 +2753,15 @@
break;
case OFFLOAD_CMD_DRAIN:
ALOGD("copl(%p):calling compress_drain", out);
- compress_drain(out->compr);
- ALOGD("copl(%p):calling compress_drain", out);
- send_callback = true;
- event = STREAM_CBK_EVENT_DRAIN_READY;
+ ret = compress_drain(out->compr);
+ ALOGD("copl(%p):out of compress_drain", out);
+ // EINTR check avoids drain interruption due to SSR
+ if (-ENETRESET != ret && !(-EINTR == ret &&
+ CARD_STATUS_OFFLINE == out->card_status)) {
+ send_callback = true;
+ event = STREAM_CBK_EVENT_DRAIN_READY;
+ } else
+ ALOGI("%s: Block drain ready event during SSR", __func__);
break;
case OFFLOAD_CMD_ERROR:
ALOGD("copl(%p): sending error callback to AF", out);
@@ -3348,8 +3358,6 @@
{
struct stream_out *out = (struct stream_out *)stream;
struct audio_device *adev = out->dev;
- struct audio_usecase *uc_info;
- struct listnode *node;
bool do_stop = true;
ALOGD("%s: enter: stream (%p) usecase(%d: %s)", __func__,
@@ -3395,13 +3403,6 @@
if (do_stop) {
stop_output_stream(out);
}
- //restore output device for active usecase when current snd device and output device mismatch
- list_for_each(node, &adev->usecase_list) {
- uc_info = node_to_item(node, struct audio_usecase, list);
- if ((uc_info->type == PCM_PLAYBACK) &&
- (uc_info->out_snd_device != platform_get_output_snd_device(adev->platform, uc_info->stream.out)))
- select_devices(adev, uc_info->id);
- }
pthread_mutex_unlock(&adev->lock);
}
pthread_mutex_unlock(&out->lock);
@@ -3596,7 +3597,8 @@
* Avoid this by routing audio to speaker until standby.
*/
if ((out->devices & AUDIO_DEVICE_OUT_ALL_A2DP) &&
- (val == AUDIO_DEVICE_NONE)) {
+ (val == AUDIO_DEVICE_NONE) &&
+ !audio_extn_a2dp_is_ready()) {
val = AUDIO_DEVICE_OUT_SPEAKER;
}
/* To avoid a2dp to sco overlapping / BT device improper state
@@ -3645,7 +3647,7 @@
out->devices = new_dev;
if (output_drives_call(adev, out)) {
- if(!voice_is_in_call(adev)) {
+ if (!voice_is_call_state_active(adev)) {
if (adev->mode == AUDIO_MODE_IN_CALL) {
adev->current_call_output = out;
ret = voice_start_call(adev);
@@ -3728,7 +3730,9 @@
}
//suspend, resume handling block
- if (out->dynamic_pm_qos_enabled) {
+ //remove QOS only if vendor.audio.hal.dynamic.qos.config.supported is set to true
+ // and vendor.audio.hal.output.suspend.supported is set to true
+ if (out->hal_output_suspend_supported && out->dynamic_pm_qos_config_supported) {
//check suspend parameter only for low latency and if the property
//is enabled
if (str_parms_get_str(parms, "suspend_playback", value, sizeof(value)) >= 0) {
@@ -3977,7 +3981,7 @@
if (str_parms_get_str(query, "supports_hw_suspend", value, sizeof(value)) >= 0) {
//only low latency track supports suspend_resume
str_parms_add_int(reply, "supports_hw_suspend",
- (out->dynamic_pm_qos_enabled));
+ (out->hal_output_suspend_supported));
if (str)
free(str);
str = str_parms_to_str(reply);
@@ -4037,7 +4041,7 @@
float right)
{
struct stream_out *out = (struct stream_out *)stream;
- int volume[2];
+ long volume[2];
char mixer_ctl_name[128];
struct audio_device *adev = out->dev;
struct mixer_ctl *ctl;
@@ -4068,7 +4072,7 @@
char mixer_ctl_name[] = "App Type Gain";
struct audio_device *adev = out->dev;
struct mixer_ctl *ctl;
- uint32_t set_values[4];
+ long set_values[4];
ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
if (!ctl) {
@@ -4079,8 +4083,8 @@
set_values[0] = 0; //0: Rx Session 1:Tx Session
set_values[1] = out->app_type_cfg.app_type;
- set_values[2] = (int)(left * VOIP_PLAYBACK_VOLUME_MAX);
- set_values[3] = (int)(right * VOIP_PLAYBACK_VOLUME_MAX);
+ set_values[2] = (long)(left * VOIP_PLAYBACK_VOLUME_MAX);
+ set_values[3] = (long)(right * VOIP_PLAYBACK_VOLUME_MAX);
mixer_ctl_set_array(ctl, set_values, ARRAY_SIZE(set_values));
return 0;
@@ -4115,8 +4119,8 @@
__func__, mixer_ctl_name);
return -EINVAL;
}
- volume[0] = (int)(AmpToDb(left));
- volume[1] = (int)(AmpToDb(right));
+ volume[0] = (long)(AmpToDb(left));
+ volume[1] = (long)(AmpToDb(right));
mixer_ctl_set_array(ctl, volume, sizeof(volume)/sizeof(volume[0]));
return 0;
} else {
@@ -4541,7 +4545,7 @@
uint64_t *frames, struct timespec *timestamp)
{
struct stream_out *out = (struct stream_out *)stream;
- int ret = -1;
+ int ret = -ENODATA;
unsigned long dsp_frames;
/* below piece of code is not guarded against any lock because audioFliner serializes
@@ -5532,7 +5536,8 @@
out->convert_buffer = NULL;
out->started = 0;
out->a2dp_compress_mute = false;
- out->dynamic_pm_qos_enabled = 0;
+ out->hal_output_suspend_supported = 0;
+ out->dynamic_pm_qos_config_supported = 0;
if ((flags & AUDIO_OUTPUT_FLAG_BD) &&
(property_get_bool("audio.matrix.limiter.enable", false)))
@@ -5917,8 +5922,11 @@
out->stream.get_mmap_position = out_get_mmap_position;
} else if (out->flags & AUDIO_OUTPUT_FLAG_FAST) {
out->usecase = USECASE_AUDIO_PLAYBACK_LOW_LATENCY;
- out->dynamic_pm_qos_enabled = property_get_bool("vendor.audio.dynamic.qos.enable", false);
- if (!out->dynamic_pm_qos_enabled) {
+ out->hal_output_suspend_supported =
+ property_get_bool("vendor.audio.hal.output.suspend.supported", false);
+ out->dynamic_pm_qos_config_supported =
+ property_get_bool("vendor.audio.hal.dynamic.qos.config.supported", false);
+ if (!out->dynamic_pm_qos_config_supported) {
ALOGI("%s: dynamic qos voting not enabled for platform", __func__);
} else {
ALOGI("%s: dynamic qos voting enabled for platform", __func__);
@@ -6242,7 +6250,8 @@
ret = str_parms_get_str(parms, AUDIO_PARAMETER_DEVICE_CONNECT, value, sizeof(value));
if (ret >= 0) {
val = atoi(value);
- if (val & AUDIO_DEVICE_OUT_AUX_DIGITAL) {
+ if (audio_is_output_device(val) &&
+ (val & AUDIO_DEVICE_OUT_AUX_DIGITAL)) {
ALOGV("cache new ext disp type and edid");
ret = platform_get_ext_disp_type(adev->platform);
if (ret < 0) {
@@ -6251,8 +6260,8 @@
goto done;
}
platform_cache_edid(adev->platform);
- } else if ((val & AUDIO_DEVICE_OUT_USB_DEVICE) ||
- !(val ^ AUDIO_DEVICE_IN_USB_DEVICE)) {
+ } else if (((audio_devices_t)val == AUDIO_DEVICE_OUT_USB_DEVICE) ||
+ ((audio_devices_t)val == AUDIO_DEVICE_IN_USB_DEVICE)) {
/*
* Do not allow AFE proxy port usage by WFD source when USB headset is connected.
* Per AudioPolicyManager, USB device is higher priority than WFD.
@@ -6262,11 +6271,15 @@
*/
ret = str_parms_get_str(parms, "card", value, sizeof(value));
if (ret >= 0) {
- audio_extn_usb_add_device(AUDIO_DEVICE_OUT_USB_DEVICE, atoi(value));
- audio_extn_usb_add_device(AUDIO_DEVICE_IN_USB_DEVICE, atoi(value));
+ if (audio_is_output_device(val))
+ audio_extn_usb_add_device(AUDIO_DEVICE_OUT_USB_DEVICE, atoi(value));
+ else
+ audio_extn_usb_add_device(AUDIO_DEVICE_IN_USB_DEVICE, atoi(value));
}
- ALOGV("detected USB connect .. disable proxy");
- adev->allow_afe_proxy_usage = false;
+ if (!audio_extn_usb_is_tunnel_supported()) {
+ ALOGV("detected USB connect .. disable proxy");
+ adev->allow_afe_proxy_usage = false;
+ }
}
}
@@ -6279,15 +6292,19 @@
* invalidated prior to updating sysfs of the disconnect event
* Invalidate will be handled by audio_extn_ext_disp_set_parameters()
*/
- if ((val & AUDIO_DEVICE_OUT_USB_DEVICE) ||
- !(val ^ AUDIO_DEVICE_IN_USB_DEVICE)) {
+ if (((audio_devices_t)val == AUDIO_DEVICE_OUT_USB_DEVICE) ||
+ ((audio_devices_t)val == AUDIO_DEVICE_IN_USB_DEVICE)) {
ret = str_parms_get_str(parms, "card", value, sizeof(value));
if (ret >= 0) {
- audio_extn_usb_remove_device(AUDIO_DEVICE_OUT_USB_DEVICE, atoi(value));
- audio_extn_usb_remove_device(AUDIO_DEVICE_IN_USB_DEVICE, atoi(value));
+ if (audio_is_output_device(val))
+ audio_extn_usb_remove_device(AUDIO_DEVICE_OUT_USB_DEVICE, atoi(value));
+ else
+ audio_extn_usb_remove_device(AUDIO_DEVICE_IN_USB_DEVICE, atoi(value));
}
- ALOGV("detected USB disconnect .. enable proxy");
- adev->allow_afe_proxy_usage = true;
+ if (!audio_extn_usb_is_tunnel_supported()) {
+ ALOGV("detected USB disconnect .. enable proxy");
+ adev->allow_afe_proxy_usage = true;
+ }
}
}
@@ -6496,8 +6513,9 @@
switch (flags) {
case AUDIO_INPUT_FLAG_NONE:
- case AUDIO_INPUT_FLAG_FAST: // just fast, not fast|raw || fast|mmap
break;
+ case AUDIO_INPUT_FLAG_FAST: // disallow hifi record for FAST as
+ // it affects RTD numbers over USB
default:
return !allowed;
}
@@ -6593,6 +6611,15 @@
in->standby = 1;
in->capture_handle = handle;
in->flags = flags;
+ in->bit_width = 16;
+ in->af_period_multiplier = 1;
+
+ /* Update config params with the requested sample rate and channels */
+ if ((in->device == AUDIO_DEVICE_IN_TELEPHONY_RX) &&
+ (adev->mode != AUDIO_MODE_IN_CALL)) {
+ ret = -EINVAL;
+ goto err_open;
+ }
/* restrict 24 bit capture for unprocessed source only
* for other sources if 24 bit requested reject 24 and set 16 bit capture only
@@ -6615,7 +6642,9 @@
goto err_open;
}
channel_count = audio_channel_count_from_in_mask(config->channel_mask);
- } else if (config->format == AUDIO_FORMAT_DEFAULT) {
+ }
+
+ if (config->format == AUDIO_FORMAT_DEFAULT) {
config->format = AUDIO_FORMAT_PCM_16_BIT;
} else if ((config->format == AUDIO_FORMAT_PCM_FLOAT) ||
(config->format == AUDIO_FORMAT_PCM_32_BIT) ||
@@ -6638,11 +6667,8 @@
if (config->sample_rate > 48000)
config->sample_rate = 48000;
ret_error = true;
- } else if (config->format == AUDIO_FORMAT_PCM_24_BIT_PACKED) {
- in->config.format = PCM_FORMAT_S24_3LE;
- } else if (config->format == AUDIO_FORMAT_PCM_8_24_BIT) {
- in->config.format = PCM_FORMAT_S24_LE;
- } else {
+ } else if (!(config->format == AUDIO_FORMAT_PCM_24_BIT_PACKED ||
+ config->format == AUDIO_FORMAT_PCM_8_24_BIT)) {
config->format = AUDIO_FORMAT_PCM_24_BIT_PACKED;
ret_error = true;
}
@@ -6671,32 +6697,18 @@
in->realtime = 0;
in->usecase = USECASE_AUDIO_RECORD_MMAP;
in->config = pcm_config_mmap_capture;
+ in->config.format = pcm_format_from_audio_format(config->format);
in->stream.start = in_start;
in->stream.stop = in_stop;
in->stream.create_mmap_buffer = in_create_mmap_buffer;
in->stream.get_mmap_position = in_get_mmap_position;
- in->af_period_multiplier = 1;
ALOGV("%s: USECASE_AUDIO_RECORD_MMAP", __func__);
} else if (in->realtime) {
in->config = pcm_config_audio_capture_rt;
+ in->config.format = pcm_format_from_audio_format(config->format);
in->sample_rate = in->config.rate;
in->af_period_multiplier = af_period_multiplier;
- } else {
- in->config = pcm_config_audio_capture;
- in->config.rate = config->sample_rate;
- in->sample_rate = config->sample_rate;
- in->af_period_multiplier = 1;
- }
- in->bit_width = 16;
-
- /* Update config params with the requested sample rate and channels */
- if ((in->device == AUDIO_DEVICE_IN_TELEPHONY_RX) &&
- (adev->mode != AUDIO_MODE_IN_CALL)) {
- ret = -EINVAL;
- goto err_open;
- }
-
- if (is_usb_dev && may_use_hifi_record) {
+ } else if (is_usb_dev && may_use_hifi_record) {
in->usecase = USECASE_AUDIO_RECORD_HIFI;
in->config = pcm_config_audio_capture;
frame_size = audio_stream_in_frame_size(&in->stream);
@@ -6706,7 +6718,6 @@
false /*is_low_latency*/);
in->config.period_size = buffer_size / frame_size;
in->config.rate = config->sample_rate;
- in->af_period_multiplier = 1;
in->config.format = pcm_format_from_audio_format(config->format);
in->config.channels = channel_count;
} else if ((in->device == AUDIO_DEVICE_IN_TELEPHONY_RX) ||
@@ -6749,41 +6760,54 @@
ret = audio_extn_cin_configure_input_stream(in);
if (ret)
goto err_open;
- } else {
- in->config.channels = channel_count;
- if (!in->realtime) {
- in->format = config->format;
- frame_size = audio_stream_in_frame_size(&in->stream);
- buffer_size = get_input_buffer_size(config->sample_rate,
- config->format,
- channel_count,
- is_low_latency);
- in->config.period_size = buffer_size / frame_size;
- }
-
+ } else if (in->source == AUDIO_SOURCE_VOICE_COMMUNICATION) {
+ bool valid_rate = (config->sample_rate == 8000 ||
+ config->sample_rate == 16000 ||
+ config->sample_rate == 32000 ||
+ config->sample_rate == 48000);
+ bool valid_ch = audio_channel_count_from_in_mask(in->channel_mask) == 1;
+ //XXX needed for voice_extn_compress_voip_open_input_stream
+ in->config.rate = config->sample_rate;
#ifndef COMPRESS_VOIP_ENABLED
- if ((in->source == AUDIO_SOURCE_VOICE_COMMUNICATION) &&
- (in->config.rate == 8000 || in->config.rate == 16000 ||
- in->config.rate == 32000 || in->config.rate == 48000) &&
- (audio_channel_count_from_in_mask(in->channel_mask) == 1)) {
-
+ if (valid_rate && valid_ch) {
in->usecase = USECASE_AUDIO_RECORD_VOIP;
in->config = default_pcm_config_voip_copp;
- in->config.period_size = VOIP_IO_BUF_SIZE(in->sample_rate, DEFAULT_VOIP_BUF_DURATION_MS, DEFAULT_VOIP_BIT_DEPTH_BYTE)/2;
- in->config.rate = in->sample_rate;
-#else
- if ((in->source == AUDIO_SOURCE_VOICE_COMMUNICATION) &&
- (in->dev->mode == AUDIO_MODE_IN_COMMUNICATION ||
- voice_extn_compress_voip_is_active(in->dev)) &&
- (voice_extn_compress_voip_is_format_supported(in->format)) &&
- (in->config.rate == 8000 || in->config.rate == 16000 ||
- in->config.rate == 32000 || in->config.rate == 48000) &&
- (audio_channel_count_from_in_mask(in->channel_mask) == 1)) {
- voice_extn_compress_voip_open_input_stream(in);
-#endif
+ in->config.period_size = VOIP_IO_BUF_SIZE(in->sample_rate,
+ DEFAULT_VOIP_BUF_DURATION_MS,
+ DEFAULT_VOIP_BIT_DEPTH_BYTE)/2;
}
+#else
+ if ((in->dev->mode == AUDIO_MODE_IN_COMMUNICATION ||
+ voice_extn_compress_voip_is_active(in->dev)) &&
+ (voice_extn_compress_voip_is_format_supported(in->format)) &&
+ valid_rate && valid_ch) {
+ voice_extn_compress_voip_open_input_stream(in);
+ }
+#endif
+ else {
+ ALOGE("%s AUDIO_SOURCE_VOICE_COMMUNICATION invalid args", __func__);
+ ret = -EINVAL;
+ if (!valid_ch) config->channel_mask = 1;
+ if (!valid_rate) config->sample_rate = 48000;
+ goto err_open;
+ }
+ // update back to whatever was overwritten
+ in->config.rate = config->sample_rate;
+ in->sample_rate = config->sample_rate;
+ } else {
+ in->config = pcm_config_audio_capture;
+ in->config.rate = config->sample_rate;
+ in->config.format = pcm_format_from_audio_format(config->format);
+ in->config.channels = channel_count;
+ in->sample_rate = config->sample_rate;
+ in->format = config->format;
+ frame_size = audio_stream_in_frame_size(&in->stream);
+ buffer_size = get_input_buffer_size(config->sample_rate,
+ config->format,
+ channel_count,
+ is_low_latency);
+ in->config.period_size = buffer_size / frame_size;
}
-
audio_extn_utils_update_stream_input_app_type_cfg(adev->platform,
&adev->streams_input_cfg_list,
devices, flags, in->format, in->sample_rate,
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
index 56ee9d0..f39abf9 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -50,9 +50,9 @@
#include "audio_hw_extn_api.h"
#if LINUX_ENABLED
-#define VISUALIZER_LIBRARY_PATH "/usr/lib/libqcomvisualizer.so"
-#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "/usr/lib/libqcompostprocbundle.so"
-#define ADM_LIBRARY_PATH "/usr/lib/libadm.so"
+#define VISUALIZER_LIBRARY_PATH "libqcomvisualizer.so"
+#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "libqcompostprocbundle.so"
+#define ADM_LIBRARY_PATH "libadm.so"
#else
#define VISUALIZER_LIBRARY_PATH "/vendor/lib/soundfx/libqcomvisualizer.so"
#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "/vendor/lib/soundfx/libqcompostprocbundle.so"
@@ -147,6 +147,8 @@
USECASE_AUDIO_RECORD_COMPRESS2,
USECASE_AUDIO_RECORD_COMPRESS3,
USECASE_AUDIO_RECORD_COMPRESS4,
+ USECASE_AUDIO_RECORD_COMPRESS5,
+ USECASE_AUDIO_RECORD_COMPRESS6,
USECASE_AUDIO_RECORD_LOW_LATENCY,
USECASE_AUDIO_RECORD_FM_VIRTUAL,
USECASE_AUDIO_RECORD_HIFI,
@@ -339,7 +341,8 @@
float volume_r;
char pm_qos_mixer_path[MAX_MIXER_PATH_LEN];
- int dynamic_pm_qos_enabled;
+ int hal_output_suspend_supported;
+ int dynamic_pm_qos_config_supported;
bool stream_config_changed;
mix_matrix_params_t pan_scale_params;
mix_matrix_params_t downmix_params;
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 50ab6f9..56d9aec 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -302,6 +302,7 @@
bool is_dsd_supported;
bool is_asrc_supported;
struct listnode acdb_meta_key_list;
+ bool use_generic_handset;
};
static bool is_external_codec = false;
@@ -336,6 +337,9 @@
[USECASE_AUDIO_RECORD_COMPRESS2] = {-1, -1},
[USECASE_AUDIO_RECORD_COMPRESS3] = {-1, -1},
[USECASE_AUDIO_RECORD_COMPRESS4] = {-1, -1},
+ [USECASE_AUDIO_RECORD_COMPRESS5] = {-1, -1},
+ [USECASE_AUDIO_RECORD_COMPRESS6] = {-1, -1},
+
[USECASE_AUDIO_RECORD_LOW_LATENCY] = {LOWLATENCY_PCM_DEVICE,
LOWLATENCY_PCM_DEVICE},
[USECASE_AUDIO_RECORD_FM_VIRTUAL] = {MULTIMEDIA2_PCM_DEVICE,
@@ -548,6 +552,7 @@
[SND_DEVICE_IN_HANDSET_8MIC] = "handset-8mic",
[SND_DEVICE_IN_EC_REF_LOOPBACK_MONO] = "ec-ref-loopback-mono",
[SND_DEVICE_IN_EC_REF_LOOPBACK_STEREO] = "ec-ref-loopback-stereo",
+ [SND_DEVICE_IN_HANDSET_GENERIC_QMIC] = "quad-mic",
};
// Platform specific backend bit width table
@@ -710,7 +715,8 @@
[SND_DEVICE_IN_HANDSET_6MIC] = 4,
[SND_DEVICE_IN_HANDSET_8MIC] = 4,
[SND_DEVICE_IN_EC_REF_LOOPBACK_MONO] = 4,
- [SND_DEVICE_IN_EC_REF_LOOPBACK_STEREO] = 4
+ [SND_DEVICE_IN_EC_REF_LOOPBACK_STEREO] = 4,
+ [SND_DEVICE_IN_HANDSET_GENERIC_QMIC] = 150
};
struct name_to_index {
@@ -859,6 +865,7 @@
{TO_NAME_INDEX(SND_DEVICE_IN_HANDSET_8MIC)},
{TO_NAME_INDEX(SND_DEVICE_IN_EC_REF_LOOPBACK_MONO)},
{TO_NAME_INDEX(SND_DEVICE_IN_EC_REF_LOOPBACK_STEREO)},
+ {TO_NAME_INDEX(SND_DEVICE_IN_HANDSET_GENERIC_QMIC)},
};
static char * backend_tag_table[SND_DEVICE_MAX] = {0};
@@ -884,6 +891,8 @@
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS2)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS3)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS4)},
+ {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS5)},
+ {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS6)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_LOW_LATENCY)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_MMAP)},
{TO_NAME_INDEX(USECASE_VOICE_CALL)},
@@ -972,6 +981,8 @@
#define ULL_PLATFORM_DELAY (6*1000LL)
#define MMAP_PLATFORM_DELAY (3*1000LL)
+static const char *platform_get_mixer_control(struct mixer_ctl *);
+
static void update_interface(const char *snd_card_name) {
if (!strncmp(snd_card_name, "apq8009-tashalite-snd-card",
sizeof("apq8009-tashalite-snd-card"))) {
@@ -1650,6 +1661,7 @@
hw_interface_table[SND_DEVICE_IN_UNPROCESSED_THREE_MIC] = strdup("SLIMBUS_0_TX");
hw_interface_table[SND_DEVICE_IN_UNPROCESSED_QUAD_MIC] = strdup("SLIMBUS_0_TX");
hw_interface_table[SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC] = strdup("SLIMBUS_0_TX");
+ hw_interface_table[SND_DEVICE_IN_HANDSET_GENERIC_QMIC] = strdup("SLIMBUS_0_TX");
my_data->max_mic_count = PLATFORM_DEFAULT_MIC_COUNT;
/*remove ALAC & APE from DSP decoder list based on software decoder availability*/
@@ -2149,6 +2161,8 @@
int idx;
int wsaCount =0;
bool is_wsa_combo_supported = false;
+ const char *id_string = NULL;
+ int cfg_value = -1;
snd_card_num = audio_extn_utils_get_snd_card_num();
if(snd_card_num < 0) {
@@ -2599,6 +2613,41 @@
my_data->current_backend_cfg[HDMI_TX_BACKEND].channels_mixer_ctl =
strdup("QUAT_MI2S_TX Channels");
+ for (idx = 0; idx < MAX_CODEC_BACKENDS; idx++) {
+ if (my_data->current_backend_cfg[idx].bitwidth_mixer_ctl) {
+ ctl = mixer_get_ctl_by_name(adev->mixer,
+ my_data->current_backend_cfg[idx].bitwidth_mixer_ctl);
+ id_string = platform_get_mixer_control(ctl);
+ if (id_string) {
+ cfg_value = audio_extn_utils_get_bit_width_from_string(id_string);
+ if (cfg_value > 0)
+ my_data->current_backend_cfg[idx].bit_width = cfg_value;
+ }
+ }
+
+ if (my_data->current_backend_cfg[idx].samplerate_mixer_ctl) {
+ ctl = mixer_get_ctl_by_name(adev->mixer,
+ my_data->current_backend_cfg[idx].samplerate_mixer_ctl);
+ id_string = platform_get_mixer_control(ctl);
+ if (id_string) {
+ cfg_value = audio_extn_utils_get_sample_rate_from_string(id_string);
+ if (cfg_value > 0)
+ my_data->current_backend_cfg[idx].sample_rate = cfg_value;
+ }
+ }
+
+ if (my_data->current_backend_cfg[idx].channels_mixer_ctl) {
+ ctl = mixer_get_ctl_by_name(adev->mixer,
+ my_data->current_backend_cfg[idx].channels_mixer_ctl);
+ id_string = platform_get_mixer_control(ctl);
+ if (id_string) {
+ cfg_value = audio_extn_utils_get_channels_from_string(id_string);
+ if (cfg_value > 0)
+ my_data->current_backend_cfg[idx].channels = cfg_value;
+ }
+ }
+ }
+
ret = audio_extn_utils_get_codec_version(snd_card_name,
my_data->adev->snd_card,
my_data->codec_version);
@@ -2623,6 +2672,9 @@
}
}
+ if (property_get_bool("vendor.audio.apptype.multirec.enabled", false))
+ my_data->use_generic_handset = true;
+
my_data->edid_info = NULL;
return my_data;
}
@@ -3520,9 +3572,9 @@
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Voice Rx Gain";
int vol_index = 0, ret = 0;
- uint32_t set_values[ ] = {0,
- ALL_SESSION_VSID,
- DEFAULT_VOLUME_RAMP_DURATION_MS};
+ long set_values[ ] = {0,
+ ALL_SESSION_VSID,
+ DEFAULT_VOLUME_RAMP_DURATION_MS};
// Voice volume levels are mapped to adsp volume levels as follows.
// 100 -> 5, 80 -> 4, 60 -> 3, 40 -> 2, 20 -> 1 0 -> 0
@@ -3536,7 +3588,7 @@
__func__, mixer_ctl_name);
ret = -EINVAL;
} else {
- ALOGV("%s Setting voice volume index: %d",__func__, set_values[0]);
+ ALOGV("%s Setting voice volume index: %ld",__func__, set_values[0]);
mixer_ctl_set_array(ctl, set_values, ARRAY_SIZE(set_values));
}
@@ -3557,9 +3609,9 @@
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Voice Tx Mute";
int ret = 0;
- uint32_t set_values[ ] = {0,
- ALL_SESSION_VSID,
- DEFAULT_MUTE_RAMP_DURATION_MS};
+ long set_values[ ] = {0,
+ ALL_SESSION_VSID,
+ DEFAULT_MUTE_RAMP_DURATION_MS};
set_values[0] = state;
ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
@@ -3589,9 +3641,9 @@
struct mixer_ctl *ctl;
char *mixer_ctl_name = NULL;
int ret = 0;
- uint32_t set_values[ ] = {0,
- ALL_SESSION_VSID,
- 0};
+ long set_values[ ] = {0,
+ ALL_SESSION_VSID,
+ 0};
if(dir == NULL) {
ALOGE("%s: Invalid direction:%s", __func__, dir);
return -EINVAL;
@@ -3989,6 +4041,8 @@
snd_device = SND_DEVICE_OUT_HEADPHONES_44_1;
} else if (out->format == AUDIO_FORMAT_DSD) {
snd_device = SND_DEVICE_OUT_HEADPHONES_DSD;
+ } else if (devices & AUDIO_DEVICE_OUT_LINE) {
+ snd_device = SND_DEVICE_OUT_LINE;
} else {
#ifdef RECORD_PLAY_CONCURRENCY
if (use_voip_out_devices)
@@ -4345,6 +4399,17 @@
snd_device = SND_DEVICE_IN_VOICE_USB_HEADSET_MIC;
}
}
+ } else if (my_data->use_generic_handset == true && // system prop is enabled
+ (my_data->source_mic_type & SOURCE_QUAD_MIC) && // AND 4mic is available
+ ((in_device & AUDIO_DEVICE_IN_BUILTIN_MIC) || // AND device is buit-in mic or back mic
+ (in_device & AUDIO_DEVICE_IN_BACK_MIC)) &&
+ (my_data->fluence_in_audio_rec == true && // AND fluencepro is enabled
+ my_data->fluence_type & FLUENCE_QUAD_MIC) &&
+ (source == AUDIO_SOURCE_CAMCORDER || // AND source is cam/mic/unprocessed
+ source == AUDIO_SOURCE_UNPROCESSED ||
+ source == AUDIO_SOURCE_MIC)) {
+ snd_device = SND_DEVICE_IN_HANDSET_GENERIC_QMIC;
+ platform_set_echo_reference(adev, true, out_device);
} else if (source == AUDIO_SOURCE_CAMCORDER) {
if (in_device & AUDIO_DEVICE_IN_BUILTIN_MIC ||
in_device & AUDIO_DEVICE_IN_BACK_MIC) {
@@ -4639,8 +4704,8 @@
struct audio_device *adev = my_data->adev;
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Slowtalk Enable";
- uint32_t set_values[ ] = {0,
- ALL_SESSION_VSID};
+ long set_values[ ] = {0,
+ ALL_SESSION_VSID};
set_values[0] = state;
ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
@@ -4670,8 +4735,8 @@
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "HD Voice Enable";
int ret = 0;
- uint32_t set_values[ ] = {0,
- ALL_SESSION_VSID};
+ long set_values[ ] = {0,
+ ALL_SESSION_VSID};
set_values[0] = state;
ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
@@ -4766,6 +4831,7 @@
goto done_key_audcal;
}
+ memset(&cal, 0, sizeof(acdb_audio_cal_cfg_t));
/* parse audio calibration keys */
ret = parse_audiocal_cfg(parms, &cal);
@@ -5059,6 +5125,8 @@
ret=-EINVAL;
goto done;
}
+
+ memset(&cal, 0, sizeof(acdb_audio_cal_cfg_t));
/* parse audiocal configuration keys */
ret = parse_audiocal_cfg(query, &cal);
if(ret == 0) {
@@ -6832,7 +6900,7 @@
char mixer_ctl_name[44] = {0}; // max length of name is 44 as defined
int ret;
unsigned int i;
- int set_values[FCC_8] = {0};
+ long set_values[FCC_8] = {0};
struct platform_data *my_data = (struct platform_data *)platform;
struct audio_device *adev = my_data->adev;
ALOGV("%s channel_count:%d",__func__, ch_count);
@@ -6863,7 +6931,7 @@
set_values[i] = ch_map[i];
}
- ALOGD("%s: set mapping(%d %d %d %d %d %d %d %d) for channel:%d", __func__,
+ ALOGD("%s: set mapping(%ld %ld %ld %ld %ld %ld %ld %d) for channel:%d", __func__,
set_values[0], set_values[1], set_values[2], set_values[3], set_values[4],
set_values[5], set_values[6], set_values[7], ch_count);
@@ -7134,7 +7202,7 @@
struct mixer_ctl *ctl;
char *mixer_ctl_name = "Device PP Params";
int ret = 0;
- uint32_t set_values[] = {0,0};
+ long set_values[] = {0,0};
set_values[0] = param;
set_values[1] = value;
@@ -7892,3 +7960,20 @@
return -1;
}
#endif
+
+static const char *platform_get_mixer_control(struct mixer_ctl *ctl)
+{
+ int id = -1;
+ const char *id_string = NULL;
+
+ if (!ctl) {
+ ALOGD("%s: mixer ctl not obtained", __func__);
+ } else {
+ id = mixer_ctl_get_value(ctl, 0);
+ if (id >= 0) {
+ id_string = mixer_ctl_get_enum_string(ctl, id);
+ }
+ }
+
+ return id_string;
+}
diff --git a/hal/msm8916/platform.h b/hal/msm8916/platform.h
index d128d0f..aeefcc2 100644
--- a/hal/msm8916/platform.h
+++ b/hal/msm8916/platform.h
@@ -228,6 +228,7 @@
SND_DEVICE_IN_HANDSET_8MIC,
SND_DEVICE_IN_EC_REF_LOOPBACK_MONO,
SND_DEVICE_IN_EC_REF_LOOPBACK_STEREO,
+ SND_DEVICE_IN_HANDSET_GENERIC_QMIC,
SND_DEVICE_IN_END,
SND_DEVICE_MAX = SND_DEVICE_IN_END,
diff --git a/hal/msm8974/hw_info.c b/hal/msm8974/hw_info.c
old mode 100755
new mode 100644
index 970f160..bddaf97
--- a/hal/msm8974/hw_info.c
+++ b/hal/msm8974/hw_info.c
@@ -383,11 +383,25 @@
hw_info->num_snd_devices = ARRAY_SIZE(tavil_qrd_variant_devices);
hw_info->is_stereo_spkr = false;
strlcpy(hw_info->dev_extn, "-qrd", sizeof(hw_info->dev_extn));
+ } else if (!strcmp(snd_card_name, "sdm845-tavil-hdk-snd-card")) {
+ strlcpy(hw_info->type, " hdk", sizeof(hw_info->type));
+ strlcpy(hw_info->name, "sdm845", sizeof(hw_info->name));
+ hw_info->snd_devices = (snd_device_t *)tavil_qrd_variant_devices;
+ hw_info->num_snd_devices = ARRAY_SIZE(tavil_qrd_variant_devices);
+ hw_info->is_stereo_spkr = false;
+ strlcpy(hw_info->dev_extn, "-hdk", sizeof(hw_info->dev_extn));
+ } else if (!strcmp(snd_card_name, "sdm845-qvr-tavil-snd-card")) {
+ hw_info->is_stereo_spkr = false;
} else {
ALOGW("%s: Not a sdm845 device", __func__);
}
}
+static void update_hardware_info_sdx(struct hardware_info *hw_info __unused, const char *snd_card_name __unused)
+{
+ ALOGW("%s: Not a sdx device", __func__);
+}
+
static void update_hardware_info_8974(struct hardware_info *hw_info, const char *snd_card_name)
{
if (!strcmp(snd_card_name, "msm8974-taiko-mtp-snd-card")) {
@@ -483,13 +497,17 @@
static void update_hardware_info_bear(struct hardware_info *hw_info, const char *snd_card_name)
{
- if (!strcmp(snd_card_name, "sdm660-snd-card")) {
+ if (!strncmp(snd_card_name, "sdm660-snd-card",
+ sizeof("sdm660-snd-card")))
strlcpy(hw_info->name, "sdm660", sizeof(hw_info->name));
- } else if (!strcmp(snd_card_name, "sdm660-tavil-snd-card")) {
+ else if (!strncmp(snd_card_name, "sdm660-tavil-snd-card",
+ sizeof("sdm660-tavil-snd-card")))
strlcpy(hw_info->name, "sdm660", sizeof(hw_info->name));
- } else {
+ else if (!strncmp(snd_card_name, "sdm670-skuw-snd-card",
+ sizeof("sdm670-skuw-snd-card")))
+ hw_info->is_stereo_spkr = false;
+ else
ALOGW("%s: Not an SDM device", __func__);
- }
}
void *hw_info_init(const char *snd_card_name)
@@ -540,6 +558,9 @@
} else if (strstr(snd_card_name, "sdm660") || strstr(snd_card_name, "sdm670")) {
ALOGV("Bear - variant soundcard");
update_hardware_info_bear(hw_info, snd_card_name);
+ } else if (strncmp(snd_card_name, "sdx", sizeof("sdx"))) {
+ ALOGV("SDX - variant soundcard");
+ update_hardware_info_sdx(hw_info, snd_card_name);
} else {
ALOGE("%s: Unsupported target %s:",__func__, snd_card_name);
free(hw_info);
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 4df1ca6..4692e7f 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -59,6 +59,7 @@
#define MIXER_XML_DEFAULT_PATH "/etc/mixer_paths.xml"
#define PLATFORM_INFO_XML_PATH_INTCODEC "/etc/audio_platform_info_intcodec.xml"
#define PLATFORM_INFO_XML_PATH_SKUSH "/etc/audio_platform_info_skush.xml"
+#define PLATFORM_INFO_XML_PATH_SKUW "/etc/audio_platform_info_skuw.xml"
#define PLATFORM_INFO_XML_PATH "/etc/audio_platform_info.xml"
#define MIXER_XML_PATH_AUXPCM "/etc/mixer_paths_auxpcm.xml"
#define MIXER_XML_PATH_I2S "/etc/mixer_paths_i2s.xml"
@@ -68,6 +69,7 @@
#define MIXER_XML_DEFAULT_PATH "/vendor/etc/mixer_paths.xml"
#define PLATFORM_INFO_XML_PATH_INTCODEC "/vendor/etc/audio_platform_info_intcodec.xml"
#define PLATFORM_INFO_XML_PATH_SKUSH "/vendor/etc/audio_platform_info_skush.xml"
+#define PLATFORM_INFO_XML_PATH_SKUW "/vendor/etc/audio_platform_info_skuw.xml"
#define PLATFORM_INFO_XML_PATH "/vendor/etc/audio_platform_info.xml"
#define MIXER_XML_PATH_AUXPCM "/vendor/etc/mixer_paths_auxpcm.xml"
#define MIXER_XML_PATH_I2S "/vendor/etc/mixer_paths_i2s.xml"
@@ -75,7 +77,7 @@
#endif
#include <linux/msm_audio.h>
-#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670)
+#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670) || defined (PLATFORM_QCS605)
#include <sound/devdep_params.h>
#endif
@@ -273,6 +275,7 @@
bool is_dsd_supported;
bool is_asrc_supported;
struct listnode acdb_meta_key_list;
+ bool use_generic_handset;
};
static int pcm_device_table[AUDIO_USECASE_MAX][2] = {
@@ -311,6 +314,8 @@
[USECASE_AUDIO_RECORD_COMPRESS2] = {-1, -1},
[USECASE_AUDIO_RECORD_COMPRESS3] = {-1, -1},
[USECASE_AUDIO_RECORD_COMPRESS4] = {-1, -1},
+ [USECASE_AUDIO_RECORD_COMPRESS5] = {-1, -1},
+ [USECASE_AUDIO_RECORD_COMPRESS6] = {-1, -1},
[USECASE_AUDIO_RECORD_LOW_LATENCY] = {LOWLATENCY_PCM_DEVICE,
LOWLATENCY_PCM_DEVICE},
[USECASE_AUDIO_RECORD_FM_VIRTUAL] = {MULTIMEDIA2_PCM_DEVICE,
@@ -522,6 +527,7 @@
[SND_DEVICE_IN_UNPROCESSED_THREE_MIC] = "unprocessed-three-mic",
[SND_DEVICE_IN_UNPROCESSED_QUAD_MIC] = "unprocessed-quad-mic",
[SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC] = "unprocessed-headset-mic",
+ [SND_DEVICE_IN_HANDSET_GENERIC_QMIC] = "quad-mic",
};
// Platform specific backend bit width table
@@ -680,6 +686,7 @@
[SND_DEVICE_IN_UNPROCESSED_THREE_MIC] = 145,
[SND_DEVICE_IN_UNPROCESSED_QUAD_MIC] = 146,
[SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC] = 147,
+ [SND_DEVICE_IN_HANDSET_GENERIC_QMIC] = 150,
};
struct name_to_index {
@@ -822,6 +829,7 @@
{TO_NAME_INDEX(SND_DEVICE_IN_UNPROCESSED_THREE_MIC)},
{TO_NAME_INDEX(SND_DEVICE_IN_UNPROCESSED_QUAD_MIC)},
{TO_NAME_INDEX(SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC)},
+ {TO_NAME_INDEX(SND_DEVICE_IN_HANDSET_GENERIC_QMIC)},
};
static char * backend_tag_table[SND_DEVICE_MAX] = {0};
@@ -847,6 +855,8 @@
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS2)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS3)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS4)},
+ {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS5)},
+ {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS6)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_LOW_LATENCY)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_MMAP)},
{TO_NAME_INDEX(USECASE_VOICE_CALL)},
@@ -990,10 +1000,14 @@
static void update_codec_type_and_interface(struct platform_data * my_data, const char *snd_card_name) {
- if (!strncmp(snd_card_name, "sdm660-snd-card-skush",
- sizeof("sdm660-snd-card-skush")) ||
+ if (!strncmp(snd_card_name, "sdm670-skuw-snd-card",
+ sizeof("sdm670-skuw-snd-card")) ||
!strncmp(snd_card_name, "sdm660-snd-card-skush",
- sizeof("sdm660-snd-card-mtp")) ||
+ sizeof("sdm660-snd-card-skush")) ||
+ !strncmp(snd_card_name, "sdm670-360cam-snd-card",
+ sizeof("sdm670-360cam-snd-card")) ||
+ !strncmp(snd_card_name, "sdm660-snd-card-mtp",
+ sizeof("sdm660-snd-card-mtp")) ||
!strncmp(snd_card_name, "sdm670-mtp-snd-card",
sizeof("sdm670-mtp-snd-card"))) {
ALOGI("%s: snd_card_name: %s",__func__,snd_card_name);
@@ -1020,6 +1034,8 @@
return ret;
}
+static const char *platform_get_mixer_control(struct mixer_ctl *);
+
bool platform_send_gain_dep_cal(void *platform, int level) {
bool ret_val = false;
struct platform_data *my_data = (struct platform_data *)platform;
@@ -1293,7 +1309,9 @@
!strncmp(snd_card_name, "apq8084-taiko-i2s-cdp-snd-card",
sizeof("apq8084-taiko-i2s-cdp-snd-card")) ||
!strncmp(snd_card_name, "apq8096-tasha-i2c-snd-card",
- sizeof("apq8096-tasha-i2c-snd-card"))) {
+ sizeof("apq8096-tasha-i2c-snd-card")) ||
+ !strncmp(snd_card_name, "sdx-tavil-i2s-snd-card",
+ sizeof("sdx-tavil-i2s-snd-card"))){
plat_data->is_i2s_ext_modem = true;
}
ALOGV("%s, is_i2s_ext_modem:%d soundcard name is %s",__func__,
@@ -1488,6 +1506,7 @@
hw_interface_table[SND_DEVICE_IN_UNPROCESSED_THREE_MIC] = strdup("SLIMBUS_0_TX");
hw_interface_table[SND_DEVICE_IN_UNPROCESSED_QUAD_MIC] = strdup("SLIMBUS_0_TX");
hw_interface_table[SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC] = strdup("SLIMBUS_0_TX");
+ hw_interface_table[SND_DEVICE_IN_HANDSET_GENERIC_QMIC] = strdup("SLIMBUS_0_TX");
my_data->max_mic_count = PLATFORM_DEFAULT_MIC_COUNT;
@@ -1882,6 +1901,9 @@
char *tmp = NULL;
char mixer_xml_file[MIXER_PATH_MAX_LENGTH]= {0};
int idx;
+ struct mixer_ctl *ctl = NULL;
+ const char *id_string = NULL;
+ int cfg_value = -1;
adev->snd_card = audio_extn_utils_get_snd_card_num();
if (adev->snd_card < 0) {
@@ -2069,11 +2091,14 @@
/* Initialize ACDB ID's */
if (my_data->is_i2s_ext_modem)
platform_info_init(PLATFORM_INFO_XML_PATH_I2S, my_data, PLATFORM);
- else if (my_data->is_internal_codec)
- platform_info_init(PLATFORM_INFO_XML_PATH_INTCODEC, my_data, PLATFORM);
else if (!strncmp(snd_card_name, "sdm660-snd-card-skush",
sizeof("sdm660-snd-card-skush")))
platform_info_init(PLATFORM_INFO_XML_PATH_SKUSH, my_data, PLATFORM);
+ else if (!strncmp(snd_card_name, "sdm670-skuw-snd-card",
+ sizeof("sdm670-skuw-snd-card")))
+ platform_info_init(PLATFORM_INFO_XML_PATH_SKUW, my_data, PLATFORM);
+ else if (my_data->is_internal_codec)
+ platform_info_init(PLATFORM_INFO_XML_PATH_INTCODEC, my_data, PLATFORM);
else
platform_info_init(PLATFORM_INFO_XML_PATH, my_data, PLATFORM);
@@ -2222,7 +2247,8 @@
property_get("ro.board.platform", platform, "");
property_get("ro.baseband", baseband, "");
if ((!strncmp("apq8084", platform, sizeof("apq8084")) ||
- !strncmp("msm8996", platform, sizeof("msm8996"))) &&
+ !strncmp("msm8996", platform, sizeof("msm8996")) ||
+ !strncmp("sdx", platform, sizeof("sdx"))) &&
!strncmp("mdm", baseband, (sizeof("mdm")-1))) {
my_data->csd = open_csd_client(my_data->is_i2s_ext_modem);
} else {
@@ -2343,6 +2369,41 @@
my_data->current_backend_cfg[HDMI_TX_BACKEND].channels_mixer_ctl =
strdup("QUAT_MI2S_TX Channels");
+ for (idx = 0; idx < MAX_CODEC_BACKENDS; idx++) {
+ if (my_data->current_backend_cfg[idx].bitwidth_mixer_ctl) {
+ ctl = mixer_get_ctl_by_name(adev->mixer,
+ my_data->current_backend_cfg[idx].bitwidth_mixer_ctl);
+ id_string = platform_get_mixer_control(ctl);
+ if (id_string) {
+ cfg_value = audio_extn_utils_get_bit_width_from_string(id_string);
+ if (cfg_value > 0)
+ my_data->current_backend_cfg[idx].bit_width = cfg_value;
+ }
+ }
+
+ if (my_data->current_backend_cfg[idx].samplerate_mixer_ctl) {
+ ctl = mixer_get_ctl_by_name(adev->mixer,
+ my_data->current_backend_cfg[idx].samplerate_mixer_ctl);
+ id_string = platform_get_mixer_control(ctl);
+ if (id_string) {
+ cfg_value = audio_extn_utils_get_sample_rate_from_string(id_string);
+ if (cfg_value > 0)
+ my_data->current_backend_cfg[idx].sample_rate = cfg_value;
+ }
+ }
+
+ if (my_data->current_backend_cfg[idx].channels_mixer_ctl) {
+ ctl = mixer_get_ctl_by_name(adev->mixer,
+ my_data->current_backend_cfg[idx].channels_mixer_ctl);
+ id_string = platform_get_mixer_control(ctl);
+ if (id_string) {
+ cfg_value = audio_extn_utils_get_channels_from_string(id_string);
+ if (cfg_value > 0)
+ my_data->current_backend_cfg[idx].channels = cfg_value;
+ }
+ }
+ }
+
ret = audio_extn_utils_get_codec_version(snd_card_name,
my_data->adev->snd_card,
my_data->codec_version);
@@ -2391,6 +2452,9 @@
my_data->current_backend_cfg[USB_AUDIO_RX_BACKEND].channels_mixer_ctl =
strdup("USB_AUDIO_RX Channels");
+ if (property_get_bool("vendor.audio.apptype.multirec.enabled", false))
+ my_data->use_generic_handset = true;
+
my_data->edid_info = NULL;
free(snd_card_name);
free(snd_card_name_t);
@@ -3279,9 +3343,9 @@
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Voice Rx Gain";
int vol_index = 0, ret = 0;
- uint32_t set_values[ ] = {0,
- ALL_SESSION_VSID,
- DEFAULT_VOLUME_RAMP_DURATION_MS};
+ long set_values[ ] = {0,
+ ALL_SESSION_VSID,
+ DEFAULT_VOLUME_RAMP_DURATION_MS};
// Voice volume levels are mapped to adsp volume levels as follows.
// 100 -> 5, 80 -> 4, 60 -> 3, 40 -> 2, 20 -> 1 0 -> 0
@@ -3295,7 +3359,7 @@
__func__, mixer_ctl_name);
ret = -EINVAL;
} else {
- ALOGV("%s: Setting voice volume index: %d", __func__, set_values[0]);
+ ALOGV("%s: Setting voice volume index: %ld", __func__, set_values[0]);
mixer_ctl_set_array(ctl, set_values, ARRAY_SIZE(set_values));
}
@@ -3316,9 +3380,9 @@
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Voice Tx Mute";
int ret = 0;
- uint32_t set_values[ ] = {0,
- ALL_SESSION_VSID,
- DEFAULT_MUTE_RAMP_DURATION_MS};
+ long set_values[ ] = {0,
+ ALL_SESSION_VSID,
+ DEFAULT_MUTE_RAMP_DURATION_MS};
set_values[0] = state;
ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
@@ -3348,9 +3412,9 @@
struct mixer_ctl *ctl;
char *mixer_ctl_name = NULL;
int ret = 0;
- uint32_t set_values[ ] = {0,
- ALL_SESSION_VSID,
- 0};
+ long set_values[ ] = {0,
+ ALL_SESSION_VSID,
+ 0};
if(dir == NULL) {
ALOGE("%s: Invalid direction:%s", __func__, dir);
return -EINVAL;
@@ -4093,6 +4157,17 @@
snd_device = SND_DEVICE_IN_VOICE_USB_HEADSET_MIC;
}
}
+ } else if (my_data->use_generic_handset == true && // system prop is enabled
+ (my_data->source_mic_type & SOURCE_QUAD_MIC) && // AND 4mic is available
+ ((in_device & AUDIO_DEVICE_IN_BUILTIN_MIC) || // AND device is buit-in mic or back mic
+ (in_device & AUDIO_DEVICE_IN_BACK_MIC)) &&
+ (my_data->fluence_in_audio_rec == true && // AND fluencepro is enabled
+ my_data->fluence_type & FLUENCE_QUAD_MIC) &&
+ (source == AUDIO_SOURCE_CAMCORDER || // AND source is cam/mic/unprocessed
+ source == AUDIO_SOURCE_UNPROCESSED ||
+ source == AUDIO_SOURCE_MIC)) {
+ snd_device = SND_DEVICE_IN_HANDSET_GENERIC_QMIC;
+ platform_set_echo_reference(adev, true, out_device);
} else if (source == AUDIO_SOURCE_CAMCORDER) {
if (in_device & AUDIO_DEVICE_IN_BUILTIN_MIC ||
in_device & AUDIO_DEVICE_IN_BACK_MIC) {
@@ -4391,8 +4466,8 @@
struct audio_device *adev = my_data->adev;
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Slowtalk Enable";
- uint32_t set_values[ ] = {0,
- ALL_SESSION_VSID};
+ long set_values[ ] = {0,
+ ALL_SESSION_VSID};
set_values[0] = state;
ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
@@ -4422,8 +4497,8 @@
struct mixer_ctl *ctl;
char *mixer_ctl_name = "HD Voice Enable";
int ret = 0;
- uint32_t set_values[ ] = {0,
- ALL_SESSION_VSID};
+ long set_values[ ] = {0,
+ ALL_SESSION_VSID};
set_values[0] = state;
ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
@@ -4546,6 +4621,7 @@
goto done_key_audcal;
}
+ memset(&cal, 0, sizeof(acdb_audio_cal_cfg_t));
/* parse audio calibration keys */
ret = parse_audiocal_cfg(parms, &cal);
@@ -4922,6 +4998,8 @@
ret=-EINVAL;
goto done;
}
+
+ memset(&cal, 0, sizeof(acdb_audio_cal_cfg_t));
/* parse audiocal configuration keys */
ret = parse_audiocal_cfg(query, &cal);
if(ret == 0) {
@@ -6625,7 +6703,7 @@
char mixer_ctl_name[44] = {0}; // max length of name is 44 as defined
int ret;
unsigned int i;
- int set_values[FCC_8] = {0};
+ long set_values[FCC_8] = {0};
struct platform_data *my_data = (struct platform_data *)platform;
struct audio_device *adev = my_data->adev;
ALOGV("%s channel_count:%d",__func__, ch_count);
@@ -6656,7 +6734,7 @@
set_values[i] = ch_map[i];
}
- ALOGD("%s: set mapping(%d %d %d %d %d %d %d %d) for channel:%d", __func__,
+ ALOGD("%s: set mapping(%ld %ld %ld %ld %ld %ld %ld %ld) for channel:%d", __func__,
set_values[0], set_values[1], set_values[2], set_values[3], set_values[4],
set_values[5], set_values[6], set_values[7], ch_count);
@@ -6970,7 +7048,7 @@
struct mixer_ctl *ctl;
char *mixer_ctl_name = "Device PP Params";
int ret = 0;
- uint32_t set_values[] = {0,0};
+ long set_values[] = {0,0};
set_values[0] = param;
set_values[1] = value;
@@ -7593,7 +7671,7 @@
return sample_rate;
}
-#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670)
+#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670) || defined (PLATFORM_QCS605)
int platform_get_mmap_data_fd(void *platform, int fe_dev, int dir, int *fd,
uint32_t *size)
{
@@ -7629,3 +7707,20 @@
return -1;
}
#endif
+
+static const char *platform_get_mixer_control(struct mixer_ctl *ctl)
+{
+ int id = -1;
+ const char *id_string = NULL;
+
+ if (!ctl) {
+ ALOGD("%s: mixer ctl not obtained", __func__);
+ } else {
+ id = mixer_ctl_get_value(ctl, 0);
+ if (id >= 0) {
+ id_string = mixer_ctl_get_enum_string(ctl, id);
+ }
+ }
+
+ return id_string;
+}
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index 4fa9442..db86cdc 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -228,6 +228,7 @@
SND_DEVICE_IN_HANDSET_8MIC,
SND_DEVICE_IN_EC_REF_LOOPBACK_MONO,
SND_DEVICE_IN_EC_REF_LOOPBACK_STEREO,
+ SND_DEVICE_IN_HANDSET_GENERIC_QMIC,
SND_DEVICE_IN_END,
SND_DEVICE_MAX = SND_DEVICE_IN_END,
@@ -362,11 +363,11 @@
#define PLAYBACK_OFFLOAD_DEVICE 9
// Direct_PCM
-#if defined (PLATFORM_MSM8994) || defined (PLATFORM_MSM8996) || defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670)
+#if defined (PLATFORM_MSM8994) || defined (PLATFORM_MSM8996) || defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) ||defined (PLATFORM_QCS605)
#define PLAYBACK_OFFLOAD_DEVICE2 17
#endif
-#if defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8996) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670)
+#if defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8996) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) || defined(PLATFORM_QCS605)
#define PLAYBACK_OFFLOAD_DEVICE3 18
#define PLAYBACK_OFFLOAD_DEVICE4 34
#define PLAYBACK_OFFLOAD_DEVICE5 35
@@ -491,7 +492,7 @@
#define FM_RX_VOLUME "PRI MI2S LOOPBACK Volume"
#elif PLATFORM_MSM8996
#define FM_RX_VOLUME "Tert MI2S LOOPBACK Volume"
-#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM670)
+#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM670) || defined (PLATFORM_QCS605)
#define FM_RX_VOLUME "SLIMBUS_8 LOOPBACK Volume"
#else
#define FM_RX_VOLUME "Internal FM RX Volume"
diff --git a/hal/voice_extn/compress_voip.c b/hal/voice_extn/compress_voip.c
index 1ec5fbc..2736d68 100644
--- a/hal/voice_extn/compress_voip.c
+++ b/hal/voice_extn/compress_voip.c
@@ -134,8 +134,8 @@
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Voip Rx Gain";
int vol_index = 0;
- uint32_t set_values[ ] = {0,
- DEFAULT_VOLUME_RAMP_DURATION_MS};
+ long set_values[ ] = {0,
+ DEFAULT_VOLUME_RAMP_DURATION_MS};
ALOGV("%s: enter", __func__);
@@ -152,7 +152,7 @@
__func__, mixer_ctl_name);
return -EINVAL;
}
- ALOGV("%s: Setting voip volume index: %d", __func__, set_values[0]);
+ ALOGV("%s: Setting voip volume index: %ld", __func__, set_values[0]);
mixer_ctl_set_array(ctl, set_values, ARRAY_SIZE(set_values));
ALOGV("%s: exit", __func__);
@@ -163,8 +163,8 @@
{
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Voip Tx Mute";
- uint32_t set_values[ ] = {0,
- DEFAULT_VOLUME_RAMP_DURATION_MS};
+ long set_values[ ] = {0,
+ DEFAULT_VOLUME_RAMP_DURATION_MS};
ALOGV("%s: enter, state=%d", __func__, state);
@@ -187,7 +187,7 @@
{
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Voip Mode Config";
- uint32_t set_values[ ] = {0};
+ long set_values[ ] = {0};
int mode;
ALOGD("%s: enter, format=%d", __func__, format);
@@ -212,7 +212,7 @@
{
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Voip Rate Config";
- uint32_t set_values[ ] = {0};
+ long set_values[ ] = {0};
ALOGD("%s: enter, rate=%d", __func__, rate);
@@ -233,7 +233,7 @@
{
struct mixer_ctl *ctl;
const char *mixer_ctl_name = "Voip Dtx Mode";
- uint32_t set_values[ ] = {0};
+ long set_values[ ] = {0};
ALOGD("%s: enter, enable=%d", __func__, enable);
diff --git a/hal/voice_extn/voice_extn.h b/hal/voice_extn/voice_extn.h
index 7f10d0c..f35344f 100644
--- a/hal/voice_extn/voice_extn.h
+++ b/hal/voice_extn/voice_extn.h
@@ -146,56 +146,56 @@
static int __unused voice_extn_compress_voip_close_output_stream(
struct audio_stream *stream __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return -ENOSYS;
}
static int __unused voice_extn_compress_voip_open_output_stream(
struct stream_out *out __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return -ENOSYS;
}
static int __unused voice_extn_compress_voip_close_input_stream(
struct audio_stream *stream __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return -ENOSYS;
}
static int __unused voice_extn_compress_voip_open_input_stream(
struct stream_in *in __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return -ENOSYS;
}
static int __unused voice_extn_compress_voip_out_get_buffer_size(
struct stream_out *stream __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return -ENOSYS;
}
static int __unused voice_extn_compress_voip_in_get_buffer_size(
struct stream_in *in __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return -ENOSYS;
}
static int __unused voice_extn_compress_voip_start_input_stream(
struct stream_in *in __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return -ENOSYS;
}
static int __unused voice_extn_compress_voip_start_output_stream(
struct stream_out *out __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return -ENOSYS;
}
@@ -203,7 +203,7 @@
struct audio_device *adev __unused,
bool state __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return 0;
}
@@ -211,7 +211,7 @@
struct audio_device *adev __unused,
float volume __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return 0;
}
@@ -220,7 +220,7 @@
snd_device_t *out_snd_device __unused,
snd_device_t *in_snd_device __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return -ENOSYS;
}
@@ -228,7 +228,7 @@
struct audio_device *adev __unused,
struct str_parms *parms __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return -ENOSYS;
}
@@ -236,7 +236,7 @@
struct str_parms *query __unused,
struct str_parms *reply __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
}
static void __unused voice_extn_compress_voip_out_get_parameters(
@@ -244,7 +244,7 @@
struct str_parms *query __unused,
struct str_parms *reply __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
}
static void __unused voice_extn_compress_voip_in_get_parameters(
@@ -252,40 +252,40 @@
struct str_parms *query __unused,
struct str_parms *reply __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
}
static bool __unused voice_extn_compress_voip_pcm_prop_check()
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return false;
}
static bool __unused voice_extn_compress_voip_is_active(
const struct audio_device *adev __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return false;
}
static bool __unused voice_extn_compress_voip_is_format_supported(
audio_format_t format __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return true;
}
static bool __unused voice_extn_compress_voip_is_config_supported(
struct audio_config *config __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return true;
}
static bool __unused voice_extn_compress_voip_is_started(
struct audio_device *adev __unused)
{
- ALOGE("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
+ ALOGV("%s: COMPRESS_VOIP_ENABLED is not defined", __func__);
return false;
}
diff --git a/mm-audio/aenc-aac/qdsp6/Android.mk b/mm-audio/aenc-aac/qdsp6/Android.mk
index 40e6744..b427233 100644
--- a/mm-audio/aenc-aac/qdsp6/Android.mk
+++ b/mm-audio/aenc-aac/qdsp6/Android.mk
@@ -39,6 +39,10 @@
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+ifneq ($(filter sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
+ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
+ LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
+endif
include $(BUILD_SHARED_LIBRARY)
@@ -50,7 +54,6 @@
mm-aac-enc-test-inc := $(LOCAL_PATH)/inc
mm-aac-enc-test-inc += $(LOCAL_PATH)/test
-mm-aac-enc-test-inc += $(TARGET_OUT_HEADERS)/mm-audio/audio-alsa
mm-aac-enc-test-inc += $(TARGET_OUT_HEADERS)/mm-core/omxcore
LOCAL_MODULE := mm-aenc-omxaac-test
@@ -60,7 +63,6 @@
LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := libmm-omxcore
LOCAL_SHARED_LIBRARIES += libOmxAacEnc
-LOCAL_SHARED_LIBRARIES += libaudioalsa
LOCAL_SRC_FILES := test/omx_aac_enc_test.c
include $(BUILD_EXECUTABLE)
diff --git a/mm-audio/aenc-aac/qdsp6/test/omx_aac_enc_test.c b/mm-audio/aenc-aac/qdsp6/test/omx_aac_enc_test.c
index b4b0be8..5239a8e 100644
--- a/mm-audio/aenc-aac/qdsp6/test/omx_aac_enc_test.c
+++ b/mm-audio/aenc-aac/qdsp6/test/omx_aac_enc_test.c
@@ -56,9 +56,6 @@
#include <pthread.h>
#include "QOMX_AudioExtensions.h"
#include "QOMX_AudioIndexExtensions.h"
-#ifdef AUDIOV2
-#include "control.h"
-#endif
#include <linux/ioctl.h>
typedef unsigned char uint8;
@@ -82,14 +79,6 @@
void audaac_rec_install_adts_header_variable (uint16 byte_num);
void Release_Encoder();
-#ifdef AUDIOV2
-unsigned short session_id;
-int device_id;
-int control = 0;
-const char *device="handset_tx";
-#define DIR_TX 2
-#endif
-
#define AACHDR_LAYER_SIZE 2
#define AACHDR_CRC_SIZE 1
#define AAC_PROFILE_SIZE 2
@@ -705,22 +694,6 @@
DEBUG_PRINT ("\nOMX_FreeHandle error. Error code: %d\n", result);
}
/* Deinit OpenMAX */
- if(tunnel)
- {
- #ifdef AUDIOV2
- if (msm_route_stream(DIR_TX,session_id,device_id, 0))
- {
- DEBUG_PRINT("\ncould not set stream routing\n");
- return -1;
- }
- if (msm_en_device(device_id, 0))
- {
- DEBUG_PRINT("\ncould not enable device\n");
- return -1;
- }
- msm_mixer_close();
- #endif
- }
OMX_Deinit();
ebd_cnt=0;
bOutputEosReached = false;
@@ -898,29 +871,6 @@
OMX_SetParameter(aac_enc_handle,OMX_IndexParamAudioAac,&aacparam);
OMX_GetExtensionIndex(aac_enc_handle,"OMX.Qualcomm.index.audio.sessionId",&index);
OMX_GetParameter(aac_enc_handle,index,&streaminfoparam);
- if(tunnel)
- {
- #ifdef AUDIOV2
- session_id = streaminfoparam.sessionId;
- control = msm_mixer_open("/dev/snd/controlC0", 0);
- if(control < 0)
- printf("ERROR opening the device\n");
- device_id = msm_get_device(device);
- DEBUG_PRINT ("\ndevice_id = %d\n",device_id);
- DEBUG_PRINT("\nsession_id = %d\n",session_id);
- if (msm_en_device(device_id, 1))
- {
- perror("could not enable device\n");
- return -1;
- }
-
- if (msm_route_stream(DIR_TX,session_id,device_id, 1))
- {
- perror("could not set stream routing\n");
- return -1;
- }
- #endif
- }
DEBUG_PRINT ("\nOMX_SendCommand Encoder -> IDLE\n");
OMX_SendCommand(aac_enc_handle, OMX_CommandStateSet, OMX_StateIdle,0);
/* wait_for_event(); should not wait here event complete status will
diff --git a/mm-audio/aenc-amrnb/qdsp6/Android.mk b/mm-audio/aenc-amrnb/qdsp6/Android.mk
index 62124e9..3fa619e 100644
--- a/mm-audio/aenc-amrnb/qdsp6/Android.mk
+++ b/mm-audio/aenc-amrnb/qdsp6/Android.mk
@@ -39,6 +39,10 @@
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+ifneq ($(filter sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
+ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
+ LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
+endif
include $(BUILD_SHARED_LIBRARY)
@@ -52,7 +56,6 @@
mm-amr-enc-test-inc += $(LOCAL_PATH)/test
mm-amr-enc-test-inc += $(TARGET_OUT_HEADERS)/mm-core/omxcore
-mm-amr-enc-test-inc += $(TARGET_OUT_HEADERS)/mm-audio/audio-alsa
LOCAL_MODULE := mm-aenc-omxamr-test
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := $(libOmxAmrEnc-def)
@@ -60,7 +63,6 @@
LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := libmm-omxcore
LOCAL_SHARED_LIBRARIES += libOmxAmrEnc
-LOCAL_SHARED_LIBRARIES += libaudioalsa
LOCAL_SRC_FILES := test/omx_amr_enc_test.c
include $(BUILD_EXECUTABLE)
diff --git a/mm-audio/aenc-amrnb/qdsp6/test/omx_amr_enc_test.c b/mm-audio/aenc-amrnb/qdsp6/test/omx_amr_enc_test.c
index 58215c4..9bdf6dc 100644
--- a/mm-audio/aenc-amrnb/qdsp6/test/omx_amr_enc_test.c
+++ b/mm-audio/aenc-amrnb/qdsp6/test/omx_amr_enc_test.c
@@ -57,10 +57,6 @@
#include <pthread.h>
#include "QOMX_AudioExtensions.h"
#include "QOMX_AudioIndexExtensions.h"
-#ifdef AUDIOV2
-#include "control.h"
-#endif
-
#include <linux/ioctl.h>
@@ -72,14 +68,6 @@
/* maximum ADTS frame header length */
void Release_Encoder();
-#ifdef AUDIOV2
-unsigned short session_id;
-int device_id;
-int control = 0;
-const char *device="handset_tx";
-#define DIR_TX 2
-#endif
-
uint32_t samplerate = 8000;
uint32_t channels = 1;
uint32_t bandmode = 7;
@@ -635,22 +623,6 @@
}
/* Deinit OpenMAX */
- if(tunnel)
- {
- #ifdef AUDIOV2
- if (msm_route_stream(DIR_TX,session_id,device_id, 0))
- {
- DEBUG_PRINT("\ncould not set stream routing\n");
- return -1;
- }
- if (msm_en_device(device_id, 0))
- {
- DEBUG_PRINT("\ncould not enable device\n");
- return -1;
- }
- msm_mixer_close();
- #endif
- }
OMX_Deinit();
ebd_cnt=0;
bOutputEosReached = false;
@@ -830,27 +802,6 @@
OMX_SetParameter(amr_enc_handle,OMX_IndexParamAudioAmr,&amrparam);
OMX_GetExtensionIndex(amr_enc_handle,"OMX.Qualcomm.index.audio.sessionId",&index);
OMX_GetParameter(amr_enc_handle,index,&streaminfoparam);
- if(tunnel) {
- #ifdef AUDIOV2
- session_id = streaminfoparam.sessionId;
- control = msm_mixer_open("/dev/snd/controlC0", 0);
- if(control < 0)
- printf("ERROR opening the device\n");
- device_id = msm_get_device(device);
- DEBUG_PRINT ("\ndevice_id = %d\n",device_id);
- DEBUG_PRINT("\nsession_id = %d\n",session_id);
- if (msm_en_device(device_id, 1))
- {
- perror("could not enable device\n");
- return -1;
- }
- if (msm_route_stream(DIR_TX,session_id,device_id, 1))
- {
- perror("could not set stream routing\n");
- return -1;
- }
- #endif
- }
DEBUG_PRINT ("\nOMX_SendCommand Encoder -> IDLE\n");
OMX_SendCommand(amr_enc_handle, OMX_CommandStateSet, OMX_StateIdle,0);
diff --git a/mm-audio/aenc-evrc/qdsp6/Android.mk b/mm-audio/aenc-evrc/qdsp6/Android.mk
index 7d56f5c..03965cb 100644
--- a/mm-audio/aenc-evrc/qdsp6/Android.mk
+++ b/mm-audio/aenc-evrc/qdsp6/Android.mk
@@ -39,6 +39,10 @@
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+ifneq ($(filter sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
+ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
+ LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
+endif
include $(BUILD_SHARED_LIBRARY)
@@ -51,7 +55,6 @@
mm-evrc-enc-test-inc := $(LOCAL_PATH)/inc
mm-evrc-enc-test-inc += $(LOCAL_PATH)/test
mm-evrc-enc-test-inc += $(TARGET_OUT_HEADERS)/mm-core/omxcore
-mm-evrc-enc-test-inc += $(TARGET_OUT_HEADERS)/mm-audio/audio-alsa
LOCAL_MODULE := mm-aenc-omxevrc-test
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := $(libOmxEvrcEnc-def)
@@ -59,7 +62,6 @@
LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := libmm-omxcore
LOCAL_SHARED_LIBRARIES += libOmxEvrcEnc
-LOCAL_SHARED_LIBRARIES += libaudioalsa
LOCAL_SRC_FILES := test/omx_evrc_enc_test.c
include $(BUILD_EXECUTABLE)
diff --git a/mm-audio/aenc-evrc/qdsp6/test/omx_evrc_enc_test.c b/mm-audio/aenc-evrc/qdsp6/test/omx_evrc_enc_test.c
index e5f72cc..f9071dc 100644
--- a/mm-audio/aenc-evrc/qdsp6/test/omx_evrc_enc_test.c
+++ b/mm-audio/aenc-evrc/qdsp6/test/omx_evrc_enc_test.c
@@ -57,10 +57,6 @@
#include <pthread.h>
#include "QOMX_AudioExtensions.h"
#include "QOMX_AudioIndexExtensions.h"
-#ifdef AUDIOV2
-#include "control.h"
-#endif
-
#include <linux/ioctl.h>
@@ -72,14 +68,6 @@
/* maximum ADTS frame header length */
void Release_Encoder();
-#ifdef AUDIOV2
-unsigned short session_id;
-int device_id;
-int control = 0;
-const char *device="handset_tx";
-#define DIR_TX 2
-#endif
-
uint32_t samplerate = 8000;
uint32_t channels = 1;
uint32_t min_bitrate = 0;
@@ -713,22 +701,6 @@
}
/* Deinit OpenMAX */
- if(tunnel)
- {
- #ifdef AUDIOV2
- if (msm_route_stream(DIR_TX,session_id,device_id, 0))
- {
- DEBUG_PRINT("\ncould not set stream routing\n");
- return -1;
- }
- if (msm_en_device(device_id, 0))
- {
- DEBUG_PRINT("\ncould not enable device\n");
- return -1;
- }
- msm_mixer_close();
- #endif
- }
OMX_Deinit();
ebd_cnt=0;
bOutputEosReached = false;
@@ -908,27 +880,6 @@
OMX_SetParameter(evrc_enc_handle,OMX_IndexParamAudioEvrc,&evrcparam);
OMX_GetExtensionIndex(evrc_enc_handle,"OMX.Qualcomm.index.audio.sessionId",&index);
OMX_GetParameter(evrc_enc_handle,index,&streaminfoparam);
- if(tunnel) {
- #ifdef AUDIOV2
- session_id = streaminfoparam.sessionId;
- control = msm_mixer_open("/dev/snd/controlC0", 0);
- if(control < 0)
- printf("ERROR opening the device\n");
- device_id = msm_get_device(device);
- DEBUG_PRINT ("\ndevice_id = %d\n",device_id);
- DEBUG_PRINT("\nsession_id = %d\n",session_id);
- if (msm_en_device(device_id, 1))
- {
- perror("could not enable device\n");
- return -1;
- }
- if (msm_route_stream(DIR_TX,session_id,device_id, 1))
- {
- perror("could not set stream routing\n");
- return -1;
- }
- #endif
- }
DEBUG_PRINT ("\nOMX_SendCommand Encoder -> IDLE\n");
OMX_SendCommand(evrc_enc_handle, OMX_CommandStateSet, OMX_StateIdle,0);
diff --git a/mm-audio/aenc-g711/qdsp6/Android.mk b/mm-audio/aenc-g711/qdsp6/Android.mk
index 62dc09a..6b2b453 100644
--- a/mm-audio/aenc-g711/qdsp6/Android.mk
+++ b/mm-audio/aenc-g711/qdsp6/Android.mk
@@ -40,6 +40,10 @@
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+ifneq ($(filter sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
+ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
+ LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
+endif
include $(BUILD_SHARED_LIBRARY)
diff --git a/mm-audio/aenc-g711/qdsp6/test/omx_g711_enc_test.c b/mm-audio/aenc-g711/qdsp6/test/omx_g711_enc_test.c
index 8815818..e528198 100644
--- a/mm-audio/aenc-g711/qdsp6/test/omx_g711_enc_test.c
+++ b/mm-audio/aenc-g711/qdsp6/test/omx_g711_enc_test.c
@@ -68,14 +68,6 @@
void Release_Encoder();
-#ifdef AUDIOV2
-unsigned short session_id;
-int device_id;
-int control = 0;
-const char *device="handset_tx";
-#define DIR_TX 2
-#endif
-
#define MIN(A,B) (((A) < (B))?(A):(B))
FILE *F1 = NULL;
diff --git a/mm-audio/aenc-qcelp13/qdsp6/Android.mk b/mm-audio/aenc-qcelp13/qdsp6/Android.mk
index 2664db5..f4b904a 100644
--- a/mm-audio/aenc-qcelp13/qdsp6/Android.mk
+++ b/mm-audio/aenc-qcelp13/qdsp6/Android.mk
@@ -39,6 +39,10 @@
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+ifneq ($(filter sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
+ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
+ LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
+endif
include $(BUILD_SHARED_LIBRARY)
@@ -54,7 +58,6 @@
mm-qcelp13-enc-test-inc += $(LOCAL_PATH)/test
mm-qcelp13-enc-test-inc += $(TARGET_OUT_HEADERS)/mm-core/omxcore
-mm-qcelp13-enc-test-inc += $(TARGET_OUT_HEADERS)/mm-audio/audio-alsa
LOCAL_MODULE := mm-aenc-omxqcelp13-test
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := $(libOmxQcelp13Enc-def)
@@ -62,7 +65,6 @@
LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := libmm-omxcore
LOCAL_SHARED_LIBRARIES += libOmxQcelp13Enc
-LOCAL_SHARED_LIBRARIES += libaudioalsa
LOCAL_SRC_FILES := test/omx_qcelp13_enc_test.c
include $(BUILD_EXECUTABLE)
diff --git a/mm-audio/aenc-qcelp13/qdsp6/test/omx_qcelp13_enc_test.c b/mm-audio/aenc-qcelp13/qdsp6/test/omx_qcelp13_enc_test.c
index a0b39c2..258fd2a 100644
--- a/mm-audio/aenc-qcelp13/qdsp6/test/omx_qcelp13_enc_test.c
+++ b/mm-audio/aenc-qcelp13/qdsp6/test/omx_qcelp13_enc_test.c
@@ -57,10 +57,6 @@
#include <pthread.h>
#include "QOMX_AudioExtensions.h"
#include "QOMX_AudioIndexExtensions.h"
-#ifdef AUDIOV2
-#include "control.h"
-#endif
-
#include <linux/ioctl.h>
@@ -72,14 +68,6 @@
/* maximum ADTS frame header length */
void Release_Encoder();
-#ifdef AUDIOV2
-unsigned short session_id;
-int device_id;
-int control = 0;
-const char *device="handset_tx";
-#define DIR_TX 2
-#endif
-
uint32_t samplerate = 8000;
uint32_t channels = 1;
uint32_t min_bitrate = 0;
@@ -714,22 +702,6 @@
}
/* Deinit OpenMAX */
- if(tunnel)
- {
- #ifdef AUDIOV2
- if (msm_route_stream(DIR_TX,session_id,device_id, 0))
- {
- DEBUG_PRINT("\ncould not set stream routing\n");
- return -1;
- }
- if (msm_en_device(device_id, 0))
- {
- DEBUG_PRINT("\ncould not enable device\n");
- return -1;
- }
- msm_mixer_close();
- #endif
- }
OMX_Deinit();
ebd_cnt=0;
bOutputEosReached = false;
@@ -909,27 +881,6 @@
OMX_SetParameter(qcelp13_enc_handle,OMX_IndexParamAudioQcelp13,&qcelp13param);
OMX_GetExtensionIndex(qcelp13_enc_handle,"OMX.Qualcomm.index.audio.sessionId",&index);
OMX_GetParameter(qcelp13_enc_handle,index,&streaminfoparam);
- if(tunnel) {
- #ifdef AUDIOV2
- session_id = streaminfoparam.sessionId;
- control = msm_mixer_open("/dev/snd/controlC0", 0);
- if(control < 0)
- printf("ERROR opening the device\n");
- device_id = msm_get_device(device);
- DEBUG_PRINT ("\ndevice_id = %d\n",device_id);
- DEBUG_PRINT("\nsession_id = %d\n",session_id);
- if (msm_en_device(device_id, 1))
- {
- perror("could not enable device\n");
- return -1;
- }
- if (msm_route_stream(DIR_TX,session_id,device_id, 1))
- {
- perror("could not set stream routing\n");
- return -1;
- }
- #endif
- }
DEBUG_PRINT ("\nOMX_SendCommand Encoder -> IDLE\n");
OMX_SendCommand(qcelp13_enc_handle, OMX_CommandStateSet, OMX_StateIdle,0);
diff --git a/post_proc/Android.mk b/post_proc/Android.mk
index cbc5f8e..86a2ab1 100644
--- a/post_proc/Android.mk
+++ b/post_proc/Android.mk
@@ -52,6 +52,11 @@
$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include \
$(call include-path-for, audio-effects)
+ifneq ($(filter sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
+ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
+ LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
+endif
+
include $(BUILD_SHARED_LIBRARY)
@@ -84,7 +89,7 @@
################################################################################
-ifneq ($(filter msm8992 msm8994 msm8996 msm8998 sdm660 sdm845 apq8098_latv sdm670,$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter msm8992 msm8994 msm8996 msm8998 sdm660 sdm845 apq8098_latv sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
include $(CLEAR_VARS)
@@ -116,6 +121,11 @@
hardware/qcom/audio/hal/audio_extn \
external/tinycompress/include
+ifneq ($(filter sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
+ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
+ LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
+endif
+
include $(BUILD_SHARED_LIBRARY)
endif
diff --git a/post_proc/asphere.c b/post_proc/asphere.c
index 885e85b..3ec2818 100644
--- a/post_proc/asphere.c
+++ b/post_proc/asphere.c
@@ -101,7 +101,8 @@
static int asphere_get_values_from_mixer(void)
{
- int ret = 0, val[2] = {-1, -1};
+ int ret = 0;
+ long val[2] = {-1, -1};
struct mixer_ctl *ctl = NULL;
struct mixer *mixer = mixer_open(MIXER_CARD);
if (mixer)
@@ -124,7 +125,8 @@
static int asphere_set_values_to_mixer(void)
{
- int ret = 0, val[2] = {-1, -1};
+ int ret = 0;
+ long val[2] = {-1, -1};
struct mixer_ctl *ctl = NULL;
struct mixer *mixer = mixer_open(MIXER_CARD);
if (mixer)
diff --git a/post_proc/effect_api.c b/post_proc/effect_api.c
index ab8576f..b01acc5 100644
--- a/post_proc/effect_api.c
+++ b/post_proc/effect_api.c
@@ -177,8 +177,8 @@
struct bass_boost_params *bassboost,
unsigned param_send_flags)
{
- int param_values[128] = {0};
- int *p_param_values = param_values;
+ long param_values[128] = {0};
+ long *p_param_values = param_values;
ALOGV("%s: flags 0x%x", __func__, param_send_flags);
*p_param_values++ = BASS_BOOST_MODULE;
@@ -260,8 +260,9 @@
struct pbe_params *pbe,
unsigned param_send_flags)
{
- int param_values[128] = {0};
- int i, *p_param_values = param_values, *cfg = NULL;
+ long param_values[128] = {0};
+ long *p_param_values = param_values;
+ int i, *cfg = NULL;
ALOGV("%s: enabled=%d", __func__, pbe->enable_flag);
*p_param_values++ = PBE_MODULE;
@@ -366,8 +367,8 @@
struct virtualizer_params *virtualizer,
unsigned param_send_flags)
{
- int param_values[128] = {0};
- int *p_param_values = param_values;
+ long param_values[128] = {0};
+ long *p_param_values = param_values;
ALOGV("%s: flags 0x%x", __func__, param_send_flags);
*p_param_values++ = VIRTUALIZER_MODULE;
@@ -486,8 +487,8 @@
static int eq_send_params(eff_mode_t mode, void *ctl, struct eq_params *eq,
unsigned param_send_flags)
{
- int param_values[128] = {0};
- int *p_param_values = param_values;
+ long param_values[128] = {0};
+ long *p_param_values = param_values;
uint32_t i;
ALOGV("%s: flags 0x%x", __func__, param_send_flags);
@@ -675,8 +676,8 @@
struct reverb_params *reverb,
unsigned param_send_flags)
{
- int param_values[128] = {0};
- int *p_param_values = param_values;
+ long param_values[128] = {0};
+ long *p_param_values = param_values;
ALOGV("%s: flags 0x%x", __func__, param_send_flags);
*p_param_values++ = REVERB_MODULE;
@@ -855,8 +856,8 @@
struct soft_volume_params vol,
unsigned param_send_flags)
{
- int param_values[128] = {0};
- int *p_param_values = param_values;
+ long param_values[128] = {0};
+ long *p_param_values = param_values;
uint32_t i;
ALOGV("%s", __func__);
@@ -921,8 +922,8 @@
struct soft_volume_params vol,
unsigned param_send_flags)
{
- int param_values[128] = {0};
- int *p_param_values = param_values;
+ long param_values[128] = {0};
+ long *p_param_values = param_values;
uint32_t i;
ALOGV("%s", __func__);
@@ -964,8 +965,8 @@
static int hpx_send_params(eff_mode_t mode, void *ctl,
unsigned param_send_flags)
{
- int param_values[128] = {0};
- int *p_param_values = param_values;
+ long param_values[128] = {0};
+ long *p_param_values = param_values;
uint32_t i;
ALOGV("%s", __func__);
diff --git a/qahw/Android.mk b/qahw/Android.mk
new file mode 100644
index 0000000..c7df9e3
--- /dev/null
+++ b/qahw/Android.mk
@@ -0,0 +1,38 @@
+ifeq ($(strip $(BOARD_SUPPORTS_QAHW)),true)
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+libqahw-inc := $(LOCAL_PATH)/inc
+
+LOCAL_MODULE := libqahwwrapper
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := $(libqahw-inc)
+
+LOCAL_SRC_FILES := \
+ src/qahw.c \
+ src/qahw_effect.c
+
+LOCAL_SHARED_LIBRARIES := \
+ liblog \
+ libcutils \
+ libhardware \
+ libdl
+
+LOCAL_CFLAGS += -Wall -Werror
+
+LOCAL_COPY_HEADERS_TO := mm-audio/qahw/inc
+LOCAL_COPY_HEADERS := inc/qahw.h
+LOCAL_COPY_HEADERS += inc/qahw_effect_api.h
+
+LOCAL_PRELINK_MODULE := false
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_COPY_HEADERS_TO := mm-audio/qahw_api/inc
+LOCAL_COPY_HEADERS := inc/qahw_defs.h
+
+include $(BUILD_COPY_HEADERS)
+endif
diff --git a/qahw/Makefile.am b/qahw/Makefile.am
new file mode 100644
index 0000000..b6ebd8b
--- /dev/null
+++ b/qahw/Makefile.am
@@ -0,0 +1,20 @@
+AM_CFLAGS = -I $(top_srcdir)/inc
+
+h_sources = inc/qahw.h \
+ inc/qahw_effect_api.h
+
+qahw_include_HEADERS = $(h_sources)
+qahw_includedir = $(includedir)/mm-audio/qahw/inc
+
+qahw_api_include_HEADERS = inc/qahw_defs.h
+qahw_api_includedir = $(includedir)/mm-audio/qahw_api/inc
+
+lib_LTLIBRARIES = libqahwwrapper.la
+libqahwwrapper_la_SOURCES = src/qahw.c \
+ src/qahw_effect.c
+
+libqahwwrapper_la_CFLAGS = $(AM_CFLAGS)
+libqahwwrapper_la_CFLAGS += -include stddef.h
+libqahwwrapper_la_CFLAGS += -D__unused=__attribute__\(\(__unused__\)\)
+libqahwwrapper_la_CFLAGS += -Werror
+libqahwwrapper_la_LDFLAGS = -shared -avoid-version -llog -lcutils -lhardware
diff --git a/qahw/configure.ac b/qahw/configure.ac
new file mode 100644
index 0000000..c87447e
--- /dev/null
+++ b/qahw/configure.ac
@@ -0,0 +1,36 @@
+# -*- Autoconf -*-
+# configure.ac -- Autoconf script for halinterface
+#
+
+# Process this file with autoconf to produce a configure script.
+
+# Requires autoconf tool later than 2.61
+AC_PREREQ([2.69])
+# Initialize the audiohalwrapper-interface package version 1.0.0
+AC_INIT(audiohalwrapperinterface,1.0.0)
+# Does not strictly follow GNU Coding standards
+AM_INIT_AUTOMAKE([foreign])
+# Disables auto rebuilding of configure, Makefile.ins
+#AM_MAINTAINER_MODE
+# defines some macros variable to be included by source
+AC_CONFIG_HEADERS([config.h])
+# defines some macros variable to be included by source
+AC_CONFIG_MACRO_DIR([m4])
+
+# Checks for programs.
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+AC_PROG_AWK
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+PKG_PROG_PKG_CONFIG
+
+AC_CONFIG_FILES([ \
+ Makefile
+ ])
+
+AC_OUTPUT
diff --git a/qahw/inc/qahw.h b/qahw/inc/qahw.h
new file mode 100644
index 0000000..b7088ed
--- /dev/null
+++ b/qahw/inc/qahw.h
@@ -0,0 +1,482 @@
+/*
+ * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
+ * Copyright (C) 2011 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.
+ */
+
+#ifndef QTI_AUDIO_QAHW_H
+#define QTI_AUDIO_QAHW_H
+
+#include <stdint.h>
+#include <strings.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <cutils/bitops.h>
+#include <system/audio.h>
+#include "qahw_defs.h"
+
+__BEGIN_DECLS
+/*
+ * Helper macros for module implementors.
+ *
+ * The derived modules should provide convenience macros for supported
+ * versions so that implementations can explicitly specify module
+ * versions at definition time.
+ */
+
+#define QAHW_MAKE_API_VERSION(maj,min) \
+ ((((maj) & 0xff) << 8) | ((min) & 0xff))
+
+/* First generation of audio devices had version hardcoded to 0. all devices with
+ * versions < 1.0 will be considered of first generation API.
+ */
+#define QAHW_MODULE_API_VERSION_0_0 QAHW_MAKE_API_VERSION(0, 0)
+
+/* Minimal QTI audio HAL version supported by the audio framework */
+#define QAHW_MODULE_API_VERSION_MIN QAHW_MODULE_API_VERSION_0_0
+
+/**
+ * List of known audio HAL modules. This is the base name of the audio HAL
+ * library composed of the "audio." prefix, one of the base names below and
+ * a suffix specific to the device.
+ * e.g: audio.primary.goldfish.so or audio.a2dp.default.so
+ */
+
+#define QAHW_MODULE_ID_PRIMARY "audio.primary"
+#define QAHW_MODULE_ID_A2DP "audio.a2dp"
+#define QAHW_MODULE_ID_USB "audio.usb"
+
+typedef void qahw_module_handle_t;
+typedef void qahw_stream_handle_t;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/**************************************/
+/* Output stream specific APIs **/
+
+/*
+ * This method creates and opens the audio hardware output stream.
+ * The "address" parameter qualifies the "devices" audio device type if needed.
+ * The format format depends on the device type:
+ * - Bluetooth devices use the MAC address of the device in the form "00:11:22:AA:BB:CC"
+ * - USB devices use the ALSA card and device numbers in the form "card=X;device=Y"
+ * - Other devices may use a number or any other string.
+ */
+
+int qahw_open_output_stream_l(qahw_module_handle_t *hw_module,
+ audio_io_handle_t handle,
+ audio_devices_t devices,
+ audio_output_flags_t flags,
+ struct audio_config *config,
+ qahw_stream_handle_t **out_handle,
+ const char *address);
+
+int qahw_close_output_stream_l(qahw_stream_handle_t *out_handle);
+
+/*
+ * Return the sampling rate in Hz - eg. 44100.
+ */
+uint32_t qahw_out_get_sample_rate_l(const qahw_stream_handle_t *stream);
+
+/*
+ * use set_parameters with key QAHW_PARAMETER_STREAM_SAMPLING_RATE
+ */
+int qahw_out_set_sample_rate_l(qahw_stream_handle_t *stream, uint32_t rate);
+
+/*
+ * Return size of input/output buffer in bytes for this stream - eg. 4800.
+ * It should be a multiple of the frame size. See also get_input_buffer_size.
+ */
+size_t qahw_out_get_buffer_size_l(const qahw_stream_handle_t *stream);
+
+/*
+ * Return the channel mask -
+ * e.g. AUDIO_CHANNEL_OUT_STEREO or AUDIO_CHANNEL_IN_STEREO
+ */
+audio_channel_mask_t qahw_out_get_channels_l(const qahw_stream_handle_t *stream);
+
+/*
+ * Return the audio format - e.g. AUDIO_FORMAT_PCM_16_BIT
+ */
+audio_format_t qahw_out_get_format_l(const qahw_stream_handle_t *stream);
+
+/*
+ * Put the audio hardware input/output into standby mode.
+ * Driver should exit from standby mode at the next I/O operation.
+ * Returns 0 on success and <0 on failure.
+ */
+int qahw_out_standby_l(qahw_stream_handle_t *stream);
+
+/*
+ * set/get audio stream parameters. The function accepts a list of
+ * parameter key value pairs in the form: key1=value1;key2=value2;...
+ *
+ * Some keys are reserved for standard parameters (See AudioParameter class)
+ *
+ * If the implementation does not accept a parameter change while
+ * the output is active but the parameter is acceptable otherwise, it must
+ * return -ENOSYS.
+ *
+ * The audio flinger will put the stream in standby and then change the
+ * parameter value.
+ */
+int qahw_out_set_parameters_l(qahw_stream_handle_t *stream, const char*kv_pairs);
+
+/*
+ * Returns a pointer to a heap allocated string. The caller is responsible
+ * for freeing the memory for it using free().
+ */
+char* qahw_out_get_parameters_l(const qahw_stream_handle_t *stream,
+ const char *keys);
+
+/* API to set playback stream specific config parameters */
+int qahw_out_set_param_data_l(qahw_stream_handle_t *out_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload);
+
+/* API to get playback stream specific config parameters */
+int qahw_out_get_param_data_l(qahw_stream_handle_t *out_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload);
+
+/*
+ * Return the audio hardware driver estimated latency in milliseconds.
+ */
+uint32_t qahw_out_get_latency_l(const qahw_stream_handle_t *stream);
+
+/*
+ * Use this method in situations where audio mixing is done in the
+ * hardware. This method serves as a direct interface with hardware,
+ * allowing you to directly set the volume as apposed to via the framework.
+ * This method might produce multiple PCM outputs or hardware accelerated
+ * codecs, such as MP3 or AAC.
+ */
+int qahw_out_set_volume_l(qahw_stream_handle_t *stream, float left, float right);
+
+/*
+ * Write audio buffer present in meta_data starting from offset
+ * along with timestamp to driver. Returns number of bytes
+ * written or a negative status_t. If at least one frame was written successfully
+ * prior to the error, it is suggested that the driver return that successful
+ * (short) byte count and then return an error in the subsequent call.
+ * timestamp is only sent driver is session has been opened with timestamp flag
+ * otherwise its ignored.
+ *
+ * If set_callback() has previously been called to enable non-blocking mode
+ * the write() is not allowed to block. It must write only the number of
+ * bytes that currently fit in the driver/hardware buffer and then return
+ * this byte count. If this is less than the requested write size the
+ * callback function must be called when more space is available in the
+ * driver/hardware buffer.
+ */
+ssize_t qahw_out_write_l(qahw_stream_handle_t *stream,
+ qahw_out_buffer_t *out_buf);
+
+/*
+ * return the number of audio frames written by the audio dsp to DAC since
+ * the output has exited standby
+ */
+int qahw_out_get_render_position_l(const qahw_stream_handle_t *stream,
+ uint32_t *dsp_frames);
+
+/*
+ * set the callback function for notifying completion of non-blocking
+ * write and drain.
+ * Calling this function implies that all future rite() and drain()
+ * must be non-blocking and use the callback to signal completion.
+ */
+int qahw_out_set_callback_l(qahw_stream_handle_t *stream,
+ qahw_stream_callback_t callback,
+ void *cookie);
+
+/*
+ * Notifies to the audio driver to stop playback however the queued buffers are
+ * retained by the hardware. Useful for implementing pause/resume. Empty implementation
+ * if not supported however should be implemented for hardware with non-trivial
+ * latency. In the pause state audio hardware could still be using power. User may
+ * consider calling suspend after a timeout.
+ *
+ * Implementation of this function is mandatory for offloaded playback.
+ */
+int qahw_out_pause_l(qahw_stream_handle_t *out_handle);
+
+/*
+ * Notifies to the audio driver to resume playback following a pause.
+ * Returns error if called without matching pause.
+ *
+ * Implementation of this function is mandatory for offloaded playback.
+ */
+int qahw_out_resume_l(qahw_stream_handle_t *out_handle);
+
+/*
+ * Requests notification when data buffered by the driver/hardware has
+ * been played. If set_callback() has previously been called to enable
+ * non-blocking mode, the drain() must not block, instead it should return
+ * quickly and completion of the drain is notified through the callback.
+ * If set_callback() has not been called, the drain() must block until
+ * completion.
+ * If type==AUDIO_DRAIN_ALL, the drain completes when all previously written
+ * data has been played.
+ * If type==AUDIO_DRAIN_EARLY_NOTIFY, the drain completes shortly before all
+ * data for the current track has played to allow time for the framework
+ * to perform a gapless track switch.
+ *
+ * Drain must return immediately on stop() and flush() call
+ *
+ * Implementation of this function is mandatory for offloaded playback.
+ */
+int qahw_out_drain_l(qahw_stream_handle_t *out_handle, qahw_drain_type_t type);
+
+/*
+ * Notifies to the audio driver to flush the queued data. Stream must already
+ * be paused before calling flush().
+ *
+ * Implementation of this function is mandatory for offloaded playback.
+ */
+int qahw_out_flush_l(qahw_stream_handle_t *out_handle);
+
+/*
+ * Return a recent count of the number of audio frames presented to an external observer.
+ * This excludes frames which have been written but are still in the pipeline.
+ * The count is not reset to zero when output enters standby.
+ * Also returns the value of CLOCK_MONOTONIC as of this presentation count.
+ * The returned count is expected to be 'recent',
+ * but does not need to be the most recent possible value.
+ * However, the associated time should correspond to whatever count is returned.
+ * Example: assume that N+M frames have been presented, where M is a 'small' number.
+ * Then it is permissible to return N instead of N+M,
+ * and the timestamp should correspond to N rather than N+M.
+ * The terms 'recent' and 'small' are not defined.
+ * They reflect the quality of the implementation.
+ *
+ * 3.0 and higher only.
+ */
+int qahw_out_get_presentation_position_l(const qahw_stream_handle_t *out_handle,
+ uint64_t *frames, struct timespec *timestamp);
+
+/* Input stream specific APIs */
+
+/* This method creates and opens the audio hardware input stream */
+int qahw_open_input_stream_l(qahw_module_handle_t *hw_module,
+ audio_io_handle_t handle,
+ audio_devices_t devices,
+ struct audio_config *config,
+ qahw_stream_handle_t **stream_in,
+ audio_input_flags_t flags,
+ const char *address,
+ audio_source_t source);
+
+int qahw_close_input_stream_l(qahw_stream_handle_t *in_handle);
+
+/*
+ * Return the sampling rate in Hz - eg. 44100.
+ */
+uint32_t qahw_in_get_sample_rate_l(const qahw_stream_handle_t *in_handle);
+
+/*
+ * currently unused - use set_parameters with key
+ * QAHW_PARAMETER_STREAM_SAMPLING_RATE
+ */
+int qahw_in_set_sample_rate_l(qahw_stream_handle_t *in_handle, uint32_t rate);
+
+/*
+ * Return size of input/output buffer in bytes for this stream - eg. 4800.
+ * It should be a multiple of the frame size. See also get_input_buffer_size.
+ */
+size_t qahw_in_get_buffer_size_l(const qahw_stream_handle_t *in_handle);
+
+/*
+ * Return the channel mask -
+ * e.g. AUDIO_CHANNEL_OUT_STEREO or AUDIO_CHANNEL_IN_STEREO
+ */
+audio_channel_mask_t qahw_in_get_channels_l(const qahw_stream_handle_t *in_handle);
+
+/*
+ * Return the audio format - e.g. AUDIO_FORMAT_PCM_16_BIT
+ */
+audio_format_t qahw_in_get_format_l(const qahw_stream_handle_t *in_handle);
+
+/*
+ * currently unused - use set_parameters with key
+ * QAHW_PARAMETER_STREAM_FORMAT
+ */
+int qahw_in_set_format_l(qahw_stream_handle_t *in_handle, audio_format_t format);
+
+/*
+ * Put the audio hardware input/output into standby mode.
+ * Driver should exit from standby mode at the next I/O operation.
+ * Returns 0 on success and <0 on failure.
+ */
+int qahw_in_standby_l(qahw_stream_handle_t *in_handle);
+
+/*
+ * set/get audio stream parameters. The function accepts a list of
+ * parameter key value pairs in the form: key1=value1;key2=value2;...
+ *
+ * Some keys are reserved for standard parameters (See AudioParameter class)
+ *
+ * If the implementation does not accept a parameter change while
+ * the output is active but the parameter is acceptable otherwise, it must
+ * return -ENOSYS.
+ *
+ * The audio flinger will put the stream in standby and then change the
+ * parameter value.
+ */
+int qahw_in_set_parameters_l(qahw_stream_handle_t *in_handle, const char *kv_pairs);
+
+/*
+ * Returns a pointer to a heap allocated string. The caller is responsible
+ * for freeing the memory for it using free().
+ */
+char* qahw_in_get_parameters_l(const qahw_stream_handle_t *in_handle,
+ const char *keys);
+/*
+ * Read audio buffer in from audio driver. Returns number of bytes read, or a
+ * negative status_t. meta_data structure is filled buffer pointer, start
+ * offset and valid catpure timestamp (if session is opened with timetamp flag)
+ * and buffer. if at least one frame was read prior to the error,
+ * read should return that byte count and then return an error in the
+ * subsequent call.
+ */
+ssize_t qahw_in_read_l(qahw_stream_handle_t *in_handle,
+ qahw_in_buffer_t *in_buf);
+/*
+ * Return the amount of input frames lost in the audio driver since the
+ * last call of this function.
+ * Audio driver is expected to reset the value to 0 and restart counting
+ * upon returning the current value by this function call.
+ * Such loss typically occurs when the user space process is blocked
+ * longer than the capacity of audio driver buffers.
+ *
+ * Unit: the number of input audio frames
+ */
+uint32_t qahw_in_get_input_frames_lost_l(qahw_stream_handle_t *in_handle);
+
+/*
+ * Return a recent count of the number of audio frames received and
+ * the clock time associated with that frame count.
+ *
+ * frames is the total frame count received. This should be as early in
+ * the capture pipeline as possible. In general,
+ * frames should be non-negative and should not go "backwards".
+ *
+ * time is the clock MONOTONIC time when frames was measured. In general,
+ * time should be a positive quantity and should not go "backwards".
+ *
+ * The status returned is 0 on success, -ENOSYS if the device is not
+ * ready/available, or -EINVAL if the arguments are null or otherwise invalid.
+ */
+int qahw_in_get_capture_position_l(const qahw_stream_handle_t *in_handle,
+ int64_t *frames, int64_t *time);
+
+/* Module specific APIs */
+
+/* convenience API for opening and closing an audio HAL module */
+qahw_module_handle_t *qahw_load_module_l(const char *hw_module_id);
+
+int qahw_unload_module_l(qahw_module_handle_t *hw_module);
+
+/*
+ * check to see if the audio hardware interface has been initialized.
+ * returns 0 on success, -ENODEV on failure.
+ */
+int qahw_init_check_l(const qahw_module_handle_t *hw_module);
+
+/* set the audio volume of a voice call. Range is between 0.0 and 1.0 */
+int qahw_set_voice_volume_l(qahw_module_handle_t *hw_module, float volume);
+
+/*
+ * set_mode is called when the audio mode changes. AUDIO_MODE_NORMAL mode
+ * is for standard audio playback, AUDIO_MODE_RINGTONE when a ringtone is
+ * playing, and AUDIO_MODE_IN_CALL when a call is in progress.
+ */
+int qahw_set_mode_l(qahw_module_handle_t *hw_module, audio_mode_t mode);
+
+/* Mute/unmute mic during voice/voip/HFP call */
+int qahw_set_mic_mute_l(qahw_module_handle_t *hw_module, bool state);
+
+/* Get mute/unmute status of mic during voice call */
+int qahw_get_mic_mute_l(qahw_module_handle_t *hw_module, bool *state);
+
+/* set/get global audio parameters */
+int qahw_set_parameters_l(qahw_module_handle_t *hw_module, const char *kv_pairs);
+
+/*
+ * Returns a pointer to a heap allocated string. The caller is responsible
+ * for freeing the memory for it using free().
+ */
+char* qahw_get_parameters_l(const qahw_module_handle_t *hw_module,
+ const char *keys);
+
+/* Returns audio input buffer size according to parameters passed or
+ * 0 if one of the parameters is not supported.
+ * See also get_buffer_size which is for a particular stream.
+ */
+size_t qahw_get_input_buffer_size_l(const qahw_module_handle_t *hw_module,
+ const struct audio_config *config);
+
+/*returns current QTI HAL version */
+int qahw_get_version_l();
+
+/* Api to implement get parameters based on keyword param_id
+ * and store data in payload.
+ */
+int qahw_get_param_data_l(const qahw_module_handle_t *hw_module,
+ qahw_param_id param_id,
+ qahw_param_payload *payload);
+
+/* Api to implement set parameters based on keyword param_id
+ * and data present in payload.
+ */
+int qahw_set_param_data_l(const qahw_module_handle_t *hw_module,
+ qahw_param_id param_id,
+ qahw_param_payload *payload);
+
+/* Creates an audio patch between several source and sink ports.
+ * The handle is allocated by the HAL and should be unique for this
+ * audio HAL module.
+ */
+int qahw_create_audio_patch_l(qahw_module_handle_t *hw_module,
+ unsigned int num_sources,
+ const struct audio_port_config *sources,
+ unsigned int num_sinks,
+ const struct audio_port_config *sinks,
+ audio_patch_handle_t *handle);
+
+/* Release an audio patch */
+int qahw_release_audio_patch_l(qahw_module_handle_t *hw_module,
+ audio_patch_handle_t handle);
+/* Fills the list of supported attributes for a given audio port.
+ * As input, "port" contains the information (type, role, address etc...)
+ * needed by the HAL to identify the port.
+ * As output, "port" contains possible attributes (sampling rates, formats,
+ * channel masks, gain controllers...) for this port.
+ */
+int qahw_get_audio_port_l(qahw_module_handle_t *hw_module,
+ struct audio_port *port);
+
+/* Set audio port configuration */
+int qahw_set_audio_port_config_l(qahw_module_handle_t *hw_module,
+ const struct audio_port_config *config);
+#ifdef __cplusplus
+}
+#endif
+
+__END_DECLS
+
+#endif // QTI_AUDIO_QAHW_H
diff --git a/qahw/inc/qahw_defs.h b/qahw/inc/qahw_defs.h
new file mode 100644
index 0000000..c13a1a4
--- /dev/null
+++ b/qahw/inc/qahw_defs.h
@@ -0,0 +1,393 @@
+/*
+ * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
+ * Copyright (C) 2011 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.
+ */
+
+#include <sys/cdefs.h>
+#include <stdint.h>
+
+#ifndef QTI_AUDIO_HAL_DEFS_H
+#define QTI_AUDIO_HAL_DEFS_H
+
+__BEGIN_DECLS
+
+/**************************************/
+
+/**
+ * standard audio parameters that the HAL may need to handle
+ */
+
+/**
+ * audio device parameters
+ */
+
+/* BT SCO Noise Reduction + Echo Cancellation parameters */
+#define QAHW_PARAMETER_KEY_BT_NREC "bt_headset_nrec"
+#define QAHW_PARAMETER_VALUE_ON "on"
+#define QAHW_PARAMETER_VALUE_OFF "off"
+
+/* TTY mode selection */
+#define QAHW_PARAMETER_KEY_TTY_MODE "tty_mode"
+#define QAHW_PARAMETER_VALUE_TTY_OFF "tty_off"
+#define QAHW_PARAMETER_VALUE_TTY_VCO "tty_vco"
+#define QAHW_PARAMETER_VALUE_TTY_HCO "tty_hco"
+#define QAHW_PARAMETER_VALUE_TTY_FULL "tty_full"
+
+/* Hearing Aid Compatibility - Telecoil (HAC-T) mode on/off
+ Strings must be in sync with CallFeaturesSetting.java */
+#define QAHW_PARAMETER_KEY_HAC "HACSetting"
+#define QAHW_PARAMETER_VALUE_HAC_ON "ON"
+#define QAHW_PARAMETER_VALUE_HAC_OFF "OFF"
+
+/* A2DP sink address set by framework */
+#define QAHW_PARAMETER_A2DP_SINK_ADDRESS "a2dp_sink_address"
+
+/* A2DP source address set by framework */
+#define QAHW_PARAMETER_A2DP_SOURCE_ADDRESS "a2dp_source_address"
+
+/* Screen state */
+#define QAHW_PARAMETER_KEY_SCREEN_STATE "screen_state"
+
+/* Bluetooth SCO wideband */
+#define QAHW_PARAMETER_KEY_BT_SCO_WB "bt_wbs"
+
+/* Get a new HW synchronization source identifier.
+ * Return a valid source (positive integer) or AUDIO_HW_SYNC_INVALID if an error occurs
+ * or no HW sync is available. */
+#define QAHW_PARAMETER_HW_AV_SYNC "hw_av_sync"
+
+/**
+ * audio stream parameters
+ */
+
+#define QAHW_PARAMETER_STREAM_ROUTING "routing" /* audio_devices_t */
+#define QAHW_PARAMETER_STREAM_FORMAT "format" /* audio_format_t */
+#define QAHW_PARAMETER_STREAM_CHANNELS "channels" /* audio_channel_mask_t */
+#define QAHW_PARAMETER_STREAM_FRAME_COUNT "frame_count" /* size_t */
+#define QAHW_PARAMETER_STREAM_INPUT_SOURCE "input_source" /* audio_source_t */
+#define QAHW_PARAMETER_STREAM_SAMPLING_RATE "sampling_rate" /* uint32_t */
+
+#define QAHW_PARAMETER_DEVICE_CONNECT "connect" /* audio_devices_t */
+#define QAHW_PARAMETER_DEVICE_DISCONNECT "disconnect" /* audio_devices_t */
+
+/* Query supported formats. The response is a '|' separated list of strings from
+ * audio_format_t enum e.g: "sup_formats=AUDIO_FORMAT_PCM_16_BIT" */
+#define QAHW_PARAMETER_STREAM_SUP_FORMATS "sup_formats"
+
+/* Query supported channel masks. The response is a '|' separated list of
+ * strings from audio_channel_mask_t enum
+ * e.g: "sup_channels=AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO" */
+#define QAHW_PARAMETER_STREAM_SUP_CHANNELS "sup_channels"
+
+/* Query supported sampling rates. The response is a '|' separated list of
+ * integer values e.g: "sup_sampling_rates=44100|48000" */
+#define QAHW_PARAMETER_STREAM_SUP_SAMPLING_RATES "sup_sampling_rates"
+
+/* Set the HW synchronization source for an output stream. */
+#define QAHW_PARAMETER_STREAM_HW_AV_SYNC "hw_av_sync"
+
+/* Enable mono audio playback if 1, else should be 0. */
+#define QAHW_PARAMETER_MONO_OUTPUT "mono_output"
+
+/**
+ * audio codec parameters
+ */
+
+#define QAHW_OFFLOAD_CODEC_PARAMS "music_offload_codec_param"
+#define QAHW_OFFLOAD_CODEC_BIT_PER_SAMPLE "music_offload_bit_per_sample"
+#define QAHW_OFFLOAD_CODEC_BIT_RATE "music_offload_bit_rate"
+#define QAHW_OFFLOAD_CODEC_AVG_BIT_RATE "music_offload_avg_bit_rate"
+#define QAHW_OFFLOAD_CODEC_ID "music_offload_codec_id"
+#define QAHW_OFFLOAD_CODEC_BLOCK_ALIGN "music_offload_block_align"
+#define QAHW_OFFLOAD_CODEC_SAMPLE_RATE "music_offload_sample_rate"
+#define QAHW_OFFLOAD_CODEC_ENCODE_OPTION "music_offload_encode_option"
+#define QAHW_OFFLOAD_CODEC_NUM_CHANNEL "music_offload_num_channels"
+#define QAHW_OFFLOAD_CODEC_DOWN_SAMPLING "music_offload_down_sampling"
+#define QAHW_OFFLOAD_CODEC_DELAY_SAMPLES "delay_samples"
+#define QAHW_OFFLOAD_CODEC_PADDING_SAMPLES "padding_samples"
+
+/**
+ * extended audio codec parameters
+ */
+
+#define QAHW_OFFLOAD_CODEC_WMA_FORMAT_TAG "music_offload_wma_format_tag"
+#define QAHW_OFFLOAD_CODEC_WMA_BLOCK_ALIGN "music_offload_wma_block_align"
+#define QAHW_OFFLOAD_CODEC_WMA_BIT_PER_SAMPLE "music_offload_wma_bit_per_sample"
+#define QAHW_OFFLOAD_CODEC_WMA_CHANNEL_MASK "music_offload_wma_channel_mask"
+#define QAHW_OFFLOAD_CODEC_WMA_ENCODE_OPTION "music_offload_wma_encode_option"
+#define QAHW_OFFLOAD_CODEC_WMA_ENCODE_OPTION1 "music_offload_wma_encode_option1"
+#define QAHW_OFFLOAD_CODEC_WMA_ENCODE_OPTION2 "music_offload_wma_encode_option2"
+
+#define QAHW_OFFLOAD_CODEC_FLAC_MIN_BLK_SIZE "music_offload_flac_min_blk_size"
+#define QAHW_OFFLOAD_CODEC_FLAC_MAX_BLK_SIZE "music_offload_flac_max_blk_size"
+#define QAHW_OFFLOAD_CODEC_FLAC_MIN_FRAME_SIZE "music_offload_flac_min_frame_size"
+#define QAHW_OFFLOAD_CODEC_FLAC_MAX_FRAME_SIZE "music_offload_flac_max_frame_size"
+
+#define QAHW_OFFLOAD_CODEC_ALAC_FRAME_LENGTH "music_offload_alac_frame_length"
+#define QAHW_OFFLOAD_CODEC_ALAC_COMPATIBLE_VERSION "music_offload_alac_compatible_version"
+#define QAHW_OFFLOAD_CODEC_ALAC_BIT_DEPTH "music_offload_alac_bit_depth"
+#define QAHW_OFFLOAD_CODEC_ALAC_PB "music_offload_alac_pb"
+#define QAHW_OFFLOAD_CODEC_ALAC_MB "music_offload_alac_mb"
+#define QAHW_OFFLOAD_CODEC_ALAC_KB "music_offload_alac_kb"
+#define QAHW_OFFLOAD_CODEC_ALAC_NUM_CHANNELS "music_offload_alac_num_channels"
+#define QAHW_OFFLOAD_CODEC_ALAC_MAX_RUN "music_offload_alac_max_run"
+#define QAHW_OFFLOAD_CODEC_ALAC_MAX_FRAME_BYTES "music_offload_alac_max_frame_bytes"
+#define QAHW_OFFLOAD_CODEC_ALAC_AVG_BIT_RATE "music_offload_alac_avg_bit_rate"
+#define QAHW_OFFLOAD_CODEC_ALAC_SAMPLING_RATE "music_offload_alac_sampling_rate"
+#define QAHW_OFFLOAD_CODEC_ALAC_CHANNEL_LAYOUT_TAG "music_offload_alac_channel_layout_tag"
+
+#define QAHW_OFFLOAD_CODEC_APE_COMPATIBLE_VERSION "music_offload_ape_compatible_version"
+#define QAHW_OFFLOAD_CODEC_APE_COMPRESSION_LEVEL "music_offload_ape_compression_level"
+#define QAHW_OFFLOAD_CODEC_APE_FORMAT_FLAGS "music_offload_ape_format_flags"
+#define QAHW_OFFLOAD_CODEC_APE_BLOCKS_PER_FRAME "music_offload_ape_blocks_per_frame"
+#define QAHW_OFFLOAD_CODEC_APE_FINAL_FRAME_BLOCKS "music_offload_ape_final_frame_blocks"
+#define QAHW_OFFLOAD_CODEC_APE_TOTAL_FRAMES "music_offload_ape_total_frames"
+#define QAHW_OFFLOAD_CODEC_APE_BITS_PER_SAMPLE "music_offload_ape_bits_per_sample"
+#define QAHW_OFFLOAD_CODEC_APE_NUM_CHANNELS "music_offload_ape_num_channels"
+#define QAHW_OFFLOAD_CODEC_APE_SAMPLE_RATE "music_offload_ape_sample_rate"
+#define QAHW_OFFLOAD_CODEC_APE_SEEK_TABLE_PRESENT "music_offload_seek_table_present"
+
+#define QAHW_OFFLOAD_CODEC_VORBIS_BITSTREAM_FMT "music_offload_vorbis_bitstream_fmt"
+
+/* Set or Query stream profile type */
+#define QAHW_PARAMETER_STREAM_PROFILE "audio_stream_profile"
+
+/* audio input flags for compress and timestamp mode.
+ * check other input flags defined in audio.h for conflicts
+ */
+#define QAHW_INPUT_FLAG_TIMESTAMP 0x80000000
+#define QAHW_INPUT_FLAG_COMPRESS 0x40000000
+
+/* Query fm volume */
+#define QAHW_PARAMETER_KEY_FM_VOLUME "fm_volume"
+
+/* Query if a2dp is supported */
+#define QAHW_PARAMETER_KEY_HANDLE_A2DP_DEVICE "isA2dpDeviceSupported"
+
+#define MAX_OUT_CHANNELS 8
+#define MAX_INP_CHANNELS 8
+
+#define QAHW_PCM_CHANNEL_FL 1 /* Front left channel. */
+#define QAHW_PCM_CHANNEL_FR 2 /* Front right channel. */
+#define QAHW_PCM_CHANNEL_FC 3 /* Front center channel. */
+#define QAHW_PCM_CHANNEL_LS 4 /* Left surround channel. */
+#define QAHW_PCM_CHANNEL_RS 5 /* Right surround channel. */
+#define QAHW_PCM_CHANNEL_LFE 6 /* Low frequency effect channel. */
+#define QAHW_PCM_CHANNEL_CS 7 /* Center surround channel; Rear center channel. */
+#define QAHW_PCM_CHANNEL_LB 8 /* Left back channel; Rear left channel. */
+#define QAHW_PCM_CHANNEL_RB 9 /* Right back channel; Rear right channel. */
+#define QAHW_PCM_CHANNEL_TS 10 /* Top surround channel. */
+#define QAHW_PCM_CHANNEL_CVH 11 /* Center vertical height channel. */
+#define QAHW_PCM_CHANNEL_MS 12 /* Mono surround channel. */
+#define QAHW_PCM_CHANNEL_FLC 13 /* Front left of center. */
+#define QAHW_PCM_CHANNEL_FRC 14 /* Front right of center. */
+#define QAHW_PCM_CHANNEL_RLC 15 /* Rear left of center. */
+#define QAHW_PCM_CHANNEL_RRC 16 /* Rear right of center. */
+
+/* type of asynchronous write callback events. Mutually exclusive */
+typedef enum {
+ QAHW_STREAM_CBK_EVENT_WRITE_READY, /* non blocking write completed */
+ QAHW_STREAM_CBK_EVENT_DRAIN_READY, /* drain completed */
+ QAHW_STREAM_CBK_EVENT_ERROR, /* stream hit some error */
+
+ QAHW_STREAM_CBK_EVENT_ADSP = 0x100 /* callback event from ADSP PP,
+ * corresponding payload will be
+ * sent as is to the client
+ */
+} qahw_stream_callback_event_t;
+
+typedef int qahw_stream_callback_t(qahw_stream_callback_event_t event,
+ void *param,
+ void *cookie);
+
+/* type of drain requested to audio_stream_out->drain(). Mutually exclusive */
+typedef enum {
+ QAHW_DRAIN_ALL, /* drain() returns when all data has been played */
+ QAHW_DRAIN_EARLY_NOTIFY /* drain() returns a short time before all data
+ from the current track has been played to
+ give time for gapless track switch */
+} qahw_drain_type_t;
+
+/* meta data flags */
+/*TBD: Extend this based on stb requirement*/
+typedef enum {
+ QAHW_META_DATA_FLAGS_NONE = 0,
+} qahw_meta_data_flags_t;
+
+typedef struct {
+ const void *buffer; /* write buffer pointer */
+ size_t bytes; /* size of buffer */
+ size_t offset; /* offset in buffer from where valid byte starts */
+ int64_t *timestamp; /* timestmap */
+ qahw_meta_data_flags_t flags; /* meta data flags */
+ uint32_t reserved[64]; /*reserved for future */
+} qahw_out_buffer_t;
+
+typedef struct {
+ void *buffer; /* read buffer pointer */
+ size_t bytes; /* size of buffer */
+ size_t offset; /* offset in buffer from where valid byte starts */
+ int64_t *timestamp; /* timestmap */
+ uint32_t reserved[64]; /*reserved for future */
+} qahw_in_buffer_t;
+
+#define MAX_SECTORS 8
+
+struct qahw_source_tracking_param {
+ uint8_t vad[MAX_SECTORS];
+ uint16_t doa_speech;
+ uint16_t doa_noise[3];
+ uint8_t polar_activity[360];
+};
+
+struct qahw_sound_focus_param {
+ uint16_t start_angle[MAX_SECTORS];
+ uint8_t enable[MAX_SECTORS];
+ uint16_t gain_step;
+};
+
+struct aptx_dec_bt_addr {
+ uint32_t nap;
+ uint32_t uap;
+ uint32_t lap;
+};
+
+struct qahw_aptx_dec_param {
+ struct aptx_dec_bt_addr bt_addr;
+};
+
+struct qahw_avt_device_drift_param {
+ /* Flag to indicate if resync is required on the client side for
+ * drift correction. Flag is set to TRUE for the first get_param response
+ * after device interface starts. This flag value can be used by client
+ * to identify if device interface restart has happened and if any
+ * re-sync is required at their end for drift correction.
+ */
+ uint32_t resync_flag;
+ /* Accumulated drift value in microseconds.
+ * Positive drift value indicates AV timer is running faster than device.
+ * Negative drift value indicates AV timer is running slower than device.
+ */
+ int32_t avt_device_drift_value;
+ /* 64-bit absolute timestamp of reference */
+ uint64_t ref_timer_abs_ts;
+};
+
+/*use these for setting infine window.i.e free run mode */
+#define QAHW_MAX_RENDER_START_WINDOW 0x8000000000000000
+#define QAHW_MAX_RENDER_END_WINDOW 0x7FFFFFFFFFFFFFFF
+
+struct qahw_out_render_window_param {
+ uint64_t render_ws; /* render window start value microseconds*/
+ uint64_t render_we; /* render window end value microseconds*/
+};
+
+struct qahw_out_start_delay_param {
+ uint64_t start_delay; /* session start delay in microseconds*/
+};
+
+struct qahw_out_enable_drift_correction {
+ bool enable; /* enable drift correction*/
+};
+
+struct qahw_out_correct_drift {
+ /*
+ * adjust time in microseconds, a positive value
+ * to advance the clock or a negative value to
+ * delay the clock.
+ */
+ int64_t adjust_time;
+};
+
+#define QAHW_MAX_ADSP_STREAM_CMD_PAYLOAD_LEN 512
+
+typedef enum {
+ QAHW_STREAM_PP_EVENT = 0,
+ QAHW_STREAM_ENCDEC_EVENT = 1,
+} qahw_event_id;
+
+/* payload format for HAL parameter
+ * QAHW_PARAM_ADSP_STREAM_CMD
+ */
+struct qahw_adsp_event {
+ qahw_event_id event_type; /* type of the event */
+ uint32_t payload_length; /* length in bytes of the payload */
+ void *payload; /* the actual payload */
+};
+
+struct qahw_out_channel_map_param {
+ uint8_t channels; /* Input Channels */
+ uint8_t channel_map[AUDIO_CHANNEL_COUNT_MAX]; /* Input Channel Map */
+};
+
+struct qahw_device_cfg_param {
+ uint32_t sample_rate;
+ uint32_t channels;
+ uint32_t bit_width;
+ audio_format_t format;
+ audio_devices_t device;
+ uint8_t channel_map[AUDIO_CHANNEL_COUNT_MAX];
+ uint16_t channel_allocation;
+};
+
+typedef struct qahw_mix_matrix_params {
+ uint16_t num_output_channels;
+ uint16_t num_input_channels;
+ uint8_t has_output_channel_map;
+ uint32_t output_channel_map[AUDIO_CHANNEL_COUNT_MAX];
+ uint8_t has_input_channel_map;
+ uint32_t input_channel_map[AUDIO_CHANNEL_COUNT_MAX];
+ uint8_t has_mixer_coeffs;
+ float mixer_coeffs[AUDIO_CHANNEL_COUNT_MAX][AUDIO_CHANNEL_COUNT_MAX];
+} qahw_mix_matrix_params_t;
+
+typedef union {
+ struct qahw_source_tracking_param st_params;
+ struct qahw_sound_focus_param sf_params;
+ struct qahw_aptx_dec_param aptx_params;
+ struct qahw_avt_device_drift_param drift_params;
+ struct qahw_out_render_window_param render_window_params;
+ struct qahw_out_start_delay_param start_delay;
+ struct qahw_out_enable_drift_correction drift_enable_param;
+ struct qahw_out_correct_drift drift_correction_param;
+ struct qahw_adsp_event adsp_event_params;
+ struct qahw_out_channel_map_param channel_map_params;
+ struct qahw_device_cfg_param device_cfg_params;
+ struct qahw_mix_matrix_params mix_matrix_params;
+} qahw_param_payload;
+
+typedef enum {
+ QAHW_PARAM_SOURCE_TRACK,
+ QAHW_PARAM_SOUND_FOCUS,
+ QAHW_PARAM_APTX_DEC,
+ QAHW_PARAM_AVT_DEVICE_DRIFT, /* PARAM to query AV timer vs device drift */
+ QAHW_PARAM_OUT_RENDER_WINDOW, /* PARAM to set render window */
+ QAHW_PARAM_OUT_START_DELAY, /* PARAM to set session start delay*/
+ /* enable adsp drift correction this must be called before out_write */
+ QAHW_PARAM_OUT_ENABLE_DRIFT_CORRECTION,
+ /* param to set drift value to be adjusted by dsp */
+ QAHW_PARAM_OUT_CORRECT_DRIFT,
+ QAHW_PARAM_ADSP_STREAM_CMD,
+ QAHW_PARAM_OUT_CHANNEL_MAP, /* PARAM to set i/p channel map */
+ QAHW_PARAM_DEVICE_CONFIG, /* PARAM to set device config */
+ QAHW_PARAM_OUT_MIX_MATRIX_PARAMS,
+ QAHW_PARAM_CH_MIX_MATRIX_PARAMS,
+} qahw_param_id;
+
+__END_DECLS
+
+#endif // QTI_AUDIO_HAL_DEFS_H
+
diff --git a/qahw_api/inc/qahw_effect_api.h b/qahw/inc/qahw_effect_api.h
similarity index 99%
rename from qahw_api/inc/qahw_effect_api.h
rename to qahw/inc/qahw_effect_api.h
index 5b380b1..de53cd3 100644
--- a/qahw_api/inc/qahw_effect_api.h
+++ b/qahw/inc/qahw_effect_api.h
@@ -31,7 +31,7 @@
#include <system/audio.h>
-#include "qahw_api.h"
+#include "qahw.h"
__BEGIN_DECLS
diff --git a/qahw_api/src/qahw.c b/qahw/src/qahw.c
similarity index 87%
rename from qahw_api/src/qahw.c
rename to qahw/src/qahw.c
index b5a85d7..91fc5bf 100644
--- a/qahw_api/src/qahw.c
+++ b/qahw/src/qahw.c
@@ -37,7 +37,7 @@
#include <cutils/list.h>
#include <hardware/audio.h>
-#include "qahw_api.h"
+#include "qahw.h"
#define NO_ERROR 0
#define MAX_MODULE_NAME_LENGTH 100
@@ -119,7 +119,7 @@
/******************************************************************************/
/* call this function without anylock held */
-static bool is_valid_qahw_stream(void *qahw_stream,
+static bool is_valid_qahw_stream_l(void *qahw_stream,
qahw_stream_direction_t dir)
{
@@ -174,7 +174,7 @@
}
/* call this fucntion with ahw_module_init_lock held*/
-static qahw_module_t* get_qahw_module_by_ptr(qahw_module_t *qahw_module)
+static qahw_module_t* get_qahw_module_by_ptr_l(qahw_module_t *qahw_module)
{
struct listnode *node = NULL;
qahw_module_t *module = NULL, *module_temp = NULL;
@@ -194,7 +194,7 @@
}
/* call this function with qahw_module_init_lock held*/
-static qahw_module_t* get_qahw_module_by_name(const char *qahw_name)
+static qahw_module_t* get_qahw_module_by_name_l(const char *qahw_name)
{
struct listnode *node = NULL;
qahw_module_t *module = NULL, *module_temp = NULL;
@@ -217,13 +217,13 @@
/*
* Return the sampling rate in Hz - eg. 44100.
*/
-uint32_t qahw_out_get_sample_rate(const qahw_stream_handle_t *out_handle)
+uint32_t qahw_out_get_sample_rate_l(const qahw_stream_handle_t *out_handle)
{
uint32_t rate = 0;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGV("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -244,13 +244,13 @@
* currently unused - use set_parameters with key
* AUDIO_PARAMETER_STREAM_SAMPLING_RATE
*/
-int qahw_out_set_sample_rate(qahw_stream_handle_t *out_handle, uint32_t rate)
+int qahw_out_set_sample_rate_l(qahw_stream_handle_t *out_handle, uint32_t rate)
{
int32_t rc = -EINVAL;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -267,13 +267,13 @@
return rc;
}
-size_t qahw_out_get_buffer_size(const qahw_stream_handle_t *out_handle)
+size_t qahw_out_get_buffer_size_l(const qahw_stream_handle_t *out_handle)
{
size_t buf_size = 0;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -290,13 +290,13 @@
return buf_size;
}
-audio_channel_mask_t qahw_out_get_channels(const qahw_stream_handle_t *out_handle)
+audio_channel_mask_t qahw_out_get_channels_l(const qahw_stream_handle_t *out_handle)
{
audio_channel_mask_t ch_mask = 0;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -313,13 +313,13 @@
return ch_mask;
}
-audio_format_t qahw_out_get_format(const qahw_stream_handle_t *out_handle)
+audio_format_t qahw_out_get_format_l(const qahw_stream_handle_t *out_handle)
{
audio_format_t format = AUDIO_FORMAT_INVALID;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -336,13 +336,13 @@
return format;
}
-int qahw_out_standby(qahw_stream_handle_t *out_handle)
+int qahw_out_standby_l(qahw_stream_handle_t *out_handle)
{
int32_t rc = -EINVAL;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -361,13 +361,13 @@
return rc;
}
-int qahw_out_set_parameters(qahw_stream_handle_t *out_handle, const char *kv_pairs)
+int qahw_out_set_parameters_l(qahw_stream_handle_t *out_handle, const char *kv_pairs)
{
int rc = NO_ERROR;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
rc = -EINVAL;
goto exit;
@@ -387,14 +387,14 @@
return rc;
}
-char *qahw_out_get_parameters(const qahw_stream_handle_t *out_handle,
+char *qahw_out_get_parameters_l(const qahw_stream_handle_t *out_handle,
const char *keys)
{
char *str_param = NULL;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -413,7 +413,7 @@
}
/* API to get playback stream specific config parameters */
-int qahw_out_set_param_data(qahw_stream_handle_t *out_handle,
+int qahw_out_set_param_data_l(qahw_stream_handle_t *out_handle,
qahw_param_id param_id,
qahw_param_payload *payload)
{
@@ -426,7 +426,7 @@
goto exit;
}
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -446,7 +446,7 @@
}
/* API to get playback stream specific config parameters */
-int qahw_out_get_param_data(qahw_stream_handle_t *out_handle,
+int qahw_out_get_param_data_l(qahw_stream_handle_t *out_handle,
qahw_param_id param_id,
qahw_param_payload *payload)
{
@@ -454,7 +454,7 @@
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -473,13 +473,13 @@
return rc;
}
-uint32_t qahw_out_get_latency(const qahw_stream_handle_t *out_handle)
+uint32_t qahw_out_get_latency_l(const qahw_stream_handle_t *out_handle)
{
uint32_t latency = 0;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -497,13 +497,13 @@
return latency;
}
-int qahw_out_set_volume(qahw_stream_handle_t *out_handle, float left, float right)
+int qahw_out_set_volume_l(qahw_stream_handle_t *out_handle, float left, float right)
{
int rc = -EINVAL;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -522,7 +522,7 @@
return rc;
}
-ssize_t qahw_out_write(qahw_stream_handle_t *out_handle,
+ssize_t qahw_out_write_l(qahw_stream_handle_t *out_handle,
qahw_out_buffer_t *out_buf)
{
int rc = -EINVAL;
@@ -534,7 +534,7 @@
goto exit;
}
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -557,14 +557,14 @@
return rc;
}
-int qahw_out_get_render_position(const qahw_stream_handle_t *out_handle,
+int qahw_out_get_render_position_l(const qahw_stream_handle_t *out_handle,
uint32_t *dsp_frames)
{
int rc = -EINVAL;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -582,7 +582,7 @@
return rc;
}
-int qahw_out_set_callback(qahw_stream_handle_t *out_handle,
+int qahw_out_set_callback_l(qahw_stream_handle_t *out_handle,
qahw_stream_callback_t callback,
void *cookie)
{
@@ -591,7 +591,7 @@
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -610,14 +610,14 @@
return rc;
}
-int qahw_out_pause(qahw_stream_handle_t *out_handle)
+int qahw_out_pause_l(qahw_stream_handle_t *out_handle)
{
/*TBD:load hal func pointer and call */
int rc = -EINVAL;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -636,14 +636,14 @@
return rc;
}
-int qahw_out_resume(qahw_stream_handle_t *out_handle)
+int qahw_out_resume_l(qahw_stream_handle_t *out_handle)
{
/*TBD:load hal func pointer and call */
int rc = -EINVAL;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -662,14 +662,14 @@
return rc;
}
-int qahw_out_drain(qahw_stream_handle_t *out_handle, qahw_drain_type_t type )
+int qahw_out_drain_l(qahw_stream_handle_t *out_handle, qahw_drain_type_t type )
{
/*TBD:load hal func pointer and call */
int rc = -EINVAL;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -688,13 +688,13 @@
return rc;
}
-int qahw_out_flush(qahw_stream_handle_t *out_handle)
+int qahw_out_flush_l(qahw_stream_handle_t *out_handle)
{
int rc = -EINVAL;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -713,14 +713,14 @@
return rc;
}
-int qahw_out_get_presentation_position(const qahw_stream_handle_t *out_handle,
+int qahw_out_get_presentation_position_l(const qahw_stream_handle_t *out_handle,
uint64_t *frames, struct timespec *timestamp)
{
int rc = -EINVAL;
qahw_stream_out_t *qahw_stream_out = (qahw_stream_out_t *)out_handle;
audio_stream_out_t *out = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
goto exit;
}
@@ -740,13 +740,13 @@
}
/* Input stream specific APIs */
-uint32_t qahw_in_get_sample_rate(const qahw_stream_handle_t *in_handle)
+uint32_t qahw_in_get_sample_rate_l(const qahw_stream_handle_t *in_handle)
{
uint32_t rate = 0;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
audio_stream_in_t *in = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -768,13 +768,13 @@
* currently unused - use set_parameters with key
* AUDIO_PARAMETER_STREAM_SAMPLING_RATE
*/
-int qahw_in_set_sample_rate(qahw_stream_handle_t *in_handle, uint32_t rate)
+int qahw_in_set_sample_rate_l(qahw_stream_handle_t *in_handle, uint32_t rate)
{
int rc = -EINVAL;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
audio_stream_in_t *in = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -793,13 +793,13 @@
return rc;
}
-size_t qahw_in_get_buffer_size(const qahw_stream_handle_t *in_handle)
+size_t qahw_in_get_buffer_size_l(const qahw_stream_handle_t *in_handle)
{
size_t buf_size = 0;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
audio_stream_in_t *in = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -818,13 +818,13 @@
}
-audio_channel_mask_t qahw_in_get_channels(const qahw_stream_handle_t *in_handle)
+audio_channel_mask_t qahw_in_get_channels_l(const qahw_stream_handle_t *in_handle)
{
audio_channel_mask_t ch_mask = 0;;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
audio_stream_in_t *in = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -842,13 +842,13 @@
return ch_mask;
}
-audio_format_t qahw_in_get_format(const qahw_stream_handle_t *in_handle)
+audio_format_t qahw_in_get_format_l(const qahw_stream_handle_t *in_handle)
{
audio_format_t format = AUDIO_FORMAT_INVALID;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
audio_stream_in_t *in = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -870,13 +870,13 @@
* currently unused - use set_parameters with key
* AUDIO_PARAMETER_STREAM_FORMAT
*/
-int qahw_in_set_format(qahw_stream_handle_t *in_handle, audio_format_t format)
+int qahw_in_set_format_l(qahw_stream_handle_t *in_handle, audio_format_t format)
{
int rc = -EINVAL;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
audio_stream_in_t *in = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -895,13 +895,13 @@
return rc;
}
-int qahw_in_standby(qahw_stream_handle_t *in_handle)
+int qahw_in_standby_l(qahw_stream_handle_t *in_handle)
{
int rc = -EINVAL;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
audio_stream_in_t *in = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -933,13 +933,13 @@
* The audio flinger will put the stream in standby and then change the
* parameter value.
*/
-int qahw_in_set_parameters(qahw_stream_handle_t *in_handle, const char *kv_pairs)
+int qahw_in_set_parameters_l(qahw_stream_handle_t *in_handle, const char *kv_pairs)
{
int rc = -EINVAL;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
audio_stream_in_t *in = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -961,14 +961,14 @@
* Returns a pointer to a heap allocated string. The caller is responsible
* for freeing the memory for it using free().
*/
-char * qahw_in_get_parameters(const qahw_stream_handle_t *in_handle,
+char * qahw_in_get_parameters_l(const qahw_stream_handle_t *in_handle,
const char *keys)
{
char *str_param = NULL;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
audio_stream_in_t *in = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -991,7 +991,7 @@
* negative status_t. If at least one frame was read prior to the error,
* read should return that byte count and then return an error in the subsequent call.
*/
-ssize_t qahw_in_read(qahw_stream_handle_t *in_handle,
+ssize_t qahw_in_read_l(qahw_stream_handle_t *in_handle,
qahw_in_buffer_t *in_buf)
{
int rc = -EINVAL;
@@ -1003,7 +1003,7 @@
goto exit;
}
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -1037,13 +1037,13 @@
*
* Unit: the number of input audio frames
*/
-uint32_t qahw_in_get_input_frames_lost(qahw_stream_handle_t *in_handle)
+uint32_t qahw_in_get_input_frames_lost_l(qahw_stream_handle_t *in_handle)
{
uint32_t rc = 0;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
audio_stream_in_t *in = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
goto exit;
}
@@ -1076,7 +1076,7 @@
* The status returned is 0 on success, -ENOSYS if the device is not
* ready/available, or -EINVAL if the arguments are null or otherwise invalid.
*/
-int qahw_in_get_capture_position(const qahw_stream_handle_t *in_handle __unused,
+int qahw_in_get_capture_position_l(const qahw_stream_handle_t *in_handle __unused,
int64_t *frames __unused, int64_t *time __unused)
{
/*TBD:: do we need this*/
@@ -1087,14 +1087,14 @@
* check to see if the audio hardware interface has been initialized.
* returns 0 on success, -ENODEV on failure.
*/
-int qahw_init_check(const qahw_module_handle_t *hw_module)
+int qahw_init_check_l(const qahw_module_handle_t *hw_module)
{
int rc = -EINVAL;
qahw_module_t *qahw_module = (qahw_module_t *)hw_module;
qahw_module_t *qahw_module_temp;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1114,14 +1114,14 @@
return rc;
}
/* set the audio volume of a voice call. Range is between 0.0 and 1.0 */
-int qahw_set_voice_volume(qahw_module_handle_t *hw_module, float volume)
+int qahw_set_voice_volume_l(qahw_module_handle_t *hw_module, float volume)
{
int rc = -EINVAL;
qahw_module_t *qahw_module = (qahw_module_t *)hw_module;
qahw_module_t *qahw_module_temp;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1147,14 +1147,14 @@
* is for standard audio playback, AUDIO_MODE_RINGTONE when a ringtone is
* playing, and AUDIO_MODE_IN_CALL when a call is in progress.
*/
-int qahw_set_mode(qahw_module_handle_t *hw_module, audio_mode_t mode)
+int qahw_set_mode_l(qahw_module_handle_t *hw_module, audio_mode_t mode)
{
int rc = -EINVAL;
qahw_module_t *qahw_module = (qahw_module_t *)hw_module;
qahw_module_t *qahw_module_temp;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1175,14 +1175,14 @@
return rc;
}
-int qahw_set_mic_mute(qahw_module_handle_t *hw_module, bool state)
+int qahw_set_mic_mute_l(qahw_module_handle_t *hw_module, bool state)
{
int rc = -EINVAL;
qahw_module_t *qahw_module = (qahw_module_t *)hw_module;
qahw_module_t *qahw_module_temp;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1203,7 +1203,7 @@
return rc;
}
-int qahw_get_mic_mute(qahw_module_handle_t *hw_module, bool *state)
+int qahw_get_mic_mute_l(qahw_module_handle_t *hw_module, bool *state)
{
size_t rc = 0;
qahw_module_t *qahw_module = (qahw_module_t *)hw_module;
@@ -1211,7 +1211,7 @@
audio_hw_device_t *audio_device;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1233,7 +1233,7 @@
}
/* set/get global audio parameters */
-int qahw_set_parameters(qahw_module_handle_t *hw_module, const char *kv_pairs)
+int qahw_set_parameters_l(qahw_module_handle_t *hw_module, const char *kv_pairs)
{
int rc = -EINVAL;
qahw_module_t *qahw_module = (qahw_module_t *)hw_module;
@@ -1241,7 +1241,7 @@
audio_hw_device_t *audio_device;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1266,7 +1266,7 @@
* Returns a pointer to a heap allocated string. The caller is responsible
* for freeing the memory for it using free().
*/
-char * qahw_get_parameters(const qahw_module_handle_t *hw_module,
+char * qahw_get_parameters_l(const qahw_module_handle_t *hw_module,
const char *keys)
{
char *str_param = NULL;
@@ -1275,7 +1275,7 @@
audio_hw_device_t *audio_device;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1298,7 +1298,7 @@
/* Api to implement get parameters based on keyword param_id
* and store data in payload.
*/
-int qahw_get_param_data(const qahw_module_handle_t *hw_module,
+int qahw_get_param_data_l(const qahw_module_handle_t *hw_module,
qahw_param_id param_id,
qahw_param_payload *payload)
{
@@ -1307,7 +1307,7 @@
qahw_module_t *qahw_module_temp;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1332,7 +1332,7 @@
/* Api to implement set parameters based on keyword param_id
* and data present in payload.
*/
-int qahw_set_param_data(const qahw_module_handle_t *hw_module,
+int qahw_set_param_data_l(const qahw_module_handle_t *hw_module,
qahw_param_id param_id,
qahw_param_payload *payload)
{
@@ -1341,7 +1341,7 @@
qahw_module_t *qahw_module_temp;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1367,7 +1367,7 @@
* The handle is allocated by the HAL and should be unique for this
* audio HAL module.
*/
-int qahw_create_audio_patch(qahw_module_handle_t *hw_module,
+int qahw_create_audio_patch_l(qahw_module_handle_t *hw_module,
unsigned int num_sources,
const struct audio_port_config *sources,
unsigned int num_sinks,
@@ -1379,7 +1379,7 @@
qahw_module_t *qahw_module_temp;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1406,7 +1406,7 @@
}
/* Release an audio patch */
-int qahw_release_audio_patch(qahw_module_handle_t *hw_module,
+int qahw_release_audio_patch_l(qahw_module_handle_t *hw_module,
audio_patch_handle_t handle)
{
int ret = 0;
@@ -1414,7 +1414,7 @@
qahw_module_t *qahw_module_temp;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1442,7 +1442,7 @@
* As output, "port" contains possible attributes (sampling rates, formats,
* channel masks, gain controllers...) for this port.
*/
-int qahw_get_audio_port(qahw_module_handle_t *hw_module,
+int qahw_get_audio_port_l(qahw_module_handle_t *hw_module,
struct audio_port *port)
{
int ret = 0;
@@ -1450,7 +1450,7 @@
qahw_module_t *qahw_module_temp;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1473,7 +1473,7 @@
}
/* Set audio port configuration */
-int qahw_set_audio_port_config(qahw_module_handle_t *hw_module,
+int qahw_set_audio_port_config_l(qahw_module_handle_t *hw_module,
const struct audio_port_config *config)
{
int ret = 0;
@@ -1481,7 +1481,7 @@
qahw_module_t *qahw_module_temp;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1507,7 +1507,7 @@
* 0 if one of the parameters is not supported.
* See also get_buffer_size which is for a particular stream.
*/
-size_t qahw_get_input_buffer_size(const qahw_module_handle_t *hw_module,
+size_t qahw_get_input_buffer_size_l(const qahw_module_handle_t *hw_module,
const struct audio_config *config)
{
size_t rc = 0;
@@ -1516,7 +1516,7 @@
audio_hw_device_t *audio_device;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1546,7 +1546,7 @@
* - USB devices use the ALSA card and device numbers in the form "card=X;device=Y"
* - Other devices may use a number or any other string.
*/
-int qahw_open_output_stream(qahw_module_handle_t *hw_module,
+int qahw_open_output_stream_l(qahw_module_handle_t *hw_module,
audio_io_handle_t handle,
audio_devices_t devices,
audio_output_flags_t flags,
@@ -1561,7 +1561,7 @@
qahw_stream_out_t *qahw_stream_out = NULL;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1634,7 +1634,7 @@
return rc;
}
-int qahw_close_output_stream(qahw_stream_handle_t *out_handle)
+int qahw_close_output_stream_l(qahw_stream_handle_t *out_handle)
{
int rc = 0;
@@ -1642,7 +1642,7 @@
qahw_module_t *qahw_module = NULL;
audio_hw_device_t *audio_device = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_out, STREAM_DIR_OUT)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_out, STREAM_DIR_OUT)) {
ALOGE("%s::Invalid out handle %p", __func__, out_handle);
rc = -EINVAL;
goto exit;
@@ -1669,7 +1669,7 @@
}
/* This method creates and opens the audio hardware input stream */
-int qahw_open_input_stream(qahw_module_handle_t *hw_module,
+int qahw_open_input_stream_l(qahw_module_handle_t *hw_module,
audio_io_handle_t handle,
audio_devices_t devices,
struct audio_config *config,
@@ -1685,7 +1685,7 @@
qahw_stream_in_t *qahw_stream_in = NULL;
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
pthread_mutex_unlock(&qahw_module_init_lock);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
@@ -1738,14 +1738,14 @@
return rc;
}
-int qahw_close_input_stream(qahw_stream_handle_t *in_handle)
+int qahw_close_input_stream_l(qahw_stream_handle_t *in_handle)
{
int rc = 0;
qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
qahw_module_t *qahw_module = NULL;
audio_hw_device_t *audio_device = NULL;
- if (!is_valid_qahw_stream((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
ALOGV("%s::Invalid in handle %p", __func__, in_handle);
rc = -EINVAL;
goto exit;
@@ -1772,13 +1772,13 @@
}
/*returns current QTI HAL verison */
-int qahw_get_version() {
+int qahw_get_version_l() {
return QAHW_MODULE_API_VERSION_CURRENT;
}
/* convenience API for opening and closing an audio HAL module */
-qahw_module_handle_t *qahw_load_module(const char *hw_module_id)
+qahw_module_handle_t *qahw_load_module_l(const char *hw_module_id)
{
int rc = -EINVAL;
qahw_module_handle_t *qahw_mod_handle = NULL;
@@ -1806,7 +1806,7 @@
/* return exiting module ptr if already loaded */
pthread_mutex_lock(&qahw_module_init_lock);
if (qahw_list_count > 0) {
- qahw_module = get_qahw_module_by_name(hw_module_id);
+ qahw_module = get_qahw_module_by_name_l(hw_module_id);
if(qahw_module != NULL) {
qahw_mod_handle = (void *)qahw_module;
pthread_mutex_lock(&qahw_module->lock);
@@ -1876,7 +1876,7 @@
return qahw_mod_handle;
}
-int qahw_unload_module(qahw_module_handle_t *hw_module)
+int qahw_unload_module_l(qahw_module_handle_t *hw_module)
{
int rc = -EINVAL;
bool is_empty = false;
@@ -1887,7 +1887,7 @@
* it is closed
*/
pthread_mutex_lock(&qahw_module_init_lock);
- qahw_module_temp = get_qahw_module_by_ptr(qahw_module);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
if (qahw_module_temp == NULL) {
ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
goto error_exit;
diff --git a/qahw_api/src/qahw_effect.c b/qahw/src/qahw_effect.c
similarity index 100%
rename from qahw_api/src/qahw_effect.c
rename to qahw/src/qahw_effect.c
diff --git a/qahw_api/Android.mk b/qahw_api/Android.mk
index ee06a30..ba402ba 100644
--- a/qahw_api/Android.mk
+++ b/qahw_api/Android.mk
@@ -4,28 +4,27 @@
include $(CLEAR_VARS)
-libqahw-inc := $(LOCAL_PATH)/inc
+libqahwapi-inc := $(LOCAL_PATH)/inc
LOCAL_MODULE := libqahw
LOCAL_MODULE_TAGS := optional
-LOCAL_C_INCLUDES := $(libqahw-inc)
+LOCAL_C_INCLUDES := $(libqahwapi-inc)
+LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/qahw/inc
LOCAL_SRC_FILES := \
- src/qahw.c \
- src/qahw_effect.c
+ src/qahw_api.cpp
LOCAL_SHARED_LIBRARIES := \
liblog \
libcutils \
libhardware \
- libdl
+ libdl \
+ libqahwwrapper
LOCAL_CFLAGS += -Wall -Werror
LOCAL_COPY_HEADERS_TO := mm-audio/qahw_api/inc
LOCAL_COPY_HEADERS := inc/qahw_api.h
-LOCAL_COPY_HEADERS += inc/qahw_defs.h
-LOCAL_COPY_HEADERS += inc/qahw_effect_api.h
LOCAL_COPY_HEADERS += inc/qahw_effect_audiosphere.h
LOCAL_COPY_HEADERS += inc/qahw_effect_bassboost.h
LOCAL_COPY_HEADERS += inc/qahw_effect_environmentalreverb.h
@@ -40,4 +39,5 @@
#test app compilation
include $(LOCAL_PATH)/test/Android.mk
+
endif
diff --git a/qahw_api/Makefile.am b/qahw_api/Makefile.am
index 7c74d25..13fe417 100644
--- a/qahw_api/Makefile.am
+++ b/qahw_api/Makefile.am
@@ -1,8 +1,4 @@
-AM_CFLAGS = -I $(top_srcdir)/qahw_api/inc
-
h_sources = inc/qahw_api.h \
- inc/qahw_defs.h \
- inc/qahw_effect_api.h \
inc/qahw_effect_audiosphere.h \
inc/qahw_effect_bassboost.h \
inc/qahw_effect_environmentalreverb.h \
@@ -11,15 +7,22 @@
inc/qahw_effect_virtualizer.h \
inc/qahw_effect_visualizer.h
+AM_CPPFLAGS := -I $(top_srcdir)/qahw_api/inc/
+AM_CPPFLAGS += -I $(PKG_CONFIG_SYSROOT_DIR)/usr/include/mm-audio/audio-hal-server
+AM_CPPFLAGS += -I $(PKG_CONFIG_SYSROOT_DIR)/usr/include/mm-audio/qahw/inc
+AM_CPPFLAGS += -D__unused=__attribute__\(\(__unused__\)\)
+
library_include_HEADERS = $(h_sources)
library_includedir = $(includedir)/mm-audio/qahw_api/inc
-lib_LTLIBRARIES = libqahw.la
-libqahw_la_SOURCES = src/qahw.c \
- src/qahw_effect.c
-libqahw_la_CFLAGS = -Dstrlcpy=g_strlcpy $(GLIB_CFLAGS) -include glib.h $(AM_CFLAGS) -include stddef.h
-libqahw_la_CFLAGS += -D__unused=__attribute__\(\(__unused__\)\)
-libqahw_la_CFLAGS += -Wno-sign-compare -Werror
-libqahw_la_CFLAGS += -Dstrlcat=g_strlcat -Dstrlcpy=g_strlcpy -include glib.h $(GLIB_CFLAGS)
-libqahw_la_LIBADD = $(GLIB_LIBS) -llog -lcutils -lhardware -ldl
-libqahw_la_LDFLAGS = -module -shared -avoid-version
+lib_LTLIBRARIES = libqahw.la
+libqahw_la_SOURCES = src/qahw_api.cpp
+libqahw_la_LIBADD = -lqahwwrapper
+libqahw_la_CPPFLAGS := $(AM_CPPFLAGS)
+libqahw_la_CPPFLAGS += -std=c++11 -DHAVE_PTHREADS -DHAVE_ANDROID_OS
+libqahw_la_CPPFLAGS += -DDEBUG_REFS_CALLSTACK_ENABLED=0
+libqahw_la_LDFLAGS = -ltinyalsa -lhardware -lexpat -lcutils -llog -ldl -lbinder -shared -avoid-version -llog -lcutils -lpthread -lutils
+if QTI_AUDIO_SERVER_ENABLED
+AM_CPPFLAGS += -DQTI_AUDIO_SERVER_ENABLED
+libqahw_la_LDFLAGS += -lqtiaudioserver
+endif
diff --git a/qahw_api/inc/qahw_api.h b/qahw_api/inc/qahw_api.h
index 5e0e661..0aa3c79 100644
--- a/qahw_api/inc/qahw_api.h
+++ b/qahw_api/inc/qahw_api.h
@@ -16,8 +16,8 @@
* limitations under the License.
*/
-#ifndef QTI_AUDIO_HAL_API_H
-#define QTI_AUDIO_HAL_API_H
+#ifndef QTI_AUDIO_QAHW_API_H
+#define QTI_AUDIO_QAHW_API_H
#include <stdint.h>
#include <strings.h>
@@ -61,6 +61,7 @@
typedef void qahw_module_handle_t;
typedef void qahw_stream_handle_t;
+typedef void (*audio_error_callback)(void* context);
/**************************************/
/* Output stream specific APIs **/
@@ -471,6 +472,8 @@
int qahw_set_audio_port_config(qahw_module_handle_t *hw_module,
const struct audio_port_config *config);
+void qahw_register_qas_death_notify_cb(audio_error_callback cb, void* context);
+
__END_DECLS
-#endif // QTI_AUDIO_HAL_API_H
+#endif // QTI_AUDIO_QAHW_API_H
diff --git a/qahw_api/inc/qahw_defs.h b/qahw_api/inc/qahw_defs.h
index a301bf9..a33caf6 100644
--- a/qahw_api/inc/qahw_defs.h
+++ b/qahw_api/inc/qahw_defs.h
@@ -251,13 +251,13 @@
uint16_t doa_speech;
uint16_t doa_noise[3];
uint8_t polar_activity[360];
-};
+} __attribute__((packed));
struct qahw_sound_focus_param {
uint16_t start_angle[MAX_SECTORS];
uint8_t enable[MAX_SECTORS];
uint16_t gain_step;
-};
+} __attribute__((packed));
struct aptx_dec_bt_addr {
uint32_t nap;
diff --git a/qahw_api/src/qahw_api.cpp b/qahw_api/src/qahw_api.cpp
new file mode 100644
index 0000000..8967bd6
--- /dev/null
+++ b/qahw_api/src/qahw_api.cpp
@@ -0,0 +1,1626 @@
+/*
+* Copyright (c) 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,
+* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#define LOG_TAG "qahw_api"
+#define LOG_NDEBUG 0
+#define LOG_NDDEBUG 0
+
+#include <utils/Errors.h>
+#include <dlfcn.h>
+#include <utils/Log.h>
+#include <stdlib.h>
+#include <cutils/list.h>
+#include <assert.h>
+
+#include <hardware/audio.h>
+#include <cutils/properties.h>
+#include "qahw_api.h"
+#include "qahw.h"
+
+#if QTI_AUDIO_SERVER_ENABLED
+#include <mm-audio/qti-audio-server/qti_audio_server.h>
+#include <mm-audio/qti-audio-server/qti_audio_server_client.h>
+
+using namespace audiohal;
+extern struct listnode stream_list;
+extern pthread_mutex_t list_lock;
+
+/* Flag to indicate if QAS is enabled or not */
+bool g_binder_enabled = false;
+/* QTI audio server handle */
+sp<Iqti_audio_server> g_qas = NULL;
+/* Handle for client context*/
+void* g_ctxt = NULL;
+/* Death notification handle */
+sp<death_notifier> g_death_notifier = NULL;
+/* Client callback handle */
+audio_error_callback g_audio_err_cb = NULL;
+/* Flag to indicate qas status */
+bool g_qas_died = false;
+/* Count how many times hal is loaded */
+static unsigned int g_qas_load_count;
+/* Store HAL handle */
+qahw_module_handle_t *g_qas_handle = NULL;
+
+void death_notifier::binderDied(const wp<IBinder>& who)
+{
+ struct listnode *node;
+ p_stream_handle *handle;
+
+ if (g_audio_err_cb) {
+ ALOGD("%s %d", __func__, __LINE__);
+ g_audio_err_cb(g_ctxt);
+ }
+ g_qas_died = true;
+
+ pthread_mutex_lock(&list_lock);
+ list_for_each(node, &stream_list) {
+ handle = node_to_item(node, p_stream_handle, list);
+ if (handle != NULL) {
+ sh_mem_data *shmem_data = handle->shmem_data;
+ ALOGD("%s: %d: signal to unblock any wait conditions", __func__, __LINE__);
+ pthread_cond_signal(&shmem_data->c_cond);
+ shmem_data->status = 0;
+ }
+ }
+ pthread_mutex_unlock(&list_lock);
+
+}
+
+void qahw_register_qas_death_notify_cb(audio_error_callback cb, void* context)
+{
+ ALOGD("%s %d", __func__, __LINE__);
+ g_audio_err_cb = cb;
+ g_ctxt = context;
+}
+
+death_notifier::death_notifier()
+{
+ ALOGV("%s %d", __func__, __LINE__);
+ sp<ProcessState> proc(ProcessState::self());
+ proc->startThreadPool();
+}
+
+sp<Iqti_audio_server> get_qti_audio_server() {
+ sp<IServiceManager> sm;
+ sp<IBinder> binder;
+ int retry_cnt = 5;
+
+ if (g_qas == 0) {
+ sm = defaultServiceManager();
+ if (sm != NULL) {
+ do {
+ binder = sm->getService(String16(QTI_AUDIO_SERVER));
+ if (binder != 0)
+ break;
+ else
+ ALOGE("%d:%s: get qas service failed",__LINE__, __func__);
+
+ ALOGW("qti_audio_server not published, waiting...");
+ usleep(500000);
+ } while (--retry_cnt);
+ } else {
+ ALOGE("%d:%s: defaultServiceManager failed",__LINE__, __func__);
+ }
+ if (binder == NULL)
+ return NULL;
+
+ if (g_death_notifier == NULL) {
+ g_death_notifier = new death_notifier();
+ if (g_death_notifier == NULL) {
+ ALOGE("%d: %s() unable to allocate death notifier", __LINE__, __func__);
+ return NULL;
+ }
+ }
+ binder->linkToDeath(g_death_notifier);
+ g_qas = interface_cast<Iqti_audio_server>(binder);
+ assert(g_qas != 0);
+ }
+ return g_qas;
+}
+
+uint32_t qahw_out_get_sample_rate(const qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_get_sample_rate(out_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_get_sample_rate_l(out_handle);
+ }
+}
+
+int qahw_out_set_sample_rate(qahw_stream_handle_t *out_handle, uint32_t rate)
+{
+ ALOGV("%d:%s %d",__LINE__, __func__, rate);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_set_sample_rate(out_handle, rate);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_set_sample_rate_l(out_handle, rate);
+ }
+}
+
+size_t qahw_out_get_buffer_size(const qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_get_buffer_size(out_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_get_buffer_size_l(out_handle);
+ }
+}
+
+audio_channel_mask_t qahw_out_get_channels(const qahw_stream_handle_t
+ *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return (audio_channel_mask_t)(-ENODEV);
+ }
+ return qas->qahw_out_get_channels(out_handle);
+ } else {
+ return (audio_channel_mask_t)(-ENODEV);
+ }
+ } else {
+ return qahw_out_get_channels_l(out_handle);
+ }
+}
+
+audio_format_t qahw_out_get_format(const qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return AUDIO_FORMAT_INVALID;
+ }
+ return qas->qahw_out_get_format(out_handle);
+ } else {
+ return AUDIO_FORMAT_INVALID;;
+ }
+ } else {
+ return qahw_out_get_format_l(out_handle);
+ }
+}
+
+int qahw_out_standby(qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_standby(out_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_standby_l(out_handle);
+ }
+}
+
+int qahw_out_set_parameters(qahw_stream_handle_t *out_handle,
+ const char *kv_pairs)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_set_parameters(out_handle, kv_pairs);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_set_parameters_l(out_handle, kv_pairs);
+ }
+}
+
+char *qahw_out_get_parameters(const qahw_stream_handle_t *out_handle,
+ const char *keys)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return NULL;
+ }
+ return qas->qahw_out_get_parameters(out_handle, keys);
+ } else {
+ return NULL;
+ }
+ } else {
+ return qahw_out_get_parameters_l(out_handle, keys);
+ }
+}
+
+int qahw_out_set_param_data(qahw_stream_handle_t *out_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_set_param_data(out_handle, param_id, payload);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_set_param_data_l(out_handle, param_id, payload);
+ }
+}
+
+int qahw_out_get_param_data(qahw_stream_handle_t *out_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_get_param_data(out_handle, param_id, payload);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_get_param_data_l(out_handle, param_id, payload);
+ }
+}
+
+uint32_t qahw_out_get_latency(const qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_get_latency(out_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_get_latency_l(out_handle);
+ }
+}
+
+int qahw_out_set_volume(qahw_stream_handle_t *out_handle, float left, float right)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_set_volume(out_handle, left, right);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_set_volume_l(out_handle, left, right);
+ }
+}
+
+ssize_t qahw_out_write(qahw_stream_handle_t *out_handle,
+ qahw_out_buffer_t *out_buf)
+{
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_write(out_handle, out_buf);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_write_l(out_handle, out_buf);
+ }
+}
+
+int qahw_out_get_render_position(const qahw_stream_handle_t *out_handle,
+ uint32_t *dsp_frames)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_get_render_position(out_handle, dsp_frames);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_get_render_position_l(out_handle, dsp_frames);
+ }
+}
+
+int qahw_out_set_callback(qahw_stream_handle_t *out_handle,
+ qahw_stream_callback_t callback,
+ void *cookie)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_set_callback(out_handle, callback, cookie);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_set_callback_l(out_handle, callback, cookie);
+ }
+}
+
+int qahw_out_pause(qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_pause(out_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_pause_l(out_handle);
+ }
+}
+
+int qahw_out_resume(qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_resume(out_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_resume_l(out_handle);
+ }
+}
+
+int qahw_out_drain(qahw_stream_handle_t *out_handle, qahw_drain_type_t type )
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_drain(out_handle, type);
+ } else {
+ return -EINVAL;
+ }
+ } else {
+ return qahw_out_drain_l(out_handle, type);
+ }
+}
+
+int qahw_out_flush(qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_flush(out_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_flush_l(out_handle);
+ }
+}
+
+int qahw_out_get_presentation_position(const qahw_stream_handle_t *out_handle,
+ uint64_t *frames, struct timespec *timestamp)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_out_get_presentation_position(out_handle,
+ frames, timestamp);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_out_get_presentation_position_l(out_handle,
+ frames, timestamp);
+ }
+}
+
+uint32_t qahw_in_get_sample_rate(const qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_in_get_sample_rate(in_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_in_get_sample_rate_l(in_handle);
+ }
+}
+
+int qahw_in_set_sample_rate(qahw_stream_handle_t *in_handle, uint32_t rate)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_in_set_sample_rate(in_handle, rate);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_in_set_sample_rate_l(in_handle, rate);
+ }
+}
+
+size_t qahw_in_get_buffer_size(const qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_in_get_buffer_size(in_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_in_get_buffer_size_l(in_handle);
+ }
+}
+
+audio_channel_mask_t qahw_in_get_channels(const qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_in_get_channels(in_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_in_get_channels_l(in_handle);
+ }
+}
+
+audio_format_t qahw_in_get_format(const qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return (audio_format_t)-ENODEV;
+ }
+ return qas->qahw_in_get_format(in_handle);
+ } else {
+ return (audio_format_t)-ENODEV;
+ }
+ } else {
+ return qahw_in_get_format_l(in_handle);
+ }
+}
+
+int qahw_in_set_format(qahw_stream_handle_t *in_handle, audio_format_t format)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return (audio_format_t)-ENODEV;
+ }
+ return qas->qahw_in_set_format(in_handle, format);
+ } else {
+ return (audio_format_t)-ENODEV;
+ }
+ } else {
+ return qahw_in_set_format_l(in_handle, format);
+ }
+}
+
+int qahw_in_standby(qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_in_standby(in_handle);
+ } else {
+ return -EINVAL;
+ }
+ } else {
+ return qahw_in_standby_l(in_handle);
+ }
+}
+
+int qahw_in_set_parameters(qahw_stream_handle_t *in_handle, const char *kv_pairs)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_in_set_parameters(in_handle, kv_pairs);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_in_set_parameters_l(in_handle, kv_pairs);
+ }
+}
+
+char* qahw_in_get_parameters(const qahw_stream_handle_t *in_handle,
+ const char *keys)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return NULL;
+ }
+ return qas->qahw_in_get_parameters(in_handle, keys);
+ } else {
+ return NULL;
+ }
+ } else {
+ return qahw_in_get_parameters_l(in_handle, keys);
+ }
+}
+
+ssize_t qahw_in_read(qahw_stream_handle_t *in_handle,
+ qahw_in_buffer_t *in_buf)
+{
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_in_read(in_handle, in_buf);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_in_read_l(in_handle, in_buf);
+ }
+}
+
+uint32_t qahw_in_get_input_frames_lost(qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_in_get_input_frames_lost(in_handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_in_get_input_frames_lost_l(in_handle);
+ }
+}
+
+int qahw_in_get_capture_position(const qahw_stream_handle_t *in_handle,
+ int64_t *frames, int64_t *time)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_in_get_capture_position(in_handle, frames, time);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_in_get_capture_position_l(in_handle, frames, time);
+ }
+}
+
+int qahw_init_check(const qahw_module_handle_t *hw_module)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_init_check(hw_module);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_init_check_l(hw_module);
+ }
+}
+
+int qahw_set_voice_volume(qahw_module_handle_t *hw_module, float volume)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_set_voice_volume(hw_module, volume);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_set_voice_volume_l(hw_module, volume);
+ }
+}
+
+int qahw_set_mode(qahw_module_handle_t *hw_module, audio_mode_t mode)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_set_mode(hw_module, mode);;
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_set_mode_l(hw_module, mode);
+ }
+}
+
+int qahw_set_mic_mute(qahw_module_handle_t *hw_module, bool state)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_set_mic_mute(hw_module, state);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_set_mic_mute_l(hw_module, state);
+ }
+}
+
+int qahw_get_mic_mute(qahw_module_handle_t *hw_module, bool *state)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_get_mic_mute(hw_module, state);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_get_mic_mute_l(hw_module, state);
+ }
+}
+
+int qahw_set_parameters(qahw_module_handle_t *hw_module, const char *kv_pairs)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_set_parameters(hw_module, kv_pairs);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_set_parameters_l(hw_module, kv_pairs);
+ }
+}
+
+char* qahw_get_parameters(const qahw_module_handle_t *hw_module,
+ const char *keys)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return NULL;
+ }
+ return qas->qahw_get_parameters(hw_module, keys);;
+ } else {
+ return NULL;
+ }
+ } else {
+ return qahw_get_parameters_l(hw_module, keys);
+ }
+}
+
+int qahw_get_param_data(const qahw_module_handle_t *hw_module,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_get_param_data(hw_module, param_id, payload);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_get_param_data_l(hw_module, param_id, payload);
+ }
+}
+
+int qahw_set_param_data(const qahw_module_handle_t *hw_module,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_set_param_data(hw_module, param_id, payload);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_set_param_data_l(hw_module, param_id, payload);
+ }
+}
+
+int qahw_create_audio_patch(qahw_module_handle_t *hw_module,
+ unsigned int num_sources,
+ const struct audio_port_config *sources,
+ unsigned int num_sinks,
+ const struct audio_port_config *sinks,
+ audio_patch_handle_t *handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_create_audio_patch(hw_module, num_sources,
+ sources, num_sinks, sinks,
+ handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_create_audio_patch_l(hw_module, num_sources,
+ sources, num_sinks, sinks,
+ handle);
+ }
+}
+
+int qahw_release_audio_patch(qahw_module_handle_t *hw_module,
+ audio_patch_handle_t handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_release_audio_patch(hw_module, handle);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_release_audio_patch_l(hw_module, handle);
+ }
+}
+
+int qahw_get_audio_port(qahw_module_handle_t *hw_module,
+ struct audio_port *port)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_get_audio_port(hw_module, port);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_get_audio_port_l(hw_module, port);
+ }
+}
+
+int qahw_set_audio_port_config(qahw_module_handle_t *hw_module,
+ const struct audio_port_config *config)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_set_audio_port_config(hw_module, config);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_set_audio_port_config_l(hw_module, config);
+ }
+}
+
+size_t qahw_get_input_buffer_size(const qahw_module_handle_t *hw_module,
+ const struct audio_config *config)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_get_input_buffer_size(hw_module, config);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_get_input_buffer_size_l(hw_module, config);
+ }
+}
+
+int qahw_open_output_stream(qahw_module_handle_t *hw_module,
+ audio_io_handle_t handle,
+ audio_devices_t devices,
+ audio_output_flags_t flags,
+ struct audio_config *config,
+ qahw_stream_handle_t **out_handle,
+ const char *address)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_open_output_stream(hw_module, handle, devices,
+ flags, config, out_handle,
+ address);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_open_output_stream_l(hw_module, handle, devices,
+ flags, config, out_handle,
+ address);
+ }
+}
+
+int qahw_close_output_stream(qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ int status;
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_close_output_stream(out_handle);
+ } else {
+ p_stream_handle *handle;
+ struct listnode *node, *tempnode;
+ pthread_mutex_lock(&list_lock);
+ list_for_each_safe(node, tempnode, &stream_list) {
+ handle = node_to_item(node, p_stream_handle, list);
+ p_stream_handle *p_stream = (p_stream_handle *)out_handle;
+ if (handle != NULL && handle == p_stream) {
+ sh_mem_data *shmem_data = handle->shmem_data;
+ ALOGD("%s %d: clear memory of handle %p &handle %p", __func__, __LINE__, handle, &handle);
+ handle->sh_mem_dealer.clear();
+ handle->sh_mem_handle.clear();
+ }
+ list_remove(node);
+ free(node_to_item(node, p_stream_handle, list));
+ ALOGD("%s %d: Freed node", __func__, __LINE__);
+ }
+ pthread_mutex_unlock(&list_lock);
+ return -ENODEV;
+ }
+ } else {
+ return qahw_close_output_stream_l(out_handle);
+ }
+}
+
+int qahw_open_input_stream(qahw_module_handle_t *hw_module,
+ audio_io_handle_t handle,
+ audio_devices_t devices,
+ struct audio_config *config,
+ qahw_stream_handle_t **in_handle,
+ audio_input_flags_t flags,
+ const char *address,
+ audio_source_t source)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_open_input_stream(hw_module, handle, devices,
+ config, in_handle, flags,
+ address, source);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_open_input_stream_l(hw_module, handle, devices,
+ config, in_handle, flags,
+ address, source);
+ }
+}
+
+int qahw_close_input_stream(qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_close_input_stream(in_handle);
+ } else {
+ p_stream_handle *handle;
+ struct listnode *node, *tempnode;
+ pthread_mutex_lock(&list_lock);
+ list_for_each_safe(node, tempnode, &stream_list) {
+ ALOGD("%s %d", __func__, __LINE__);
+ handle = node_to_item(node, p_stream_handle, list);
+ p_stream_handle *p_stream = (p_stream_handle *)in_handle;
+ if (handle != NULL && handle == p_stream) {
+ sh_mem_data *shmem_data = handle->shmem_data;
+ ALOGD("%s %d: clear memory of handle %p &handle %p", __func__, __LINE__, handle, &handle);
+ handle->sh_mem_dealer.clear();
+ handle->sh_mem_handle.clear();
+ }
+ list_remove(node);
+ free(node_to_item(node, p_stream_handle, list));
+ ALOGD("%s %d: Freed node", __func__, __LINE__);
+ }
+ pthread_mutex_unlock(&list_lock);
+ return -EINVAL;
+ }
+ } else {
+ return qahw_close_input_stream_l(in_handle);
+ }
+}
+
+int qahw_get_version()
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_get_version();
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_get_version_l();
+ }
+}
+
+int qahw_unload_module(qahw_module_handle_t *hw_module)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled) {
+ if (!g_qas_died && (--g_qas_load_count == 0)) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return -ENODEV;
+ }
+ return qas->qahw_unload_module(hw_module);
+ } else {
+ return -ENODEV;
+ }
+ } else {
+ return qahw_unload_module_l(hw_module);
+ }
+}
+
+qahw_module_handle_t *qahw_load_module(const char *hw_module_id)
+{
+ char value[PROPERTY_VALUE_MAX];
+
+ ALOGV("%d:%s",__LINE__, __func__);
+ g_binder_enabled = property_get_bool("persist.vendor.audio.qas.enabled", false);
+ ALOGV("%d:%s: g_binder_enabled %d",__LINE__, __func__, g_binder_enabled);
+ if (g_binder_enabled) {
+ sp<Iqti_audio_server> qas = get_qti_audio_server();
+ if (qas == 0) {
+ ALOGE("%d:%s: invalid HAL handle",__LINE__, __func__);
+ return (void*)(-ENODEV);
+ }
+ g_qas_handle = qas->qahw_load_module(hw_module_id);
+ if (g_qas_handle == NULL) {
+ ALOGE("%s: HAL loading failed", __func__);
+ } else if (g_qas_load_count == 0) {
+ g_qas_load_count++;
+ g_qas_died = false;
+ pthread_mutex_init(&list_lock, (const pthread_mutexattr_t *) NULL);
+ list_init(&stream_list);
+ ALOGV("%s %d: stream_list %p", __func__, __LINE__, stream_list);
+ } else {
+ g_qas_load_count++;
+ ALOGD("%s: returning existing instance of hal", __func__);
+ }
+ } else {
+ g_qas_handle = qahw_load_module_l(hw_module_id);
+ }
+ return g_qas_handle;
+}
+#else
+void qahw_register_qas_death_notify_cb(audio_error_callback cb __unused, void* context __unused)
+{
+}
+
+uint32_t qahw_out_get_sample_rate(const qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_get_sample_rate_l(out_handle);
+}
+
+int qahw_out_set_sample_rate(qahw_stream_handle_t *out_handle, uint32_t rate)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_set_sample_rate_l(out_handle, rate);
+}
+
+size_t qahw_out_get_buffer_size(const qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_get_buffer_size_l(out_handle);
+}
+
+audio_channel_mask_t qahw_out_get_channels(const qahw_stream_handle_t
+ *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_get_channels_l(out_handle);
+}
+
+audio_format_t qahw_out_get_format(const qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_get_format_l(out_handle);
+}
+
+int qahw_out_standby(qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_standby_l(out_handle);
+}
+
+int qahw_out_set_parameters(qahw_stream_handle_t *out_handle,
+ const char *kv_pairs)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_set_parameters_l(out_handle, kv_pairs);
+}
+
+char *qahw_out_get_parameters(const qahw_stream_handle_t *out_handle,
+ const char *keys)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_get_parameters_l(out_handle, keys);
+}
+
+int qahw_out_set_param_data(qahw_stream_handle_t *out_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_set_param_data_l(out_handle, param_id, payload);
+}
+
+int qahw_out_get_param_data(qahw_stream_handle_t *out_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_get_param_data_l(out_handle, param_id, payload);
+}
+
+uint32_t qahw_out_get_latency(const qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_get_latency_l(out_handle);
+}
+
+int qahw_out_set_volume(qahw_stream_handle_t *out_handle, float left, float right)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_set_volume_l(out_handle, left, right);
+}
+
+ssize_t qahw_out_write(qahw_stream_handle_t *out_handle,
+ qahw_out_buffer_t *out_buf)
+{
+ return qahw_out_write_l(out_handle, out_buf);
+}
+
+int qahw_out_get_render_position(const qahw_stream_handle_t *out_handle,
+ uint32_t *dsp_frames)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_get_render_position_l(out_handle, dsp_frames);
+}
+
+int qahw_out_set_callback(qahw_stream_handle_t *out_handle,
+ qahw_stream_callback_t callback,
+ void *cookie)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_set_callback_l(out_handle, callback, cookie);
+}
+
+int qahw_out_pause(qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_pause_l(out_handle);
+}
+
+int qahw_out_resume(qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_resume_l(out_handle);
+}
+
+int qahw_out_drain(qahw_stream_handle_t *out_handle, qahw_drain_type_t type )
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_drain_l(out_handle, type);
+}
+
+int qahw_out_flush(qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_flush_l(out_handle);
+}
+
+int qahw_out_get_presentation_position(const qahw_stream_handle_t *out_handle,
+ uint64_t *frames, struct timespec *timestamp)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_out_get_presentation_position_l(out_handle,
+ frames, timestamp);
+}
+
+uint32_t qahw_in_get_sample_rate(const qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_get_sample_rate_l(in_handle);
+}
+
+int qahw_in_set_sample_rate(qahw_stream_handle_t *in_handle, uint32_t rate)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_set_sample_rate_l(in_handle, rate);
+}
+
+size_t qahw_in_get_buffer_size(const qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_get_buffer_size_l(in_handle);
+}
+
+audio_channel_mask_t qahw_in_get_channels(const qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_get_channels_l(in_handle);
+}
+
+audio_format_t qahw_in_get_format(const qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_get_format_l(in_handle);
+}
+
+int qahw_in_set_format(qahw_stream_handle_t *in_handle, audio_format_t format)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_set_format_l(in_handle, format);
+}
+
+int qahw_in_standby(qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_standby_l(in_handle);
+}
+
+int qahw_in_set_parameters(qahw_stream_handle_t *in_handle, const char *kv_pairs)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_set_parameters_l(in_handle, kv_pairs);
+}
+
+char* qahw_in_get_parameters(const qahw_stream_handle_t *in_handle,
+ const char *keys)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_get_parameters_l(in_handle, keys);
+}
+
+ssize_t qahw_in_read(qahw_stream_handle_t *in_handle,
+ qahw_in_buffer_t *in_buf)
+{
+ return qahw_in_read_l(in_handle, in_buf);
+}
+
+uint32_t qahw_in_get_input_frames_lost(qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_get_input_frames_lost_l(in_handle);
+}
+
+int qahw_in_get_capture_position(const qahw_stream_handle_t *in_handle,
+ int64_t *frames, int64_t *time)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_get_capture_position_l(in_handle, frames, time);
+}
+
+int qahw_init_check(const qahw_module_handle_t *hw_module)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_init_check_l(hw_module);
+}
+
+int qahw_set_voice_volume(qahw_module_handle_t *hw_module, float volume)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_set_voice_volume_l(hw_module, volume);
+}
+
+int qahw_set_mode(qahw_module_handle_t *hw_module, audio_mode_t mode)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_set_mode_l(hw_module, mode);
+}
+
+int qahw_set_mic_mute(qahw_module_handle_t *hw_module, bool state)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_set_mic_mute_l(hw_module, state);
+}
+
+int qahw_get_mic_mute(qahw_module_handle_t *hw_module, bool *state)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_get_mic_mute_l(hw_module, state);
+}
+
+int qahw_set_parameters(qahw_module_handle_t *hw_module, const char *kv_pairs)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_set_parameters_l(hw_module, kv_pairs);
+}
+
+char* qahw_get_parameters(const qahw_module_handle_t *hw_module,
+ const char *keys)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_get_parameters_l(hw_module, keys);
+}
+
+int qahw_get_param_data(const qahw_module_handle_t *hw_module,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_get_param_data_l(hw_module, param_id, payload);
+}
+
+int qahw_set_param_data(const qahw_module_handle_t *hw_module,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_set_param_data_l(hw_module, param_id, payload);
+}
+
+int qahw_create_audio_patch(qahw_module_handle_t *hw_module,
+ unsigned int num_sources,
+ const struct audio_port_config *sources,
+ unsigned int num_sinks,
+ const struct audio_port_config *sinks,
+ audio_patch_handle_t *handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_create_audio_patch_l(hw_module, num_sources,
+ sources, num_sinks, sinks,
+ handle);
+}
+
+int qahw_release_audio_patch(qahw_module_handle_t *hw_module,
+ audio_patch_handle_t handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_release_audio_patch_l(hw_module, handle);
+}
+
+int qahw_get_audio_port(qahw_module_handle_t *hw_module,
+ struct audio_port *port)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_get_audio_port_l(hw_module, port);
+}
+
+int qahw_set_audio_port_config(qahw_module_handle_t *hw_module,
+ const struct audio_port_config *config)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_set_audio_port_config_l(hw_module, config);
+}
+
+size_t qahw_get_input_buffer_size(const qahw_module_handle_t *hw_module,
+ const struct audio_config *config)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_get_input_buffer_size_l(hw_module, config);
+}
+
+int qahw_open_output_stream(qahw_module_handle_t *hw_module,
+ audio_io_handle_t handle,
+ audio_devices_t devices,
+ audio_output_flags_t flags,
+ struct audio_config *config,
+ qahw_stream_handle_t **out_handle,
+ const char *address)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_open_output_stream_l(hw_module, handle, devices,
+ flags, config, out_handle,
+ address);
+}
+
+int qahw_close_output_stream(qahw_stream_handle_t *out_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_close_output_stream_l(out_handle);
+}
+
+int qahw_open_input_stream(qahw_module_handle_t *hw_module,
+ audio_io_handle_t handle,
+ audio_devices_t devices,
+ struct audio_config *config,
+ qahw_stream_handle_t **in_handle,
+ audio_input_flags_t flags,
+ const char *address,
+ audio_source_t source)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_open_input_stream_l(hw_module, handle, devices,
+ config, in_handle, flags,
+ address, source);
+}
+
+int qahw_close_input_stream(qahw_stream_handle_t *in_handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_close_input_stream_l(in_handle);
+}
+
+int qahw_get_version()
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_get_version_l();
+}
+
+int qahw_unload_module(qahw_module_handle_t *hw_module)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_unload_module_l(hw_module);
+}
+
+qahw_module_handle_t *qahw_load_module(const char *hw_module_id)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_load_module_l(hw_module_id);
+}
+#endif
diff --git a/qahw_api/test/Android.mk b/qahw_api/test/Android.mk
index 887f416..ec4e698 100644
--- a/qahw_api/test/Android.mk
+++ b/qahw_api/test/Android.mk
@@ -8,6 +8,7 @@
LOCAL_MODULE := hal_play_test
hal-play-inc = $(TARGET_OUT_HEADERS)/mm-audio/qahw_api/inc
+hal-play-inc += $(TARGET_OUT_HEADERS)/mm-audio/qahw/inc
hal-play-inc += external/tinyalsa/include
LOCAL_CFLAGS += -Wall -Werror -Wno-sign-compare
@@ -15,6 +16,7 @@
LOCAL_SHARED_LIBRARIES := \
libaudioutils\
libqahw \
+ libqahwwrapper \
libutils \
libcutils
diff --git a/qahw_api/test/Makefile.am b/qahw_api/test/Makefile.am
index b4bbea7..40cc24a 100644
--- a/qahw_api/test/Makefile.am
+++ b/qahw_api/test/Makefile.am
@@ -1,34 +1,35 @@
bin_PROGRAMS = hal_play_test
-PLAY_CPPFLAGS = -Wno-sign-compare -Werror
-PLAY_CPPFLAGS += -D__unused=__attribute__\(\(__unused__\)\)
+PLAY_CFLAGS = -Wno-sign-compare -Werror
+PLAY_CFLAGS += -D__unused=__attribute__\(\(__unused__\)\)
PLAY_INCLUDES = -I $(top_srcdir)/qahw_api/inc
+PLAY_INCLUDES += -I $(top_srcdir)/qahw/inc
hal_play_test_SOURCES = qahw_playback_test.c \
qahw_effect_test.c
hal_play_test_LDADD = -lutils ../libqahw.la
+AM_CFLAGS = -I $(PKG_CONFIG_SYSROOT_DIR)/usr/include/mm-audio/qahw/inc
if QAP
-AM_CFLAGS = -DQAP
+AM_CFLAGS += -DQAP
AM_CFLAGS += -I ${WORKSPACE}/audio/mm-audio/qap_wrapper/inc/
hal_play_test_SOURCES += qap_wrapper_extn.c
hal_play_test_LDADD += -lqap_wrapper
endif
-hal_play_test_CPPFLAGS = $(PLAY_CPPFLAGS) $(PLAY_INCLUDES)
-hal_play_test_CFLAGS = $(AM_CFLAGS)
-hal_play_test_CFLAGS = -DLINUX_ENABLED
+hal_play_test_CFLAGS = $(PLAY_CFLAGS) $(PLAY_INCLUDES)
+hal_play_test_CFLAGS += $(AM_CFLAGS) -DLINUX_ENABLED
bin_PROGRAMS += hal_rec_test
-REC_CPPFLAGS = $(PLAY_CPPFLAGS) -Dnullptr=NULL
+REC_CFLAGS = $(PLAY_CFLAGS) -Dnullptr=NULL
REC_INCLUDES = $(PLAY_INCLUDES)
hal_rec_test_SOURCES = qahw_multi_record_test.c
-hal_rec_test_CPPFLAGS = -Dstrlcat=g_strlcat $(GLIB_CFLAGS) -include glib.h
-hal_rec_test_CPPFLAGS += $(REC_CPPFLAGS) $(REC_INCLUDES)
-hal_play_test_CFLAGS += $(AM_CFLAGS)
+hal_rec_test_CFLAGS = -Dstrlcat=g_strlcat $(GLIB_CFLAGS) -include glib.h
+hal_rec_test_CFLAGS += $(REC_CFLAGS) $(REC_INCLUDES)
+hal_rec_test_CFLAGS += $(AM_CFLAGS)
hal_rec_test_LDADD = -lutils ../libqahw.la $(GLIB_LIBS)
bin_PROGRAMS += trans_loopback_test
@@ -37,6 +38,6 @@
trans_loopback_test_SOURCES = trans_loopback_test.c
-trans_loopback_test_CFLAGS = $(CFLAGS) -Wno-sign-compare -Werror
+trans_loopback_test_CFLAGS = $(AM_CFLAGS) -Wno-sign-compare -Werror
trans_loopback_test_CFLAGS += $(trans_loopback_test_INCLUDES)
-trans_loopback_test_LDADD = -llog -lutils ../libqahw.la -lcutils
+trans_loopback_test_LDADD = -llog -lutils ../libqahw.la -lcutils -lm
diff --git a/qahw_api/test/qahw_multi_record_test.c b/qahw_api/test/qahw_multi_record_test.c
index 23acdeb..d618101 100644
--- a/qahw_api/test/qahw_multi_record_test.c
+++ b/qahw_api/test/qahw_multi_record_test.c
@@ -34,6 +34,7 @@
#define nullptr NULL
#define LATENCY_NODE "/sys/kernel/debug/audio_in_latency_measurement_node"
#define LATENCY_NODE_INIT_STR "1"
+#define MAX_RECORD_SESSIONS 6
static bool kpi_mode;
FILE * log_file = NULL;
@@ -89,6 +90,7 @@
int sourcetrack_done = 0;
static pthread_mutex_t sourcetrack_lock;
struct qahw_sound_focus_param sound_focus_data;
+void *context = NULL;
static bool request_wake_lock(bool wakelock_acquired, bool enable)
{
@@ -129,7 +131,6 @@
stop_record = true;
}
-
void read_soundfocus_param(void)
{
uint16_t start_angle[4] = {0};
@@ -248,7 +249,9 @@
{
int rc = 0, ret = 0, count = 0;
FILE *fdLatencyNode = nullptr;
- struct timespec tsColdI, tsColdF, tsCont;
+ struct timespec tsColdI = { 0, 0 };
+ struct timespec tsColdF = { 0, 0 };
+ struct timespec tsCont = { 0, 0 };
uint64_t tCold, tCont, tsec, tusec;
char latencyBuf[200] = {0};
time_t start_time = time(0);
@@ -351,6 +354,7 @@
fprintf(log_file, "File open failed \n");
if (log_file != stdout)
fprintf(stdout, "File open failed \n");
+ free(buffer);
test_end();
pthread_exit(0);
}
@@ -441,6 +445,7 @@
hdr.riff_sz = data_sz + 44 - 8;
fseek(fd, 0, SEEK_SET);
fwrite(&hdr, 1, sizeof(hdr), fd);
+ free(buffer);
fclose(fd);
/* capture latency kpis if required */
@@ -449,7 +454,8 @@
tsColdF.tv_nsec/1000000 - tsColdI.tv_nsec/1000000;
fread((void *) latencyBuf, 100, 1, fdLatencyNode);
- fclose(fdLatencyNode);
+ if (fdLatencyNode)
+ fclose(fdLatencyNode);
sscanf(latencyBuf, " %llu,%llu", &tsec, &tusec);
tCont = ((uint64_t)tsCont.tv_sec)*1000 - tsec*1000 + ((uint64_t)tsCont.tv_nsec)/1000000 - tusec/1000;
if (log_file != stdout) {
@@ -543,15 +549,7 @@
thread_param->record_length = 8 /*sec*/;
thread_param->record_delay = 0 /*sec*/;
- if (rec_session == 1) {
- thread_param->handle = 0x999;
- } else if (rec_session == 2) {
- thread_param->handle = 0x998;
- } else if (rec_session == 3) {
- thread_param->handle = 0x997;
- } else if (rec_session == 4) {
- thread_param->handle = 0x996;
- }
+ thread_param->handle = 0x99A - rec_session;
}
void usage() {
@@ -590,16 +588,24 @@
printf(" For mono channel 16kHz rate for 30seconds\n\n");
}
+static void qti_audio_server_death_notify_cb(void *ctxt) {
+ fprintf(log_file, "qas died\n");
+ fprintf(stderr, "qas died\n");
+ stop_record = true;
+}
+
int main(int argc, char* argv[]) {
int max_recordings_requested = 0, status = 0;
- int thread_active[4] = {0};
+ int thread_active[MAX_RECORD_SESSIONS] = {0};
qahw_module_handle_t *qahw_mod_handle;
const char *mod_name = "audio.primary";
- struct audio_config_params params[4];
+ struct audio_config_params params[MAX_RECORD_SESSIONS];
bool interactive_mode = false, source_tracking = false;
struct listnode param_list;
char log_filename[256] = "stdout";
bool wakelock_acquired = false;
+ int i;
+ const char *recording_session[MAX_RECORD_SESSIONS] = {"first", "second", "third", "fourth", "fifth", "sixth"};
log_file = stdout;
list_init(¶m_list);
@@ -680,6 +686,8 @@
break;
}
}
+ fprintf(log_file, "registering qas callback");
+ qahw_register_qas_death_notify_cb((audio_error_callback)qti_audio_server_death_notify_cb, context);
wakelock_acquired = request_wake_lock(wakelock_acquired, true);
qahw_mod_handle = qahw_load_module(mod_name);
@@ -692,8 +700,16 @@
printf(" Enter logfile path (stdout or 1 for console out)::: \n");
scanf(" %s", log_filename);
printf(" Enter number of record sessions to be started \n");
- printf(" (Maximum of 4 record sessions are allowed):::: ");
+ printf(" (Maximum of %d record sessions are allowed):::: ", MAX_RECORD_SESSIONS);
scanf(" %d", &max_recordings_requested);
+ if (max_recordings_requested > MAX_RECORD_SESSIONS) {
+ fprintf(log_file, " INVALID input -- Max record sessions supported is %d -exit \n",
+ MAX_RECORD_SESSIONS);
+ if (log_file != stdout)
+ fprintf(stdout, " INVALID input -- Max record sessions supported is %d -exit \n",
+ MAX_RECORD_SESSIONS);
+ return -1;
+ }
} else {
max_recordings_requested = 1;
}
@@ -705,51 +721,17 @@
}
}
- switch (max_recordings_requested) {
- case 4:
- if (interactive_mode) {
- printf(" Enter the config params for fourth record session \n");
- fill_default_params(¶ms[3], 4);
- read_config_params_from_user(¶ms[3]);
- }
- params[3].qahw_mod_handle = qahw_mod_handle;
- thread_active[3] = 1;
- printf(" \n");
- case 3:
- if (interactive_mode) {
- printf(" Enter the config params for third record session \n");
- fill_default_params(¶ms[2], 3);
- read_config_params_from_user(¶ms[2]);
- }
- params[2].qahw_mod_handle = qahw_mod_handle;
- thread_active[2] = 1;
- printf(" \n");
- case 2:
- if (interactive_mode) {
- printf(" Enter the config params for second record session \n");
- fill_default_params(¶ms[1], 2);
- read_config_params_from_user(¶ms[1]);
- }
- params[1].qahw_mod_handle = qahw_mod_handle;
- thread_active[1] = 1;
- printf(" \n");
- case 1:
- if (interactive_mode) {
- printf(" Enter the config params for first record session \n");
- fill_default_params(¶ms[0], 1);
- read_config_params_from_user(¶ms[0]);
- }
- params[0].qahw_mod_handle = qahw_mod_handle;
- thread_active[0] = 1;
- printf(" \n");
- break;
- default:
- fprintf(log_file, " INVALID input -- Max record sessions supported is 4 -exit \n");
- if (log_file != stdout)
- fprintf(stdout, " INVALID input -- Max record sessions supported is 4 -exit \n");
- status = -1;
- break;
+ for (i = max_recordings_requested; i > 0; i--) {
+ if (interactive_mode) {
+ printf("Enter the config params for %s record session \n", recording_session[i - 1]);
+ fill_default_params(¶ms[i - 1], i);
+ read_config_params_from_user(¶ms[i - 1]);
+ }
+ params[i - 1].qahw_mod_handle = qahw_mod_handle;
+ thread_active[i - 1] = 1;
+ printf(" \n");
}
+
if (interactive_mode && status == 0) {
int option = 0;
@@ -798,7 +780,7 @@
qahw_set_parameters(qahw_mod_handle, params[0].kvpairs);
}
- pthread_t tid[4];
+ pthread_t tid[MAX_RECORD_SESSIONS];
pthread_t sourcetrack_thread;
int ret = -1;
@@ -829,50 +811,20 @@
if (signal(SIGINT, stop_signal_handler) == SIG_ERR)
fprintf(log_file, "Failed to register SIGINT:%d\n",errno);
- if (thread_active[0] == 1) {
- fprintf(log_file, "\n Create first record thread \n");
- ret = pthread_create(&tid[0], NULL, start_input, (void *)¶ms[0]);
- if (ret) {
- status = -1;
- fprintf(log_file, " Failed to create first record thread \n ");
- if (log_file != stdout)
- fprintf(stdout, " Failed to create first record thread \n ");
- thread_active[0] = 0;
+ for (i = 0; i < MAX_RECORD_SESSIONS; i++) {
+ if (thread_active[i] == 1) {
+ fprintf(log_file, "\n Create %s record thread \n", recording_session[i]);
+ ret = pthread_create(&tid[i], NULL, start_input, (void *)¶ms[i]);
+ if (ret) {
+ status = -1;
+ fprintf(log_file, " Failed to create %s record thread \n", recording_session[i]);
+ if (log_file != stdout)
+ fprintf(stdout, " Failed to create %s record thread \n", recording_session[i]);
+ thread_active[i] = 0;
+ }
}
}
- if (thread_active[1] == 1) {
- fprintf(log_file, "Create second record thread \n");
- ret = pthread_create(&tid[1], NULL, start_input, (void *)¶ms[1]);
- if (ret) {
- status = -1;
- fprintf(log_file, " Failed to create second record thread \n ");
- if (log_file != stdout)
- fprintf(stdout, " Failed to create second record thread \n ");
- thread_active[1] = 0;
- }
- }
- if (thread_active[2] == 1) {
- fprintf(log_file, "Create third record thread \n");
- ret = pthread_create(&tid[2], NULL, start_input, (void *)¶ms[2]);
- if (ret) {
- status = -1;
- fprintf(log_file, " Failed to create third record thread \n ");
- if (log_file != stdout)
- fprintf(stdout, " Failed to create third record thread \n ");
- thread_active[2] = 0;
- }
- }
- if (thread_active[3] == 1) {
- fprintf(log_file, "Create fourth record thread \n");
- ret = pthread_create(&tid[3], NULL, start_input, (void *)¶ms[3]);
- if (ret) {
- status = -1;
- fprintf(log_file, " Failed to create fourth record thread \n ");
- if (log_file != stdout)
- fprintf(stdout, " Failed to create fourth record thread \n ");
- thread_active[3] = 0;
- }
- }
+
fprintf(log_file, " All threads started \n");
if (log_file != stdout)
fprintf(stdout, " All threads started \n");
@@ -901,21 +853,12 @@
fprintf(log_file, " Waiting for threads exit \n");
if (log_file != stdout)
fprintf(stdout, " Waiting for threads exit \n");
- if (thread_active[0] == 1) {
- pthread_join(tid[0], NULL);
- fprintf(log_file, " after first record thread exit \n");
- }
- if (thread_active[1] == 1) {
- pthread_join(tid[1], NULL);
- fprintf(log_file, " after second record thread exit \n");
- }
- if (thread_active[2] == 1) {
- pthread_join(tid[2], NULL);
- fprintf(log_file, " after third record thread exit \n");
- }
- if (thread_active[3] == 1) {
- pthread_join(tid[3], NULL);
- fprintf(log_file, " after fourth record thread exit \n");
+
+ for (i = 0; i < MAX_RECORD_SESSIONS; i++) {
+ if (thread_active[i] == 1) {
+ pthread_join(tid[i], NULL);
+ fprintf(log_file, " after %s record thread exit \n", recording_session[i]);
+ }
}
sourcetrack_error:
diff --git a/qahw_api/test/qahw_playback_test.c b/qahw_api/test/qahw_playback_test.c
index fc55f83..fceff8b 100644
--- a/qahw_api/test/qahw_playback_test.c
+++ b/qahw_api/test/qahw_playback_test.c
@@ -54,6 +54,10 @@
#define DTSHD_CHUNK_STREAM_KEYWORD "STRMDATA"
#define DTSHD_META_KEYWORD_SIZE 8 /*in bytes */
+#ifndef AUDIO_OUTPUT_FLAG_MAIN
+#define AUDIO_OUTPUT_FLAG_MAIN 0x8000000
+#endif
+
static ssize_t get_bytes_to_read(FILE* file, int filetype);
static void init_streams(void);
int pthread_cancel(pthread_t thread);
@@ -351,7 +355,7 @@
struct proxy_data* params = (struct proxy_data*) data;
qahw_module_handle_t *qahw_mod_handle = params->acp.qahw_mod_handle;
qahw_in_buffer_t in_buf;
- char *buffer;
+ char *buffer = NULL;
int rc = 0;
int bytes_to_read, bytes_written = 0, bytes_wrote = 0;
FILE *fp = NULL;
@@ -378,6 +382,7 @@
if ((fp = fopen(params->acp.file_name,"w"))== NULL) {
fprintf(log_file, "Cannot open file to dump proxy data\n");
fprintf(stderr, "Cannot open file to dump proxy data\n");
+ free(buffer);
pthread_exit(0);
}
else {
@@ -420,6 +425,7 @@
fprintf(stderr, "could not close input stream %d \n", rc);
}
fprintf(log_file, "pcm data saved to file %s", params->acp.file_name);
+ free(buffer);
}
return 0;
}
@@ -463,7 +469,7 @@
return NULL;
}
-static int is_eof(stream_config *stream) {
+static int __unused is_eof (stream_config *stream) {
if (stream->filename) {
if (feof(stream->file_stream)) {
fprintf(log_file, "stream %d: error in fread, error %d\n", stream->stream_index, ferror(stream->file_stream));
@@ -505,7 +511,7 @@
ret = qahw_out_write(out_handle, &out_buf);
if (ret < 0) {
fprintf(log_file, "stream %d: writing data to hal failed (ret = %zd)\n", stream_params->stream_index, ret);
- } else if (ret != bytes) {
+ } else if ((ret != bytes) && (!stop_playback)) {
fprintf(log_file, "stream %d: provided bytes %zd, written bytes %d\n",stream_params->stream_index, bytes, ret);
fprintf(log_file, "stream %d: waiting for event write ready\n", stream_params->stream_index);
pthread_cond_wait(&stream_params->write_cond, &stream_params->write_lock);
@@ -516,7 +522,7 @@
return ret;
}
-static bool is_assoc_active()
+static bool __unused is_assoc_active()
{
int i = 0;
bool is_assoc_active = false;
@@ -530,7 +536,7 @@
return is_assoc_active;
}
-static int get_assoc_index()
+static int __unused get_assoc_index()
{
int i = 0;
@@ -1132,6 +1138,7 @@
if (data == NULL) {
fprintf(log_file, "calloc failed!!\n");
fprintf(stderr, "calloc failed!!\n");
+ fclose(fd_latency_node);
return -ENOMEM;
}
@@ -1144,7 +1151,8 @@
if (ret) {
fprintf(log_file, "error(%d) fetching start time for cold latency", ret);
fprintf(stderr, "error(%d) fetching start time for cold latency", ret);
- return -1;
+ rc = -1;
+ goto exit;
}
} else if (count == 16) {
int *d = (int *)data;
@@ -1153,7 +1161,8 @@
if (ret) {
fprintf(log_file, "error(%d) fetching start time for continuous latency", ret);
fprintf(stderr, "error(%d) fetching start time for continuous latency", ret);
- return -1;
+ rc = -1;
+ goto exit;
}
}
@@ -1179,6 +1188,9 @@
fprintf(log_file, "\n values from debug node %s\n", latency_buf);
fprintf(log_file, " cold latency %llums, continuous latency %llums,\n", tcold, tcont);
fprintf(log_file, " **Note: please add DSP Pipe/PP latency numbers to this, for final latency values\n");
+exit:
+ fclose(fd_latency_node);
+ free(data);
return rc;
}
@@ -1221,7 +1233,7 @@
void parse_aptx_dec_bt_addr(char *value, struct qahw_aptx_dec_param *aptx_cfg)
{
- int ba[6];
+ int ba[6] = {0, 0, 0, 0, 0, 0};
char *str, *tok;
uint32_t addr[3];
int i = 0;
@@ -1693,7 +1705,7 @@
ret = fread(&read_chunk_size, 1, DTSHD_META_KEYWORD_SIZE, file);
chunk_size = convert_BE_to_LE(read_chunk_size);
if (ret != DTSHD_META_KEYWORD_SIZE) {
- fprintf(stderr,"%s %d file read error ret %\n",
+ fprintf(stderr,"%s %d file read error ret %d \n",
__func__, __LINE__, ret);
file_read_size = -EINVAL;
break;
@@ -1836,6 +1848,7 @@
char *init_ptr = NULL;
char *token = NULL;
char *saveptr = NULL;
+ int rc = 0;
if (NULL == channel_map)
return -EINVAL;
@@ -1849,20 +1862,24 @@
init_ptr = token_string;
token = strtok_r(token_string, ",", &saveptr);
int index = 0;
- if (NULL == token)
- return -EINVAL;
+ if (NULL == token) {
+ rc = -EINVAL;
+ goto exit;
+ }
else
channel_map[index++] = get_channel_mask_for_name(token);
while(NULL !=(token = strtok_r(NULL,",",&saveptr)))
channel_map[index++] = get_channel_mask_for_name(token);
- free(init_ptr);
- init_ptr = NULL;
- token_string = NULL;
+ goto exit;
} else
return -EINVAL;
- return 0;
+exit:
+ free(init_ptr);
+ init_ptr = NULL;
+ token_string = NULL;
+ return rc;
}
int extract_mixer_coeffs(qahw_mix_matrix_params_t * mm_params, const char * arg_string){
@@ -1872,7 +1889,7 @@
char *token = NULL;
char *saveptr = NULL;
int i = 0;
- int j = 0;
+ int j = 0, rc = 0;
if (NULL == mm_params)
return -EINVAL;
@@ -1885,9 +1902,10 @@
if(token_string != NULL) {
init_ptr = token_string;
token = strtok_r(token_string, ",", &saveptr);
- int index = 0;
- if (NULL == token)
- return -EINVAL;
+ if (NULL == token) {
+ rc = -EINVAL;
+ goto exit;
+ }
else {
mm_params->mixer_coeffs[i][j] = atof(token);
j++;
@@ -1902,11 +1920,14 @@
break;
mm_params->mixer_coeffs[i][j++] = atof(token);
}
- free(init_ptr);
- init_ptr = NULL;
- token_string = NULL;
+ goto exit;
} else
return -EINVAL;
+exit:
+ free(init_ptr);
+ init_ptr = NULL;
+ token_string = NULL;
+ return rc;
}
#ifdef QAP
@@ -1956,6 +1977,16 @@
}
#endif
+static void qti_audio_server_death_notify_cb(void *ctxt) {
+ fprintf(log_file, "qas died\n");
+ fprintf(stderr, "qas died\n");
+
+ stream_config *s_params = (stream_config*) ctxt;
+ pthread_cond_signal(&s_params->write_cond);
+ pthread_cond_signal(&s_params->drain_cond);
+ stop_playback = true;
+}
+
int main(int argc, char* argv[]) {
char *ba = NULL;
qahw_param_payload payload;
@@ -2115,14 +2146,14 @@
get_kvpairs_string(optarg, "O", output_ch_map);
get_kvpairs_string(optarg, "M", mixer_coeff);
- extract_channel_mapping(stream_param[i].mm_params_downmix.input_channel_map, input_ch_map);
+ extract_channel_mapping((uint16_t *)(stream_param[i].mm_params_downmix.input_channel_map), input_ch_map);
stream_param[i].mm_params_downmix.has_input_channel_map = 1;
fprintf(log_file, "\ndownmix Input channel mapping: ");
for (iter_i= 0; iter_i < stream_param[i].mm_params_downmix.num_input_channels; iter_i++) {
fprintf(log_file, "0x%x, ", stream_param[i].mm_params_downmix.input_channel_map[iter_i]);
}
- extract_channel_mapping(stream_param[i].mm_params_downmix.output_channel_map, output_ch_map);
+ extract_channel_mapping((uint16_t *)(stream_param[i].mm_params_downmix.output_channel_map), output_ch_map);
stream_param[i].mm_params_downmix.has_output_channel_map = 1;
fprintf(log_file, "\ndownmix Output channel mapping: ");
for (iter_i = 0; iter_i < stream_param[i].mm_params_downmix.num_output_channels; iter_i++)
@@ -2150,14 +2181,14 @@
get_kvpairs_string(optarg, "O", output_ch_map);
get_kvpairs_string(optarg, "M", mixer_coeff);
- extract_channel_mapping(stream_param[i].mm_params_pan_scale.input_channel_map, input_ch_map);
+ extract_channel_mapping((uint16_t *)(stream_param[i].mm_params_pan_scale.input_channel_map), input_ch_map);
stream_param[i].mm_params_pan_scale.has_input_channel_map = 1;
fprintf(log_file, "\n pan_sclae Input channel mapping: ");
for (iter_i= 0; iter_i < stream_param[i].mm_params_pan_scale.num_input_channels; iter_i++) {
fprintf(log_file, "0x%x, ", stream_param[i].mm_params_pan_scale.input_channel_map[iter_i]);
}
- extract_channel_mapping(stream_param[i].mm_params_pan_scale.output_channel_map, output_ch_map);
+ extract_channel_mapping((uint16_t *)(stream_param[i].mm_params_pan_scale.output_channel_map), output_ch_map);
stream_param[i].mm_params_pan_scale.has_output_channel_map = 1;
fprintf(log_file, "\n pan_scale Output channel mapping: ");
for (iter_i = 0; iter_i < stream_param[i].mm_params_pan_scale.num_output_channels; iter_i++)
@@ -2313,6 +2344,8 @@
}
}
+ fprintf(log_file, "registering qas callback");
+ qahw_register_qas_death_notify_cb((audio_error_callback)qti_audio_server_death_notify_cb, &stream_param);
wakelock_acquired = request_wake_lock(wakelock_acquired, true);
num_of_streams = i+1;
diff --git a/qahw_api/test/qap_wrapper_extn.c b/qahw_api/test/qap_wrapper_extn.c
index d9f27d4..de79ccf 100644
--- a/qahw_api/test/qap_wrapper_extn.c
+++ b/qahw_api/test/qap_wrapper_extn.c
@@ -33,6 +33,7 @@
#include <qap_api.h>
#include <qti_audio.h>
#include "qahw_playback_test.h"
+#include <dolby_ms12.h>
#undef LOG_TAG
#define LOG_TAG "HAL_TEST"
@@ -40,8 +41,12 @@
/*#define LOG_NDEBUG 0*/
#if LINUX_ENABLED
+#if defined(__LP64__)
+#define QAC_LIB_MS12 "/usr/lib64/libdolby_ms12_wrapper.so"
+#else
#define QAC_LIB_MS12 "/usr/lib/libdolby_ms12_wrapper.so"
-#define QAC_LIB_M8 "/usr/lib/libdts_m8_wrapper.so"
+#endif
+#define QAC_LIB_M8 "libdts_m8_wrapper.so"
#else
#define QAC_LIB_MS12 "/system/lib/libdolby_ms12_wrapper.so"
#define QAC_LIB_M8 "/system/lib/libdts_m8_wrapper.so"
@@ -104,7 +109,11 @@
pthread_mutex_t main_eos_lock;
pthread_cond_t sec_eos_cond;
pthread_mutex_t sec_eos_lock;
+bool main_eos_received = false;
+bool sec_eos_received = false;
+dlb_ms12_session_param_t dlb_param;
+dlb_ms12_session_param_t dlb_param_hp;
qap_session_outputs_config_t session_output_config;
bool session_output_configured = false;
struct timeval tcold_start, tcold_stop;
@@ -799,6 +808,7 @@
stream_cnt--;
pthread_mutex_lock(&main_eos_lock);
pthread_cond_signal(&main_eos_cond);
+ main_eos_received = true;
pthread_mutex_unlock(&main_eos_lock);
ALOGE("%s %d Received Main Input EOS ", __func__, __LINE__);
@@ -817,6 +827,7 @@
ALOGV("%s %d Received Secondary Input EOS", __func__, __LINE__);
pthread_mutex_lock(&sec_eos_lock);
pthread_cond_signal(&sec_eos_cond);
+ sec_eos_received = true;
pthread_mutex_unlock(&sec_eos_lock);
}
if (!stream_cnt)
@@ -1171,13 +1182,13 @@
}
}
-static void qap_wrapper_is_dap_enabled(char *kv_pairs, int out_device_id) {
+static void qap_wrapper_is_dap_enabled(char *kv_pairs, int out_device_id, qap_session_handle_t handle) {
int status = 0;
int temp = 0;
char *dap_kvp = NULL;
int *dap_value = NULL;
int dap_enable = 0;
-
+ qap_session_pp_configs_t dap_pp_config;
dap_kvp = qap_wrapper_get_single_kvp("dap_enable", kv_pairs, &status);
if (dap_kvp != NULL) {
dap_value = qap_wrapper_get_int_value_array(dap_kvp, &temp, &status);
@@ -1186,7 +1197,7 @@
if (dap_enable) {
fprintf(stdout, "dap enable %d and device id %d\n", dap_enable, out_device_id);
char *dev_kvp = NULL;
- if (out_device_id == AUDIO_DEVICE_OUT_SPEAKER) {
+ if ((out_device_id & AUDIO_DEVICE_OUT_SPEAKER) == AUDIO_DEVICE_OUT_SPEAKER) {
dev_kvp = (char *) calloc(1, status + strlen("o_device=1; "));
if (dev_kvp != NULL) {
strcat(dev_kvp, "o_device=1;");
@@ -1195,8 +1206,13 @@
free(dev_kvp);
dev_kvp = NULL;
}
- } else if ((out_device_id == AUDIO_DEVICE_OUT_LINE)||
- (out_device_id == AUDIO_DEVICE_OUT_WIRED_HEADPHONE)) {
+ dap_pp_config.pp_config[dap_pp_config.num_confs].id = AUDIO_DEVICE_OUT_SPEAKER;
+ dlb_param = MS12_SESSION_CFG_DAP_ENABLE_SPEAKER;
+ dap_pp_config.pp_config[dap_pp_config.num_confs].pp_type = (void *) &dlb_param;
+ dap_pp_config.num_confs++;
+ }
+ if (((out_device_id & AUDIO_DEVICE_OUT_LINE) == AUDIO_DEVICE_OUT_LINE) ||
+ ((out_device_id & AUDIO_DEVICE_OUT_WIRED_HEADPHONE) == AUDIO_DEVICE_OUT_WIRED_HEADPHONE)) {
dev_kvp = (char *) calloc(1, status + strlen("o_device=2; "));
if (dev_kvp != NULL) {
strcat(dev_kvp, "o_device=2;");
@@ -1205,7 +1221,18 @@
free(dev_kvp);
dev_kvp = NULL;
}
+ if ((out_device_id & AUDIO_DEVICE_OUT_LINE) == AUDIO_DEVICE_OUT_LINE)
+ dap_pp_config.pp_config[dap_pp_config.num_confs].id = AUDIO_DEVICE_OUT_LINE;
+ else
+ dap_pp_config.pp_config[dap_pp_config.num_confs].id = AUDIO_DEVICE_OUT_WIRED_HEADPHONE;
+ dlb_param_hp = MS12_SESSION_CFG_DAP_ENABLE_HEADPHONE;
+ dap_pp_config.pp_config[dap_pp_config.num_confs].pp_type = (void *) &dlb_param_hp;
+ dap_pp_config.num_confs++;
}
+ status = qap_session_cmd(qap_session_handle, QAP_SESSION_CMD_SET_PP_OUTPUTS,
+ sizeof(qap_session_pp_configs_t), &dap_pp_config, NULL, NULL);
+ if (status != QAP_STATUS_OK)
+ fprintf(stderr, "Output config failed\n");
}
free(dap_kvp);
dap_kvp = NULL;
@@ -1289,7 +1316,6 @@
dolby_formats = true;
}
- qap_wrapper_is_dap_enabled(kv_pairs, stream->output_device);
// To-Do - Need to check SPDIF out also when SPDIF out is supported
ALOGD("%s::%d output device %d", __func__, __LINE__, stream->output_device);
@@ -1363,6 +1389,7 @@
fprintf(stderr, "Output config failed\n");
return -EINVAL;
}
+ qap_wrapper_is_dap_enabled(kv_pairs, stream->output_device, qap_session_handle);
bitwidth_kvp = qap_wrapper_get_single_kvp("k", kv_pairs, &status);
if (bitwidth_kvp && strncmp(bitwidth_kvp, "k=", 2) == 0) {
@@ -1560,17 +1587,23 @@
} while (1);
wait_for_eos:
- if (stream_info->sec_input && !stream_info->aac_fmt_type) {
- pthread_mutex_lock(&sec_eos_lock);
- pthread_cond_wait(&sec_eos_cond, &sec_eos_lock);
- pthread_mutex_unlock(&sec_eos_lock);
+ if (stream_info->sec_input) {
+ if (!sec_eos_received) {
+ pthread_mutex_lock(&sec_eos_lock);
+ pthread_cond_wait(&sec_eos_cond, &sec_eos_lock);
+ pthread_mutex_unlock(&sec_eos_lock);
+ }
+ sec_eos_received = false;
fprintf(stdout, "Received EOS event for secondary input\n");
ALOGV("Received EOS event for secondary input\n");
}
if (!(stream_info->system_input || stream_info->sec_input)){
- pthread_mutex_lock(&main_eos_lock);
- pthread_cond_wait(&main_eos_cond, &main_eos_lock);
- pthread_mutex_unlock(&main_eos_lock);
+ if (!main_eos_received) {
+ pthread_mutex_lock(&main_eos_lock);
+ pthread_cond_wait(&main_eos_cond, &main_eos_lock);
+ pthread_mutex_unlock(&main_eos_lock);
+ }
+ main_eos_received = false;
fprintf(stdout, "Received EOS event for main input\n");
ALOGV("Received EOS event for main input\n");
}
diff --git a/visualizer/Android.mk b/visualizer/Android.mk
index e9da7a8..d932ce0 100644
--- a/visualizer/Android.mk
+++ b/visualizer/Android.mk
@@ -21,7 +21,7 @@
LOCAL_CFLAGS+= -O2 -fvisibility=hidden
-ifneq ($(filter sdm660 sdm845 msm8998 apq8098_latv,$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter sdm660 sdm845 msm8998 apq8098_latv sdm670 qcs605,$(TARGET_BOARD_PLATFORM)),)
LOCAL_CFLAGS += -DCAPTURE_DEVICE=7
endif