Merge "ASoC: msm: add Slimbus7 loopback volume mixer control"
This commit is contained in:
commit
5ff85961b7
2 changed files with 38 additions and 0 deletions
|
@ -11642,11 +11642,14 @@ static const struct snd_soc_dapm_route intercon[] = {
|
||||||
{"SLIMBUS_6_RX", NULL, "SLIMBUS_6_RX Audio Mixer"},
|
{"SLIMBUS_6_RX", NULL, "SLIMBUS_6_RX Audio Mixer"},
|
||||||
|
|
||||||
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
|
||||||
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
|
||||||
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
|
||||||
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
|
||||||
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
|
||||||
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
|
||||||
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
|
||||||
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
|
||||||
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia9", "MM_DL9"},
|
||||||
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia10", "MM_DL10"},
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia10", "MM_DL10"},
|
||||||
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia11", "MM_DL11"},
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia11", "MM_DL11"},
|
||||||
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia12", "MM_DL12"},
|
{"SLIMBUS_7_RX Audio Mixer", "MultiMedia12", "MM_DL12"},
|
||||||
|
|
|
@ -403,6 +403,7 @@ static int msm_afe_lb_vol_ctrl;
|
||||||
static int msm_afe_sec_mi2s_lb_vol_ctrl;
|
static int msm_afe_sec_mi2s_lb_vol_ctrl;
|
||||||
static int msm_afe_tert_mi2s_lb_vol_ctrl;
|
static int msm_afe_tert_mi2s_lb_vol_ctrl;
|
||||||
static int msm_afe_quat_mi2s_lb_vol_ctrl;
|
static int msm_afe_quat_mi2s_lb_vol_ctrl;
|
||||||
|
static int msm_afe_slimbus_7_lb_vol_ctrl;
|
||||||
static int msm_afe_slimbus_8_lb_vol_ctrl;
|
static int msm_afe_slimbus_8_lb_vol_ctrl;
|
||||||
static const DECLARE_TLV_DB_LINEAR(fm_rx_vol_gain, 0, INT_RX_VOL_MAX_STEPS);
|
static const DECLARE_TLV_DB_LINEAR(fm_rx_vol_gain, 0, INT_RX_VOL_MAX_STEPS);
|
||||||
static const DECLARE_TLV_DB_LINEAR(afe_lb_vol_gain, 0, INT_RX_VOL_MAX_STEPS);
|
static const DECLARE_TLV_DB_LINEAR(afe_lb_vol_gain, 0, INT_RX_VOL_MAX_STEPS);
|
||||||
|
@ -475,6 +476,29 @@ static int msm_qti_pp_set_tert_mi2s_lb_vol_mixer(struct snd_kcontrol *kcontrol,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int msm_qti_pp_get_slimbus_7_lb_vol_mixer(struct snd_kcontrol *kcontrol,
|
||||||
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
|
{
|
||||||
|
ucontrol->value.integer.value[0] = msm_afe_slimbus_7_lb_vol_ctrl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int msm_qti_pp_set_slimbus_7_lb_vol_mixer(struct snd_kcontrol *kcontrol,
|
||||||
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
|
{
|
||||||
|
int ret = afe_loopback_gain(SLIMBUS_7_TX,
|
||||||
|
ucontrol->value.integer.value[0]);
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
pr_err("%s: failed to set LB vol for SLIMBUS_7_TX, err %d\n",
|
||||||
|
__func__, ret);
|
||||||
|
else
|
||||||
|
msm_afe_slimbus_7_lb_vol_ctrl =
|
||||||
|
ucontrol->value.integer.value[0];
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static int msm_qti_pp_get_slimbus_8_lb_vol_mixer(struct snd_kcontrol *kcontrol,
|
static int msm_qti_pp_get_slimbus_8_lb_vol_mixer(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_ctl_elem_value *ucontrol)
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
{
|
{
|
||||||
|
@ -857,6 +881,14 @@ static const struct snd_kcontrol_new tert_mi2s_lb_vol_mixer_controls[] = {
|
||||||
msm_qti_pp_set_tert_mi2s_lb_vol_mixer, afe_lb_vol_gain),
|
msm_qti_pp_set_tert_mi2s_lb_vol_mixer, afe_lb_vol_gain),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct snd_kcontrol_new slimbus_7_lb_vol_mixer_controls[] = {
|
||||||
|
SOC_SINGLE_EXT_TLV("SLIMBUS_7 LOOPBACK Volume", SND_SOC_NOPM, 0,
|
||||||
|
INT_RX_VOL_GAIN, 0,
|
||||||
|
msm_qti_pp_get_slimbus_7_lb_vol_mixer,
|
||||||
|
msm_qti_pp_set_slimbus_7_lb_vol_mixer,
|
||||||
|
afe_lb_vol_gain),
|
||||||
|
};
|
||||||
|
|
||||||
static const struct snd_kcontrol_new slimbus_8_lb_vol_mixer_controls[] = {
|
static const struct snd_kcontrol_new slimbus_8_lb_vol_mixer_controls[] = {
|
||||||
SOC_SINGLE_EXT_TLV("SLIMBUS_8 LOOPBACK Volume", SND_SOC_NOPM, 0,
|
SOC_SINGLE_EXT_TLV("SLIMBUS_8 LOOPBACK Volume", SND_SOC_NOPM, 0,
|
||||||
INT_RX_VOL_GAIN, 0, msm_qti_pp_get_slimbus_8_lb_vol_mixer,
|
INT_RX_VOL_GAIN, 0, msm_qti_pp_get_slimbus_8_lb_vol_mixer,
|
||||||
|
@ -1061,6 +1093,9 @@ void msm_qti_pp_add_controls(struct snd_soc_platform *platform)
|
||||||
snd_soc_add_platform_controls(platform, tert_mi2s_lb_vol_mixer_controls,
|
snd_soc_add_platform_controls(platform, tert_mi2s_lb_vol_mixer_controls,
|
||||||
ARRAY_SIZE(tert_mi2s_lb_vol_mixer_controls));
|
ARRAY_SIZE(tert_mi2s_lb_vol_mixer_controls));
|
||||||
|
|
||||||
|
snd_soc_add_platform_controls(platform, slimbus_7_lb_vol_mixer_controls,
|
||||||
|
ARRAY_SIZE(slimbus_7_lb_vol_mixer_controls));
|
||||||
|
|
||||||
snd_soc_add_platform_controls(platform, slimbus_8_lb_vol_mixer_controls,
|
snd_soc_add_platform_controls(platform, slimbus_8_lb_vol_mixer_controls,
|
||||||
ARRAY_SIZE(slimbus_8_lb_vol_mixer_controls));
|
ARRAY_SIZE(slimbus_8_lb_vol_mixer_controls));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue