Add incall music to marlin mixer paths and policy
This change adds the paths for marlin and sailfish for the incall music
use case. The path is which is used is incall_music_uplink, which
matches the same path that exists today for some existing mixer path
configurations under the android tree. (e.g. under hardware/qcom/bat).
A new mix port is added for the incall_music usecase which matches the AUDIO_OUTPUT_FLAG_INCALL_MUSIC which will be introduced as part of a different change.
This change was tested together with a set of additional changes to the audio framework and hal which introduces the ability to play pcm audio to the uplink stream.
Bug: 69973354.
Test: Tested Manually.
Change-Id: I5bb0b5ac737d9f3fe1bc28c130722605f7e7243b
diff --git a/audio_platform_info.xml b/audio_platform_info.xml
index 987a9e9..1d8f505 100644
--- a/audio_platform_info.xml
+++ b/audio_platform_info.xml
@@ -88,6 +88,7 @@
<usecase name="USECASE_AUDIO_PLAYBACK_ULL" type="out" id="19" />
<usecase name="USECASE_AUDIO_RECORD_MMAP" type="in" id="18" />
<usecase name="USECASE_AUDIO_PLAYBACK_MMAP" type="out" id="18" />
+ <usecase name="USECASE_INCALL_MUSIC_UPLINK" type="out" id="32" />
</pcm_ids>
</audio_platform_info>
diff --git a/audio_policy_configuration.xml b/audio_policy_configuration.xml
index a823de3..9a652d8 100644
--- a/audio_policy_configuration.xml
+++ b/audio_policy_configuration.xml
@@ -66,6 +66,12 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,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">
<profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
@@ -136,7 +142,7 @@
<route type="mix" sink="BT SCO Car Kit"
sources="primary output,raw,deep_buffer"/>
<route type="mix" sink="Telephony Tx"
- sources="voice_tx"/>
+ sources="voice_tx,incall_music_uplink"/>
<route type="mix" sink="primary input"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/>
<route type="mix" sink="fast input"
diff --git a/mixer_paths.xml b/mixer_paths.xml
index 1433d1d..b0e95a5 100644
--- a/mixer_paths.xml
+++ b/mixer_paths.xml
@@ -371,6 +371,10 @@
<ctl name="MultiMedia8 Mixer VOC_REC_DL" value="0" />
<!-- Incall Recording End -->
+ <!-- Incall Music -->
+ <ctl name="Incall_Music Audio Mixer MultiMedia9" value="0" />
+ <!-- Incall Music End -->
+
<!-- VoWLAN start -->
<ctl name="SLIM_0_RX_Voice Mixer VoWLAN" value="0" />
<ctl name="VoWLAN_Tx Mixer SLIM_0_TX_VoWLAN" value="0" />
@@ -1725,4 +1729,36 @@
<path name="incall-rec-uplink-and-downlink" />
</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 speaker-and-headphones">
+ <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 afe-proxy">
+ <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 speaker-and-bt-sco-wb">
+ <path name="incall-music-uplink" />
+ </path>
+
</mixer>