Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -bur -x .git msm8996-O/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c msm8996-O2/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c
- --- msm8996-O/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c 2017-11-23 04:30:52.273658118 -0600
- +++ msm8996-O2/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c 2017-11-23 04:25:03.391528272 -0600
- @@ -572,6 +572,28 @@
- return 0;
- }
- +static int msm_afe_lb_vol_ctrl_mmi;
- +static const DECLARE_TLV_DB_LINEAR(afe_lb_vol_gain_mmi, 0, INT_RX_VOL_MAX_STEPS);
- +
- +static int msm_qti_pp_get_slimbus_0_tx_lb_vol_mixer(struct snd_kcontrol *kcontrol,
- + struct snd_ctl_elem_value *ucontrol)
- +{
- + ucontrol->value.integer.value[0] = msm_afe_lb_vol_ctrl_mmi;
- + return 0;
- +}
- +
- +static int msm_qti_pp_set_slimbus_0_tx_lb_vol_mixer(struct snd_kcontrol *kcontrol,
- + struct snd_ctl_elem_value *ucontrol)
- +{
- + afe_loopback_gain(SLIMBUS_0_TX,
- + ucontrol->value.integer.value[0]);
- + pr_info("%s: mmi vol %ld\n", __func__, ucontrol->value.integer.value[0]);
- +
- + msm_afe_lb_vol_ctrl_mmi = 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)
- {
- @@ -856,6 +878,12 @@
- sec_auxpcm_lb_vol_gain),
- };
- +static const struct snd_kcontrol_new int_mmi_vol_mixer_controls[] = {
- + SOC_SINGLE_EXT_TLV("SLIMBUS LOOPBACK Volume", SND_SOC_NOPM, 0,
- + INT_RX_VOL_GAIN, 0, msm_qti_pp_get_slimbus_0_tx_lb_vol_mixer,
- + msm_qti_pp_set_slimbus_0_tx_lb_vol_mixer, afe_lb_vol_gain_mmi),
- +};
- +
- static const struct snd_kcontrol_new multi_ch_channel_map_mixer_controls[] = {
- SOC_SINGLE_MULTI_EXT("Playback Device Channel Map", SND_SOC_NOPM, 0, 16,
- 0, 8, msm_qti_pp_get_channel_map_mixer,
- @@ -1060,4 +1088,7 @@
- snd_soc_add_platform_controls(platform, msm_multichannel_ec_controls,
- ARRAY_SIZE(msm_multichannel_ec_controls));
- +
- + snd_soc_add_platform_controls(platform, int_mmi_vol_mixer_controls,
- + ARRAY_SIZE(int_mmi_vol_mixer_controls));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement