hal: add support for incall music uplink usecase
Fix issue for incall music uplink not functional. Added
usecase and mixer path changes to support usecase. Note that
DP silence playback and incall music uplink share same pcm device
and cannot be run simultaneously
CRs-Fixed: 2244144
Change-Id: I9c4aadc1e685e6e81d3c325240fdbef53fc1d585
diff --git a/configs/msmnile/audio_platform_info.xml b/configs/msmnile/audio_platform_info.xml
index 5ecec70..1110529 100644
--- a/configs/msmnile/audio_platform_info.xml
+++ b/configs/msmnile/audio_platform_info.xml
@@ -96,6 +96,7 @@
<usecase name="USECASE_AUDIO_PLAYBACK_MMAP" type="out" id="33" />
<usecase name="USECASE_AUDIO_RECORD_MMAP" type="in" id="33" />
<usecase name="USECASE_AUDIO_A2DP_ABR_FEEDBACK" type="in" id="40" />
+ <usecase name="USECASE_INCALL_MUSIC_UPLINK" type="out" id="27" />
</pcm_ids>
<config_params>
<param key="spkr_1_tz_name" value="wsatz.13"/>
diff --git a/configs/msmnile/audio_policy_configuration.xml b/configs/msmnile/audio_policy_configuration.xml
index a86b5da..3d472f5 100644
--- a/configs/msmnile/audio_policy_configuration.xml
+++ b/configs/msmnile/audio_policy_configuration.xml
@@ -170,6 +170,12 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</mixPort>
+ <mixPort name="incall_music_uplink" role="source"
+ flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
<mixPort name="primary input" role="sink" maxOpenCount="2" maxActiveCount="2">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
diff --git a/configs/msmnile/mixer_paths_tavil.xml b/configs/msmnile/mixer_paths_tavil.xml
index 2e0f9c5..f699f73 100755
--- a/configs/msmnile/mixer_paths_tavil.xml
+++ b/configs/msmnile/mixer_paths_tavil.xml
@@ -269,6 +269,7 @@
<!-- Incall Music -->
<ctl name="Incall_Music Audio Mixer MultiMedia2" value="0" />
+ <ctl name="Incall_Music Audio Mixer MultiMedia9" value="0" />
<!-- Incall Music End -->
<!-- compress-voip-call start -->
@@ -2912,4 +2913,76 @@
<ctl name="MultiMedia2 Mixer USB_AUDIO_TX" value="1" />
</path>
+ <path name="incall-music-uplink">
+ <ctl name="Incall_Music Audio Mixer MultiMedia9" value="1" />
+ </path>
+
+ <path name="incall-music-uplink speaker">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink handset">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink handset-hac">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink display-port">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink bt-sco">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink bt-sco-wb">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink speaker-and-display-port">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink afe-proxy">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink usb-headphones">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink usb-headset">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink speaker-and-usb-headphones">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink headphones">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink speaker-and-headphones">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink speaker-and-bt-sco">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink voice-tty-hco-handset">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink speaker-and-bt-a2dp">
+ <path name="incall-music-uplink" />
+ </path>
+
+ <path name="incall-music-uplink bt-a2dp">
+ <path name="incall-music-uplink" />
+ </path>
+
</mixer>
diff --git a/configs/msmnile/msmnile.mk b/configs/msmnile/msmnile.mk
index 533c431..d6655ce 100644
--- a/configs/msmnile/msmnile.mk
+++ b/configs/msmnile/msmnile.mk
@@ -50,7 +50,7 @@
AUDIO_FEATURE_ENABLED_DISPLAY_PORT := true
AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
AUDIO_FEATURE_ENABLED_HFP := true
-AUDIO_FEATURE_ENABLED_INCALL_MUSIC := false
+AUDIO_FEATURE_ENABLED_INCALL_MUSIC := true
AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 6e0a75a..a5c16d6 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -942,6 +942,7 @@
{TO_NAME_INDEX(USECASE_AUDIO_PLAYBACK_AFE_PROXY)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_AFE_PROXY)},
{TO_NAME_INDEX(USECASE_AUDIO_EC_REF_LOOPBACK)},
+ {TO_NAME_INDEX(USECASE_INCALL_MUSIC_UPLINK)},
{TO_NAME_INDEX(USECASE_AUDIO_A2DP_ABR_FEEDBACK)},
{TO_NAME_INDEX(USECASE_AUDIO_PLAYBACK_VOIP)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_VOIP)},
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index aeab831..fa8fa58 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -919,6 +919,7 @@
{TO_NAME_INDEX(USECASE_AUDIO_PLAYBACK_AFE_PROXY)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_AFE_PROXY)},
{TO_NAME_INDEX(USECASE_AUDIO_PLAYBACK_SILENCE)},
+ {TO_NAME_INDEX(USECASE_INCALL_MUSIC_UPLINK)},
{TO_NAME_INDEX(USECASE_AUDIO_A2DP_ABR_FEEDBACK)},
{TO_NAME_INDEX(USECASE_AUDIO_PLAYBACK_VOIP)},
{TO_NAME_INDEX(USECASE_AUDIO_RECORD_VOIP)},