Skip to content

Commit

Permalink
ASoC: DaVinci: Fix stream restart error
Browse files Browse the repository at this point in the history
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: Chaithrika U S <chaithrika@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Chaithrika U S authored and Mark Brown committed Jan 26, 2010
1 parent f1487fc commit e473b84
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sound/soc/davinci/davinci-mcasp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e473b84

Please sign in to comment.