Skip to content

Commit

Permalink
Drivers: DAI: Intel: Move ACE DMIC start reset clear to earlier
Browse files Browse the repository at this point in the history
The unreset of ACE PDM controllers is moved to beginning of
void dai_dmic_start() and done side-by-side. This change is done
for adhering to recommended hardware initialization flow to
avoid intermittent failures on ARL-S.

Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu authored and aescolar committed Jun 20, 2024
1 parent 78920e8 commit 1198c7e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/dai/intel/dmic/dmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,12 @@ static void dai_dmic_start(struct dai_intel_dmic *dmic)

/* enable port */
key = k_spin_lock(&dmic->lock);

#ifdef CONFIG_SOC_SERIES_INTEL_ADSP_ACE
for (i = 0; i < CONFIG_DAI_DMIC_HW_CONTROLLERS; i++)
dai_dmic_update_bits(dmic, dmic_base[i] + CIC_CONTROL, CIC_CONTROL_SOFT_RESET, 0);
#endif

dmic->startcount = 0;

/* Compute unmute ramp gain update coefficient. */
Expand All @@ -566,11 +572,6 @@ static void dai_dmic_start(struct dai_intel_dmic *dmic)
dai_dmic_start_fifo_packers(dmic, dmic->dai_config_params.dai_index);

for (i = 0; i < CONFIG_DAI_DMIC_HW_CONTROLLERS; i++) {
#ifdef CONFIG_SOC_SERIES_INTEL_ADSP_ACE
dai_dmic_update_bits(dmic, dmic_base[i] + CIC_CONTROL,
CIC_CONTROL_SOFT_RESET, 0);
#endif

mic_a = dmic->enable[i] & 1;
mic_b = (dmic->enable[i] & 2) >> 1;
start_fir = dmic->enable[i] > 0;
Expand Down

0 comments on commit 1198c7e

Please sign in to comment.