Drivers: Intel: DMIC: Fix mistake in retrieving cic_control value

This patch fixes the value get from current pdm_cfg[n] instead of
first pdm_cfg[0]. It impacts case where PDM0 is omitted from blob
or in case of different registers values for PDM0 and PDM1.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2021-09-09 18:10:04 +03:00 committed by Liam Girdwood
parent ba86bb4cab
commit 2e0b5d70ce
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ int dmic_set_config_nhlt(struct dai *dai, void *spec_config)
clk_div = MIC_CONTROL_PDM_CLKDIV_GET(pdm_cfg[n]->mic_control);
p_clkdiv = clk_div + 2;
if (dmic->global->active_fifos_mask == 0) {
val = pdm_cfg[0]->cic_control;
val = pdm_cfg[n]->cic_control;
bf1 = CIC_CONTROL_SOFT_RESET_GET(val);
bf2 = CIC_CONTROL_CIC_START_B_GET(val);
bf3 = CIC_CONTROL_CIC_START_A_GET(val);