From 698a4c73d1d219ae976001de468c22d0749ee6ad Mon Sep 17 00:00:00 2001 From: Phani Kumar Uppalapati Date: Mon, 14 Mar 2016 12:03:20 -0700 Subject: ASoC: wcd9335: Update decimator filter cutoff frequency Update decimator high pass filter cutoff frequency if the TX is path closed within 300ms after opening the session. This will restore the cutoff frequency to the default correct value. CRs-fixed: 988075 Change-Id: Iece28fe2551a74ec7b1b8b4b5cac02537e3d28d8 Signed-off-by: Phani Kumar Uppalapati --- sound/soc/codecs/wcd9335.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index d8787ed249db..439a474ce183 100755 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -5719,9 +5719,20 @@ static int tasha_codec_enable_dec(struct snd_soc_dapm_widget *w, msecs_to_jiffies(300)); break; case SND_SOC_DAPM_PRE_PMD: + hpf_cut_off_freq = + tasha->tx_hpf_work[decimator].hpf_cut_off_freq; snd_soc_update_bits(codec, tx_vol_ctl_reg, 0x10, 0x10); snd_soc_update_bits(codec, dec_cfg_reg, 0x08, 0x00); - cancel_delayed_work_sync(&tasha->tx_hpf_work[decimator].dwork); + if (cancel_delayed_work_sync( + &tasha->tx_hpf_work[decimator].dwork)) { + if (hpf_cut_off_freq != CF_MIN_3DB_150HZ) { + tasha_codec_vote_max_bw(codec, true); + snd_soc_update_bits(codec, dec_cfg_reg, + TX_HPF_CUT_OFF_FREQ_MASK, + hpf_cut_off_freq << 5); + tasha_codec_vote_max_bw(codec, false); + } + } cancel_delayed_work_sync( &tasha->tx_mute_dwork[decimator].dwork); break; -- cgit v1.2.3