Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6772cfc6 authored by Laxminath Kasam's avatar Laxminath Kasam Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: wcd: Update of IIR Gain value



IIR Gain has been set after IIR mux setting to make sure the
gain has been properly applied on to the path. This is needed
to set the sidetone gain during voice call.

Change-Id: I26bb057a65e29ea69b437d9f89674b5a3f35235e
CRs-Fixed: 600014
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent b5c75c4d
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -4281,6 +4281,23 @@ static int tapan_codec_ear_dac_event(struct snd_soc_dapm_widget *w,
	return 0;
}

static int tapan_codec_iir_mux_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{
	struct snd_soc_codec *codec = w->codec;
	pr_debug("%s: event = %d\n", __func__, event);

	switch (event) {
	case SND_SOC_DAPM_POST_PMU:
		snd_soc_write(codec, w->reg, snd_soc_read(codec, w->reg));
		break;
	case SND_SOC_DAPM_POST_PMD:
		snd_soc_write(codec, w->reg, snd_soc_read(codec, w->reg));
		break;
	}
	return 0;
}

static int tapan_codec_dsm_mux_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{
@@ -4768,7 +4785,10 @@ static const struct snd_soc_dapm_widget tapan_common_dapm_widgets[] = {
		SND_SOC_DAPM_POST_PMD),

	/* Sidetone */
	SND_SOC_DAPM_MUX("IIR1 INP1 MUX", SND_SOC_NOPM, 0, 0, &iir1_inp1_mux),
	SND_SOC_DAPM_MUX_E("IIR1 INP1 MUX", TAPAN_A_CDC_IIR1_GAIN_B1_CTL, 0, 0,
		&iir1_inp1_mux, tapan_codec_iir_mux_event,
		SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),

	SND_SOC_DAPM_PGA("IIR1", TAPAN_A_CDC_CLK_SD_CTL, 0, 0, NULL, 0),

	/* AUX PGA */