Skip to content

Commit

Permalink
Driver: Intel: DMIC: Remove state check from active FIFO mask update
Browse files Browse the repository at this point in the history
The mask does not over/undercount events so no need to protect
from multiple start() or stop() calls.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
  • Loading branch information
singalsu authored and keyonjie committed Aug 9, 2021
1 parent f445426 commit ccfc9e6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/drivers/intel/dmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1400,8 +1400,7 @@ static void dmic_start(struct dai *dai)
}

/* Set bit dai->index */
if (dmic->state == COMP_STATE_PREPARE)
*uncached_dmic_active_fifos_mask |= BIT(dai->index);
*uncached_dmic_active_fifos_mask |= BIT(dai->index);

dmic->state = COMP_STATE_ACTIVE;
spin_unlock(&dai->lock);
Expand Down Expand Up @@ -1455,8 +1454,7 @@ static void dmic_stop(struct dai *dai, bool in_active)
*uncached_dmic_active_fifos_mask);

/* Clear bit dai->index */
if (in_active)
*uncached_dmic_active_fifos_mask &= ~BIT(dai->index);
*uncached_dmic_active_fifos_mask &= ~BIT(dai->index);

for (i = 0; i < DMIC_HW_CONTROLLERS; i++) {
/* Don't stop CIC yet if one FIFO remains active */
Expand Down

0 comments on commit ccfc9e6

Please sign in to comment.