summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-10-26 01:10:39 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-10-26 01:10:38 -0700
commit49cc9d17a4d7f15f62c79cba6bfc9ae6448f1e35 (patch)
treef2cc3bdd2be160a19764ca93f8100324bd6959a3
parent84072dbeee1be6922b41e35d2febe5df44095cc7 (diff)
parenta67770e1b9c2c474fc05934b339fe4d0ce294351 (diff)
Merge "ASoC: wcd9335: Update TX gain correctly after decimator enable"
-rw-r--r--sound/soc/codecs/wcd9335.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
index ed984496aec1..8f6276f1f3d4 100644
--- a/sound/soc/codecs/wcd9335.c
+++ b/sound/soc/codecs/wcd9335.c
@@ -5792,6 +5792,7 @@ static int tasha_codec_enable_dec(struct snd_soc_dapm_widget *w,
char *wname;
int ret = 0, amic_n;
u16 tx_vol_ctl_reg, pwr_level_reg = 0, dec_cfg_reg, hpf_gate_reg;
+ u16 tx_gain_ctl_reg;
char *dec;
u8 hpf_cut_off_freq;
struct tasha_priv *tasha = snd_soc_codec_get_drvdata(codec);
@@ -5834,6 +5835,7 @@ static int tasha_codec_enable_dec(struct snd_soc_dapm_widget *w,
tx_vol_ctl_reg = WCD9335_CDC_TX0_TX_PATH_CTL + 16 * decimator;
hpf_gate_reg = WCD9335_CDC_TX0_TX_PATH_SEC2 + 16 * decimator;
dec_cfg_reg = WCD9335_CDC_TX0_TX_PATH_CFG0 + 16 * decimator;
+ tx_gain_ctl_reg = WCD9335_CDC_TX0_TX_VOL_CTL + 16 * decimator;
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
@@ -5896,6 +5898,9 @@ static int tasha_codec_enable_dec(struct snd_soc_dapm_widget *w,
schedule_delayed_work(
&tasha->tx_hpf_work[decimator].dwork,
msecs_to_jiffies(300));
+ /* apply gain after decimator is enabled */
+ snd_soc_write(codec, tx_gain_ctl_reg,
+ snd_soc_read(codec, tx_gain_ctl_reg));
break;
case SND_SOC_DAPM_PRE_PMD:
hpf_cut_off_freq =