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

Commit 817af9a7 authored by Laxminath Kasam's avatar Laxminath Kasam
Browse files

ASoC: sdm660_cdc: Fix ear_pa_gain control



In analog codec, EAR PA gain control get
function is updated with input value again
resulting in override. Remove the override
of control value again.

CRs-Fixed: 2161617
Change-Id: I7ddd252adf53666a6c9adc1bc92e840067fa932c
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent 05cae991
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1595,11 +1595,11 @@ static int msm_anlg_cdc_pa_gain_get(struct snd_kcontrol *kcontrol,
		if (ear_pa_gain == 0x00) {
			ucontrol->value.integer.value[0] = 3;
		} else if (ear_pa_gain == 0x01) {
			ucontrol->value.integer.value[1] = 2;
			ucontrol->value.integer.value[0] = 2;
		} else if (ear_pa_gain == 0x02) {
			ucontrol->value.integer.value[2] = 1;
			ucontrol->value.integer.value[0] = 1;
		} else if (ear_pa_gain == 0x03) {
			ucontrol->value.integer.value[3] = 0;
			ucontrol->value.integer.value[0] = 0;
		} else {
			dev_err(codec->dev,
				"%s: ERROR: Unsupported Ear Gain = 0x%x\n",
@@ -1621,7 +1621,6 @@ static int msm_anlg_cdc_pa_gain_get(struct snd_kcontrol *kcontrol,
			return -EINVAL;
		}
	}
	ucontrol->value.integer.value[0] = ear_pa_gain;
	dev_dbg(codec->dev, "%s: ear_pa_gain = 0x%x\n", __func__, ear_pa_gain);
	return 0;
}