From 7f29f390e12b3898c5b4b1bfd124aa7777e631b6 Mon Sep 17 00:00:00 2001 From: Shazmaan Ali Date: Tue, 22 Mar 2022 21:29:36 -0700 Subject: [PATCH] asoc: codecs: error fix for soc_component_read_no_lock the offset between LPASS_CDC_WSA_RX_INP_MUX_RX_INT0_CFG1 and LPASS_CDC_WSA_RX_INP_MUX_RX_INT1_CFG1 is 8 so updating 0x104 + 8* interp update ng block register write for NG2 mode in Kundu Change-Id: I44da894feebb5d25bd467ffd4d54adde111778e6 Signed-off-by: Shazmaan Ali --- asoc/codecs/lpass-cdc/lpass-cdc-wsa-macro.c | 4 ++-- asoc/codecs/wsa884x/wsa884x.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asoc/codecs/lpass-cdc/lpass-cdc-wsa-macro.c b/asoc/codecs/lpass-cdc/lpass-cdc-wsa-macro.c index be1b941ff9..867ad5fe11 100644 --- a/asoc/codecs/lpass-cdc/lpass-cdc-wsa-macro.c +++ b/asoc/codecs/lpass-cdc/lpass-cdc-wsa-macro.c @@ -1316,7 +1316,7 @@ static int lpass_cdc_macro_set_idle_detect_thr(struct snd_soc_component *compone */ if (path_type == INTERP_MIX_PATH) { mux_reg = LPASS_CDC_WSA_RX_INP_MUX_RX_INT0_CFG1 + - 2 * interp; + 8 * interp; mux_reg_val = snd_soc_component_read(component, mux_reg) & 0x0f; @@ -1329,7 +1329,7 @@ static int lpass_cdc_macro_set_idle_detect_thr(struct snd_soc_component *compone if (path_type == INTERP_MAIN_PATH) { mux_reg = LPASS_CDC_WSA_RX_INP_MUX_RX_INT1_CFG0 + - 2 * (interp - 1); + 8 * (interp - 1); mux_reg_val = snd_soc_component_read(component, mux_reg) & 0x0f; i = NUM_INTERPOLATORS; diff --git a/asoc/codecs/wsa884x/wsa884x.c b/asoc/codecs/wsa884x/wsa884x.c index b04f4c526f..a791edf72d 100644 --- a/asoc/codecs/wsa884x/wsa884x.c +++ b/asoc/codecs/wsa884x/wsa884x.c @@ -756,11 +756,11 @@ static void wsa_noise_gate_write(struct snd_soc_component *component, break; case NG2: snd_soc_component_update_bits(component, WSA884X_PA_FSM_CTL1, - WSA884X_IDLE_DETECT_NG_BLOCK_MASK, 0x28); + WSA884X_IDLE_DETECT_NG_BLOCK_MASK, 0x20); break; case NG3: snd_soc_component_update_bits(component, WSA884X_PA_FSM_CTL1, - WSA884X_IDLE_DETECT_NG_BLOCK_MASK, 0x18); + WSA884X_IDLE_DETECT_NG_BLOCK_MASK, 0x10); break; default: snd_soc_component_update_bits(component, WSA884X_PA_FSM_CTL1,