Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47a8907d authored by Olivier Moysan's avatar Olivier Moysan Committed by Mark Brown
Browse files

ASoC: stm32: sai: Remove spurious IRQs on stop



Clear IRQ mask on stream stop to avoid spurious IRQs.

Signed-off-by: default avatarOlivier Moysan <olivier.moysan@st.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 61fb4ff7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -419,8 +419,6 @@ static int stm32_sai_startup(struct snd_pcm_substream *substream,
	}

	/* Enable ITs */
	regmap_update_bits(sai->regmap, STM_SAI_SR_REGX,
			   SAI_XSR_MASK, (unsigned int)~SAI_XSR_MASK);

	regmap_update_bits(sai->regmap, STM_SAI_CLRFR_REGX,
			   SAI_XCLRFR_MASK, SAI_XCLRFR_MASK);
@@ -693,6 +691,9 @@ static int stm32_sai_trigger(struct snd_pcm_substream *substream, int cmd,
	case SNDRV_PCM_TRIGGER_STOP:
		dev_dbg(cpu_dai->dev, "Disable DMA and SAI\n");

		regmap_update_bits(sai->regmap, STM_SAI_IMR_REGX,
				   SAI_XIMR_MASK, 0);

		regmap_update_bits(sai->regmap, STM_SAI_CR1_REGX,
				   SAI_XCR1_SAIEN,
				   (unsigned int)~SAI_XCR1_SAIEN);