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

Commit e473b847 authored by Chaithrika U S's avatar Chaithrika U S Committed by Mark Brown
Browse files

ASoC: DaVinci: Fix stream restart error



Sometimes after a suspend-resume cycle, the ALSA application
restarts the stream when resume fails and McASP fails to work
as the clock is not enabled. This patch corrects this bug.

Testes on TI DA850/OMAP-L138 EVM.

Signed-off-by: default avatarChaithrika U S <chaithrika@ti.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent f1487fcb
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -768,13 +768,12 @@ static int davinci_mcasp_trigger(struct snd_pcm_substream *substream,

	switch (cmd) {
	case SNDRV_PCM_TRIGGER_RESUME:
	case SNDRV_PCM_TRIGGER_START:
	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
		if (!dev->clk_active) {
			clk_enable(dev->clk);
			dev->clk_active = 1;
		}
		/* Fall through */
	case SNDRV_PCM_TRIGGER_START:
	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
		davinci_mcasp_start(dev, substream->stream);
		break;