Skip to contentSkip to conversation

ASoC: DaVinci: Fix stream restart error

PATCH Applied Chaithrika U S 2 participants 2 messages Jan 20, 2010 – Jan 26, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
Applies to ALSA GIT tree on branch topic/asoc at
http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=shortlog;
h=topic/asoc

 sound/soc/davinci/davinci-mcasp.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
sound/soc/davinci/davinci-mcasp.c +2 -3
index a613bbb..ab6518d 100644
@@ -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;
 
Signature · 1 line
1.5.6
Applied
#1 lore raw
Quoted 7 lines · Chaithrika U S

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.

Applied, thanks.