From 5938e32aac6a72bb296adba407cf36d89ca34f6a Mon Sep 17 00:00:00 2001 From: Meng Wang Date: Fri, 3 Dec 2021 09:48:45 +0800 Subject: [PATCH] asoc: lpass-cdc: reset TX datapath during path teardown When switching from 16KHz to 48KHz recording, mute issue happens. Addd TX datapath reset during path teardown to resolve this issue. Change-Id: I7445b397c20ce4e4968fec2326267f63dcba5a8c Signed-off-by: Meng Wang --- asoc/codecs/lpass-cdc/lpass-cdc-tx-macro.c | 4 ++++ asoc/codecs/lpass-cdc/lpass-cdc-va-macro.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/asoc/codecs/lpass-cdc/lpass-cdc-tx-macro.c b/asoc/codecs/lpass-cdc/lpass-cdc-tx-macro.c index 879d7e4091..1e108235a0 100644 --- a/asoc/codecs/lpass-cdc/lpass-cdc-tx-macro.c +++ b/asoc/codecs/lpass-cdc/lpass-cdc-tx-macro.c @@ -1054,6 +1054,10 @@ static int lpass_cdc_tx_macro_enable_dec(struct snd_soc_dapm_widget *w, case SND_SOC_DAPM_POST_PMD: snd_soc_component_update_bits(component, tx_vol_ctl_reg, 0x20, 0x00); + snd_soc_component_update_bits(component, tx_vol_ctl_reg, + 0x40, 0x40); + snd_soc_component_update_bits(component, tx_vol_ctl_reg, + 0x40, 0x00); snd_soc_component_update_bits(component, dec_cfg_reg, 0x06, 0x00); snd_soc_component_update_bits(component, tx_vol_ctl_reg, diff --git a/asoc/codecs/lpass-cdc/lpass-cdc-va-macro.c b/asoc/codecs/lpass-cdc/lpass-cdc-va-macro.c index 6765201b6d..e023965f43 100644 --- a/asoc/codecs/lpass-cdc/lpass-cdc-va-macro.c +++ b/asoc/codecs/lpass-cdc/lpass-cdc-va-macro.c @@ -1383,6 +1383,10 @@ static int lpass_cdc_va_macro_enable_dec(struct snd_soc_dapm_widget *w, /* Disable TX CLK */ snd_soc_component_update_bits(component, tx_vol_ctl_reg, 0x20, 0x00); + snd_soc_component_update_bits(component, tx_vol_ctl_reg, + 0x40, 0x40); + snd_soc_component_update_bits(component, tx_vol_ctl_reg, + 0x40, 0x00); snd_soc_component_update_bits(component, tx_vol_ctl_reg, 0x10, 0x00); break;