mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ASoC: msm: qdsp6v2: Add support for HFP on 8994
Hands Free Profile(HFP) uses secondary AUXPCM interface on 8994. Change enables HFP on 8994. Change-Id: I149b3a7aaa4752f9fe2cd600191ecb8f1c8e12a5 Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
This commit is contained in:
parent
b2493d0531
commit
fd69c2bd08
2 changed files with 43 additions and 2 deletions
|
@ -2417,6 +2417,9 @@ static const struct snd_kcontrol_new mmul6_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("AUX_PCM_UL_TX", MSM_BACKEND_DAI_AUXPCM_TX,
|
||||
MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
|
||||
msm_routing_put_audio_mixer),
|
||||
SOC_SINGLE_EXT("SEC_AUX_PCM_UL_TX", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
|
||||
MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
|
||||
msm_routing_put_audio_mixer),
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new mmul8_mixer_controls[] = {
|
||||
|
@ -3181,6 +3184,9 @@ static const struct snd_kcontrol_new sbus_1_rx_port_mixer_controls[] = {
|
|||
SOC_SINGLE_EXT("AUX_PCM_UL_TX", MSM_BACKEND_DAI_SLIMBUS_1_RX,
|
||||
MSM_BACKEND_DAI_AUXPCM_TX, 1, 0, msm_routing_get_port_mixer,
|
||||
msm_routing_put_port_mixer),
|
||||
SOC_SINGLE_EXT("SEC_AUX_PCM_UL_TX", MSM_BACKEND_DAI_SLIMBUS_1_RX,
|
||||
MSM_BACKEND_DAI_SEC_AUXPCM_TX, 1, 0, msm_routing_get_port_mixer,
|
||||
msm_routing_put_port_mixer),
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new sbus_3_rx_port_mixer_controls[] = {
|
||||
|
@ -4281,6 +4287,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"MultiMedia6 Mixer", "TERT_MI2S_TX", "TERT_MI2S_TX"},
|
||||
{"MultiMedia6 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"},
|
||||
{"MultiMedia6 Mixer", "AUX_PCM_UL_TX", "AUX_PCM_TX"},
|
||||
{"MultiMedia6 Mixer", "SEC_AUX_PCM_UL_TX", "SEC_AUX_PCM_TX"},
|
||||
|
||||
{"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
|
||||
{"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
|
||||
|
@ -4393,6 +4400,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia14", "MM_DL14"},
|
||||
{"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia15", "MM_DL15"},
|
||||
{"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia16", "MM_DL16"},
|
||||
{"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia6", "MM_UL6"},
|
||||
{"SEC_AUX_PCM_RX", NULL, "SEC_AUX_PCM_RX Audio Mixer"},
|
||||
|
||||
{"MI2S_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
|
||||
|
@ -4723,8 +4731,6 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
|
||||
{"INT_FM_RX", NULL, "INTFM_DL_HL"},
|
||||
{"INTFM_UL_HL", NULL, "INT_FM_TX"},
|
||||
{"INTHFP_UL_HL", NULL, "INT_BT_SCO_TX"},
|
||||
{"INT_BT_SCO_RX", NULL, "MM_DL6"},
|
||||
{"AUX_PCM_RX", NULL, "AUXPCM_DL_HL"},
|
||||
{"AUXPCM_UL_HL", NULL, "AUX_PCM_TX"},
|
||||
{"MI2S_RX", NULL, "MI2S_DL_HL"},
|
||||
|
|
|
@ -66,6 +66,10 @@ static int msm_route_hfp_vol_control;
|
|||
static const DECLARE_TLV_DB_LINEAR(hfp_rx_vol_gain, 0,
|
||||
INT_RX_VOL_MAX_STEPS);
|
||||
|
||||
static int msm_route_auxpcm_lb_vol_ctrl;
|
||||
static const DECLARE_TLV_DB_LINEAR(auxpcm_lb_vol_gain, 0,
|
||||
INT_RX_VOL_MAX_STEPS);
|
||||
|
||||
static void msm_qti_pp_send_eq_values_(int eq_idx)
|
||||
{
|
||||
int result;
|
||||
|
@ -422,6 +426,26 @@ static int msm_qti_pp_set_hfp_vol_mixer(struct snd_kcontrol *kcontrol,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int msm_qti_pp_get_auxpcm_lb_vol_mixer(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
ucontrol->value.integer.value[0] = msm_route_auxpcm_lb_vol_ctrl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int msm_qti_pp_set_auxpcm_lb_vol_mixer(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct soc_mixer_control *mc =
|
||||
(struct soc_mixer_control *)kcontrol->private_value;
|
||||
|
||||
afe_loopback_gain(mc->reg, ucontrol->value.integer.value[0]);
|
||||
|
||||
msm_route_auxpcm_lb_vol_ctrl = ucontrol->value.integer.value[0];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int msm_qti_pp_get_channel_map_mixer(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
|
@ -462,6 +486,13 @@ static const struct snd_kcontrol_new int_hfp_vol_mixer_controls[] = {
|
|||
msm_qti_pp_set_hfp_vol_mixer, hfp_rx_vol_gain),
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new sec_auxpcm_lb_vol_mixer_controls[] = {
|
||||
SOC_SINGLE_EXT_TLV("SEC AUXPCM LOOPBACK Volume",
|
||||
AFE_PORT_ID_SECONDARY_PCM_TX, 0, INT_RX_VOL_GAIN, 0,
|
||||
msm_qti_pp_get_auxpcm_lb_vol_mixer, msm_qti_pp_set_auxpcm_lb_vol_mixer,
|
||||
auxpcm_lb_vol_gain),
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new multi_ch_channel_map_mixer_controls[] = {
|
||||
SOC_SINGLE_MULTI_EXT("Playback Channel Map", SND_SOC_NOPM, 0, 16,
|
||||
0, 8, msm_qti_pp_get_channel_map_mixer,
|
||||
|
@ -620,6 +651,10 @@ void msm_qti_pp_add_controls(struct snd_soc_platform *platform)
|
|||
snd_soc_add_platform_controls(platform, int_hfp_vol_mixer_controls,
|
||||
ARRAY_SIZE(int_hfp_vol_mixer_controls));
|
||||
|
||||
snd_soc_add_platform_controls(platform,
|
||||
sec_auxpcm_lb_vol_mixer_controls,
|
||||
ARRAY_SIZE(sec_auxpcm_lb_vol_mixer_controls));
|
||||
|
||||
snd_soc_add_platform_controls(platform,
|
||||
multi_ch_channel_map_mixer_controls,
|
||||
ARRAY_SIZE(multi_ch_channel_map_mixer_controls));
|
||||
|
|
Loading…
Reference in a new issue