summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaxminath Kasam <lkasam@codeaurora.org>2017-12-19 14:58:58 +0530
committerAvinash Chandra <avicha@codeaurora.org>2020-11-02 14:04:23 +0530
commitb18a62c574dbdcd145e6ead2fdad481301ab2429 (patch)
treed4d47ad69d440de6bae7b5d6713ddf7e4d19a485
parentab3a4115ae4c4c95fee9a731f3f310bb71f29cf3 (diff)
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: I98f17957d16acef82e0762828715149101768a82 Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org> Signed-off-by: Avinash Chandra <avicha@codeaurora.org>
-rw-r--r--sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c b/sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c
index 66245ba438fc..eb093cf71b41 100644
--- a/sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c
+++ b/sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1631,11 +1631,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",
@@ -1657,7 +1657,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;
}