mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
ASoC: msm: qdsp6v2: Add support for VoWLAN
Add a front-end DAI for VoWLAN voice session, update routing driver to add support for voice over WLAN. Change-Id: I4f56e12d619ebb40a8668da107a0d386158a060d Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
This commit is contained in:
parent
7198e5fbd2
commit
e44e04e91c
7 changed files with 177 additions and 8 deletions
|
@ -986,6 +986,30 @@ static struct snd_soc_dai_driver msm_fe_dais[] = {
|
|||
.name = "LSM8",
|
||||
.probe = fe_dai_probe,
|
||||
},
|
||||
{
|
||||
.playback = {
|
||||
.stream_name = "VoWLAN Playback",
|
||||
.aif_name = "VoWLAN_DL",
|
||||
.rates = SNDRV_PCM_RATE_8000_48000,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
||||
.channels_min = 1,
|
||||
.channels_max = 2,
|
||||
.rate_min = 8000,
|
||||
.rate_max = 48000,
|
||||
},
|
||||
.capture = {
|
||||
.stream_name = "VoWLAN Capture",
|
||||
.aif_name = "VoWLAN_UL",
|
||||
.rates = SNDRV_PCM_RATE_8000_48000,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
||||
.channels_min = 1,
|
||||
.channels_max = 2,
|
||||
.rate_min = 8000,
|
||||
.rate_max = 48000,
|
||||
},
|
||||
.ops = &msm_fe_dai_ops,
|
||||
.name = "VoWLAN",
|
||||
},
|
||||
};
|
||||
|
||||
static int msm_fe_dai_dev_probe(struct platform_device *pdev)
|
||||
|
|
|
@ -662,6 +662,8 @@ static void msm_pcm_routing_process_voice(u16 reg, u16 val, int set)
|
|||
session_id = voc_get_session_id(VOICE_SESSION_NAME);
|
||||
else if (val == MSM_FRONTEND_DAI_VOLTE)
|
||||
session_id = voc_get_session_id(VOLTE_SESSION_NAME);
|
||||
else if (val == MSM_FRONTEND_DAI_VOWLAN)
|
||||
session_id = voc_get_session_id(VOWLAN_SESSION_NAME);
|
||||
else if (val == MSM_FRONTEND_DAI_VOICE2)
|
||||
session_id = voc_get_session_id(VOICE2_SESSION_NAME);
|
||||
else if (val == MSM_FRONTEND_DAI_QCHAT)
|
||||
|
@ -1826,6 +1828,9 @@ static const struct snd_kcontrol_new pri_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_PRI_I2S_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_PRI_I2S_RX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_PRI_I2S_RX,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -1847,6 +1852,9 @@ static const struct snd_kcontrol_new sec_i2s_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_SEC_I2S_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_SEC_I2S_RX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_SEC_I2S_RX,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -1868,6 +1876,9 @@ static const struct snd_kcontrol_new sec_mi2s_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -1898,6 +1909,9 @@ static const struct snd_kcontrol_new slimbus_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE Stub", MSM_BACKEND_DAI_SLIMBUS_0_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
|
||||
msm_routing_put_voice_stub_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_SLIMBUS_0_RX ,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_SLIMBUS_0_RX ,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -1922,6 +1936,9 @@ static const struct snd_kcontrol_new bt_sco_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_INT_BT_SCO_RX ,
|
||||
MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_INT_BT_SCO_RX ,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_INT_BT_SCO_RX ,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -1946,6 +1963,9 @@ static const struct snd_kcontrol_new mi2s_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -1973,6 +1993,9 @@ static const struct snd_kcontrol_new pri_mi2s_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_PRI_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_PRI_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_PRI_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -1997,6 +2020,9 @@ static const struct snd_kcontrol_new quat_mi2s_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -2027,6 +2053,9 @@ static const struct snd_kcontrol_new afe_pcm_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE Stub", MSM_BACKEND_DAI_AFE_PCM_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
|
||||
msm_routing_put_voice_stub_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_AFE_PCM_RX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_AFE_PCM_RX,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -2057,6 +2086,9 @@ static const struct snd_kcontrol_new aux_pcm_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE Stub", MSM_BACKEND_DAI_AUXPCM_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
|
||||
msm_routing_put_voice_stub_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_AUXPCM_RX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_AUXPCM_RX,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -2078,6 +2110,9 @@ static const struct snd_kcontrol_new sec_aux_pcm_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
|
||||
MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
|
@ -2099,6 +2134,9 @@ static const struct snd_kcontrol_new hdmi_rx_voice_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_HDMI_RX,
|
||||
MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_HDMI_RX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_HDMI_RX,
|
||||
MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
|
||||
msm_routing_put_voice_stub_mixer),
|
||||
|
@ -2230,6 +2268,33 @@ static const struct snd_kcontrol_new tx_volte_mixer_controls[] = {
|
|||
msm_routing_put_voice_mixer),
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new tx_vowlan_mixer_controls[] = {
|
||||
SOC_SINGLE_EXT("PRI_TX_VoWLAN", MSM_BACKEND_DAI_PRI_I2S_TX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("SLIM_0_TX_VoWLAN", MSM_BACKEND_DAI_SLIMBUS_0_TX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX_VoWLAN",
|
||||
MSM_BACKEND_DAI_INT_BT_SCO_TX, MSM_FRONTEND_DAI_VOWLAN, 1, 0,
|
||||
msm_routing_get_voice_mixer, msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("AFE_PCM_TX_VoWLAN", MSM_BACKEND_DAI_AFE_PCM_TX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("AUX_PCM_TX_VoWLAN", MSM_BACKEND_DAI_AUXPCM_TX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("SEC_AUX_PCM_TX_VoWLAN", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("MI2S_TX_VoWLAN", MSM_BACKEND_DAI_MI2S_TX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
SOC_SINGLE_EXT("PRI_MI2S_TX_VoWLAN", MSM_BACKEND_DAI_PRI_MI2S_TX,
|
||||
MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
|
||||
msm_routing_put_voice_mixer),
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new tx_voip_mixer_controls[] = {
|
||||
SOC_SINGLE_EXT("PRI_TX_Voip", MSM_BACKEND_DAI_PRI_I2S_TX,
|
||||
MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
|
||||
|
@ -2842,6 +2907,8 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
|
|||
SND_SOC_DAPM_AIF_OUT("VOICE2_UL", "Voice2 Capture", 0, 0, 0, 0),
|
||||
SND_SOC_DAPM_AIF_IN("VoLTE_DL", "VoLTE Playback", 0, 0, 0, 0),
|
||||
SND_SOC_DAPM_AIF_OUT("VoLTE_UL", "VoLTE Capture", 0, 0, 0, 0),
|
||||
SND_SOC_DAPM_AIF_IN("VoWLAN_DL", "VoWLAN Playback", 0, 0, 0, 0),
|
||||
SND_SOC_DAPM_AIF_OUT("VoWLAN_UL", "VoWLAN Capture", 0, 0, 0, 0),
|
||||
SND_SOC_DAPM_AIF_OUT("VOIP_UL", "VoIP Capture", 0, 0, 0, 0),
|
||||
SND_SOC_DAPM_AIF_IN("SLIM0_DL_HL", "SLIMBUS0_HOSTLESS Playback",
|
||||
0, 0, 0, 0),
|
||||
|
@ -3140,6 +3207,9 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
|
|||
SND_SOC_DAPM_MIXER("VoLTE_Tx Mixer",
|
||||
SND_SOC_NOPM, 0, 0, tx_volte_mixer_controls,
|
||||
ARRAY_SIZE(tx_volte_mixer_controls)),
|
||||
SND_SOC_DAPM_MIXER("VoWLAN_Tx Mixer",
|
||||
SND_SOC_NOPM, 0, 0, tx_vowlan_mixer_controls,
|
||||
ARRAY_SIZE(tx_vowlan_mixer_controls)),
|
||||
SND_SOC_DAPM_MIXER("INTERNAL_BT_SCO_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
|
||||
int_bt_sco_rx_mixer_controls, ARRAY_SIZE(int_bt_sco_rx_mixer_controls)),
|
||||
SND_SOC_DAPM_MIXER("INTERNAL_FM_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
|
||||
|
@ -3448,6 +3518,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"PRI_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
|
||||
{"PRI_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"PRI_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"PRI_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"PRI_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"PRI_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
|
||||
{"PRI_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
|
||||
|
@ -3456,6 +3527,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"SEC_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
|
||||
{"SEC_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"SEC_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"SEC_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"SEC_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"SEC_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
|
||||
{"SEC_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
|
||||
|
@ -3464,6 +3536,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"SEC_MI2S_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
|
||||
{"SEC_MI2S_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"SEC_MI2S_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"SEC_MI2S_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"SEC_MI2S_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"SEC_MI2S_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
|
||||
{"SEC_MI2S_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
|
||||
|
@ -3472,6 +3545,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"SLIM_0_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
|
||||
{"SLIM_0_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"SLIM_0_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"SLIM_0_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"SLIM_0_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"SLIM_0_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
|
||||
{"SLIM_0_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
|
||||
|
@ -3483,6 +3557,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"INTERNAL_BT_SCO_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
|
||||
{"INTERNAL_BT_SCO_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"INTERNAL_BT_SCO_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"INTERNAL_BT_SCO_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"INTERNAL_BT_SCO_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"INTERNAL_BT_SCO_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
|
||||
{"INTERNAL_BT_SCO_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
|
||||
|
@ -3491,6 +3566,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"AFE_PCM_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
|
||||
{"AFE_PCM_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"AFE_PCM_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"AFE_PCM_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"AFE_PCM_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"AFE_PCM_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
|
||||
{"AFE_PCM_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
|
||||
|
@ -3499,6 +3575,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"AUX_PCM_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
|
||||
{"AUX_PCM_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"AUX_PCM_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"AUX_PCM_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"AUX_PCM_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"AUX_PCM_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
|
||||
{"AUX_PCM_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
|
||||
|
@ -3509,6 +3586,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
|
||||
{"SEC_AUX_PCM_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
|
||||
{"SEC_AUX_PCM_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"SEC_AUX_PCM_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"SEC_AUX_PCM_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"SEC_AUX_PCM_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
|
||||
{"SEC_AUX_PCM_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
|
||||
|
@ -3518,6 +3596,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"HDMI_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
|
||||
{"HDMI_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"HDMI_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"HDMI_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"HDMI_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"HDMI_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
|
||||
{"HDMI_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
|
||||
|
@ -3528,6 +3607,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"MI2S_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"MI2S_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"MI2S_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"MI2S_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"MI2S_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
|
||||
{"MI2S_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
|
||||
{"MI2S_RX", NULL, "MI2S_RX_Voice Mixer"},
|
||||
|
@ -3536,6 +3616,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"PRI_MI2S_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"PRI_MI2S_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"PRI_MI2S_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"PRI_MI2S_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"PRI_MI2S_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
|
||||
{"PRI_MI2S_RX_Voice Mixer", "Voice2 Stub", "VOICE2_STUB_DL"},
|
||||
{"PRI_MI2S_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
|
||||
|
@ -3545,6 +3626,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"QUAT_MI2S_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
|
||||
{"QUAT_MI2S_RX_Voice Mixer", "Voip", "VOIP_DL"},
|
||||
{"QUAT_MI2S_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
|
||||
{"QUAT_MI2S_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
|
||||
{"QUAT_MI2S_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
|
||||
{"QUAT_MI2S_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
|
||||
{"QUAT_MI2S_RX", NULL, "QUAT_MI2S_RX_Voice Mixer"},
|
||||
|
@ -3583,6 +3665,17 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"VoLTE_Tx Mixer", "MI2S_TX_VoLTE", "MI2S_TX"},
|
||||
{"VoLTE_Tx Mixer", "PRI_MI2S_TX_VoLTE", "PRI_MI2S_TX"},
|
||||
{"VoLTE_UL", NULL, "VoLTE_Tx Mixer"},
|
||||
|
||||
{"VoWLAN_Tx Mixer", "PRI_TX_VoWLAN", "PRI_I2S_TX"},
|
||||
{"VoWLAN_Tx Mixer", "SLIM_0_TX_VoWLAN", "SLIMBUS_0_TX"},
|
||||
{"VoWLAN_Tx Mixer", "INTERNAL_BT_SCO_TX_VoWLAN", "INT_BT_SCO_TX"},
|
||||
{"VoWLAN_Tx Mixer", "AFE_PCM_TX_VoWLAN", "PCM_TX"},
|
||||
{"VoWLAN_Tx Mixer", "AUX_PCM_TX_VoWLAN", "AUX_PCM_TX"},
|
||||
{"VoWLAN_Tx Mixer", "SEC_AUX_PCM_TX_VoWLAN", "SEC_AUX_PCM_TX"},
|
||||
{"VoWLAN_Tx Mixer", "MI2S_TX_VoWLAN", "MI2S_TX"},
|
||||
{"VoWLAN_Tx Mixer", "PRI_MI2S_TX_VoWLAN", "PRI_MI2S_TX"},
|
||||
{"VoWLAN_UL", NULL, "VoWLAN_Tx Mixer"},
|
||||
|
||||
{"Voip_Tx Mixer", "PRI_TX_Voip", "PRI_I2S_TX"},
|
||||
{"Voip_Tx Mixer", "MI2S_TX_Voip", "MI2S_TX"},
|
||||
{"Voip_Tx Mixer", "SLIM_0_TX_Voip", "SLIMBUS_0_TX"},
|
||||
|
|
|
@ -95,6 +95,7 @@ enum {
|
|||
MSM_FRONTEND_DAI_LSM7,
|
||||
MSM_FRONTEND_DAI_LSM8,
|
||||
MSM_FRONTEND_DAI_VOICE2_STUB,
|
||||
MSM_FRONTEND_DAI_VOWLAN,
|
||||
MSM_FRONTEND_DAI_MAX,
|
||||
};
|
||||
|
||||
|
|
|
@ -75,6 +75,14 @@ static bool is_qchat(struct msm_voice *pqchat)
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool is_vowlan(struct msm_voice *pvowlan)
|
||||
{
|
||||
if (pvowlan == &voice_info[VOWLAN_SESSION_INDEX])
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
static uint32_t get_session_id(struct msm_voice *pvoc)
|
||||
{
|
||||
uint32_t session_id = 0;
|
||||
|
@ -85,6 +93,8 @@ static uint32_t get_session_id(struct msm_voice *pvoc)
|
|||
session_id = voc_get_session_id(VOICE2_SESSION_NAME);
|
||||
else if (is_qchat(pvoc))
|
||||
session_id = voc_get_session_id(QCHAT_SESSION_NAME);
|
||||
else if (is_vowlan(pvoc))
|
||||
session_id = voc_get_session_id(VOWLAN_SESSION_NAME);
|
||||
else
|
||||
session_id = voc_get_session_id(VOICE_SESSION_NAME);
|
||||
|
||||
|
@ -134,6 +144,10 @@ static int msm_pcm_open(struct snd_pcm_substream *substream)
|
|||
voice = &voice_info[QCHAT_SESSION_INDEX];
|
||||
pr_debug("%s: Open QCHAT Substream Id=%s\n",
|
||||
__func__, substream->pcm->id);
|
||||
} else if (!strncmp("VoWLAN", substream->pcm->id, 6)) {
|
||||
voice = &voice_info[VOWLAN_SESSION_INDEX];
|
||||
pr_debug("%s: Open VoWLAN Substream Id=%s\n",
|
||||
__func__, substream->pcm->id);
|
||||
} else {
|
||||
voice = &voice_info[VOICE_SESSION_INDEX];
|
||||
pr_debug("%s: Open VOICE Substream Id=%s\n",
|
||||
|
@ -448,6 +462,7 @@ static int msm_voice_tty_mode_put(struct snd_kcontrol *kcontrol,
|
|||
voc_set_tty_mode(voc_get_session_id(VOICE_SESSION_NAME), tty_mode);
|
||||
voc_set_tty_mode(voc_get_session_id(VOICE2_SESSION_NAME), tty_mode);
|
||||
voc_set_tty_mode(voc_get_session_id(VOLTE_SESSION_NAME), tty_mode);
|
||||
voc_set_tty_mode(voc_get_session_id(VOWLAN_SESSION_NAME), tty_mode);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -18,6 +18,7 @@ enum {
|
|||
VOLTE_SESSION_INDEX,
|
||||
VOICE2_SESSION_INDEX,
|
||||
QCHAT_SESSION_INDEX,
|
||||
VOWLAN_SESSION_INDEX,
|
||||
VOICE_SESSION_INDEX_MAX,
|
||||
};
|
||||
|
||||
|
|
|
@ -141,6 +141,7 @@ static bool voice_is_valid_session_id(uint32_t session_id)
|
|||
case VOLTE_SESSION_VSID:
|
||||
case VOIP_SESSION_VSID:
|
||||
case QCHAT_SESSION_VSID:
|
||||
case VOWLAN_SESSION_VSID:
|
||||
case ALL_SESSION_VSID:
|
||||
ret = true;
|
||||
break;
|
||||
|
@ -234,6 +235,9 @@ char *voc_get_session_name(u32 session_id)
|
|||
} else if (session_id ==
|
||||
common.voice[VOC_PATH_QCHAT_PASSIVE].session_id) {
|
||||
session_name = QCHAT_SESSION_NAME;
|
||||
} else if (session_id ==
|
||||
common.voice[VOC_PATH_VOWLAN_PASSIVE].session_id) {
|
||||
session_name = VOWLAN_SESSION_NAME;
|
||||
} else if (session_id == common.voice[VOC_PATH_FULL].session_id) {
|
||||
session_name = VOIP_SESSION_NAME;
|
||||
}
|
||||
|
@ -256,6 +260,9 @@ uint32_t voc_get_session_id(char *name)
|
|||
else if (!strncmp(name, "QCHAT session", 13))
|
||||
session_id =
|
||||
common.voice[VOC_PATH_QCHAT_PASSIVE].session_id;
|
||||
else if (!strncmp(name, "VoWLAN session", 14))
|
||||
session_id =
|
||||
common.voice[VOC_PATH_VOWLAN_PASSIVE].session_id;
|
||||
else
|
||||
session_id = common.voice[VOC_PATH_FULL].session_id;
|
||||
|
||||
|
@ -291,6 +298,10 @@ static struct voice_data *voice_get_session(u32 session_id)
|
|||
v = &common.voice[VOC_PATH_QCHAT_PASSIVE];
|
||||
break;
|
||||
|
||||
case VOWLAN_SESSION_VSID:
|
||||
v = &common.voice[VOC_PATH_VOWLAN_PASSIVE];
|
||||
break;
|
||||
|
||||
case ALL_SESSION_VSID:
|
||||
break;
|
||||
|
||||
|
@ -331,6 +342,10 @@ int voice_get_idx_for_session(u32 session_id)
|
|||
idx = VOC_PATH_QCHAT_PASSIVE;
|
||||
break;
|
||||
|
||||
case VOWLAN_SESSION_VSID:
|
||||
idx = VOC_PATH_VOWLAN_PASSIVE;
|
||||
break;
|
||||
|
||||
case ALL_SESSION_VSID:
|
||||
idx = MAX_VOC_SESSIONS - 1;
|
||||
break;
|
||||
|
@ -375,6 +390,11 @@ static bool is_qchat_session(u32 session_id)
|
|||
return (session_id == common.voice[VOC_PATH_QCHAT_PASSIVE].session_id);
|
||||
}
|
||||
|
||||
static bool is_vowlan_session(u32 session_id)
|
||||
{
|
||||
return (session_id == common.voice[VOC_PATH_VOWLAN_PASSIVE].session_id);
|
||||
}
|
||||
|
||||
static bool is_voc_state_active(int voc_state)
|
||||
{
|
||||
if ((voc_state == VOC_RUN) ||
|
||||
|
@ -433,6 +453,7 @@ static void init_session_id(void)
|
|||
common.voice[VOC_PATH_VOICE2_PASSIVE].session_id = VOICE2_SESSION_VSID;
|
||||
common.voice[VOC_PATH_FULL].session_id = VOIP_SESSION_VSID;
|
||||
common.voice[VOC_PATH_QCHAT_PASSIVE].session_id = QCHAT_SESSION_VSID;
|
||||
common.voice[VOC_PATH_VOWLAN_PASSIVE].session_id = VOWLAN_SESSION_VSID;
|
||||
}
|
||||
|
||||
static int voice_apr_register(uint32_t session_id)
|
||||
|
@ -668,6 +689,10 @@ static int voice_create_mvm_cvs_session(struct voice_data *v)
|
|||
strlcpy(mvm_session_cmd.mvm_session.name,
|
||||
QCHAT_SESSION_VSID_STR,
|
||||
sizeof(mvm_session_cmd.mvm_session.name));
|
||||
} else if (is_vowlan_session(v->session_id)) {
|
||||
strlcpy(mvm_session_cmd.mvm_session.name,
|
||||
VOWLAN_SESSION_VSID_STR,
|
||||
sizeof(mvm_session_cmd.mvm_session.name));
|
||||
} else {
|
||||
strlcpy(mvm_session_cmd.mvm_session.name,
|
||||
"default modem voice",
|
||||
|
@ -760,6 +785,10 @@ static int voice_create_mvm_cvs_session(struct voice_data *v)
|
|||
strlcpy(cvs_session_cmd.cvs_session.name,
|
||||
QCHAT_SESSION_VSID_STR,
|
||||
sizeof(cvs_session_cmd.cvs_session.name));
|
||||
} else if (is_vowlan_session(v->session_id)) {
|
||||
strlcpy(cvs_session_cmd.cvs_session.name,
|
||||
VOWLAN_SESSION_VSID_STR,
|
||||
sizeof(cvs_session_cmd.cvs_session.name));
|
||||
} else {
|
||||
strlcpy(cvs_session_cmd.cvs_session.name,
|
||||
"default modem voice",
|
||||
|
@ -951,6 +980,7 @@ static int voice_destroy_mvm_cvs_session(struct voice_data *v)
|
|||
if (is_voip_session(v->session_id) ||
|
||||
is_qchat_session(v->session_id) ||
|
||||
is_volte_session(v->session_id) ||
|
||||
is_vowlan_session(v->session_id) ||
|
||||
v->voc_state == VOC_ERROR) {
|
||||
/* Destroy CVS. */
|
||||
pr_debug("%s: CVS destroy session\n", __func__);
|
||||
|
@ -4634,7 +4664,8 @@ int voc_set_pp_enable(uint32_t session_id, uint32_t module_id, uint32_t enable)
|
|||
while (voice_itr_get_next_session(&itr, &v)) {
|
||||
if (v != NULL) {
|
||||
if (!(is_voice_app_id(v->session_id) ||
|
||||
is_volte_session(v->session_id)))
|
||||
is_volte_session(v->session_id) ||
|
||||
is_vowlan_session(v->session_id)))
|
||||
continue;
|
||||
|
||||
mutex_lock(&v->lock);
|
||||
|
|
|
@ -1433,7 +1433,7 @@ struct cal_mem {
|
|||
void *buf;
|
||||
};
|
||||
|
||||
#define MAX_VOC_SESSIONS 5
|
||||
#define MAX_VOC_SESSIONS 6
|
||||
|
||||
struct common_data {
|
||||
/* these default values are for all devices */
|
||||
|
@ -1511,21 +1511,25 @@ enum {
|
|||
#define VOC_PATH_VOLTE_PASSIVE 2
|
||||
#define VOC_PATH_VOICE2_PASSIVE 3
|
||||
#define VOC_PATH_QCHAT_PASSIVE 4
|
||||
#define VOC_PATH_VOWLAN_PASSIVE 5
|
||||
|
||||
#define MAX_SESSION_NAME_LEN 32
|
||||
#define VOICE_SESSION_NAME "Voice session"
|
||||
#define VOIP_SESSION_NAME "VoIP session"
|
||||
#define VOLTE_SESSION_NAME "VoLTE session"
|
||||
#define VOICE2_SESSION_NAME "Voice2 session"
|
||||
#define QCHAT_SESSION_NAME "QCHAT session"
|
||||
#define VOICE_SESSION_NAME "Voice session"
|
||||
#define VOIP_SESSION_NAME "VoIP session"
|
||||
#define VOLTE_SESSION_NAME "VoLTE session"
|
||||
#define VOICE2_SESSION_NAME "Voice2 session"
|
||||
#define QCHAT_SESSION_NAME "QCHAT session"
|
||||
#define VOWLAN_SESSION_NAME "VoWLAN session"
|
||||
|
||||
#define VOICE2_SESSION_VSID_STR "10DC1000"
|
||||
#define QCHAT_SESSION_VSID_STR "10803000"
|
||||
#define VOWLAN_SESSION_VSID_STR "10002000"
|
||||
#define VOICE_SESSION_VSID 0x10C01000
|
||||
#define VOICE2_SESSION_VSID 0x10DC1000
|
||||
#define VOLTE_SESSION_VSID 0x10C02000
|
||||
#define VOIP_SESSION_VSID 0x10004000
|
||||
#define QCHAT_SESSION_VSID 0x10803000
|
||||
#define VOWLAN_SESSION_VSID 0x10002000
|
||||
#define ALL_SESSION_VSID 0xFFFFFFFF
|
||||
#define VSID_MAX ALL_SESSION_VSID
|
||||
|
||||
|
|
Loading…
Reference in a new issue