diff options
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 0a302e1080d9..ab6518d86f18 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -767,14 +767,26 @@ static int davinci_mcasp_trigger(struct snd_pcm_substream *substream, | |||
767 | int ret = 0; | 767 | int ret = 0; |
768 | 768 | ||
769 | switch (cmd) { | 769 | switch (cmd) { |
770 | case SNDRV_PCM_TRIGGER_START: | ||
771 | case SNDRV_PCM_TRIGGER_RESUME: | 770 | case SNDRV_PCM_TRIGGER_RESUME: |
771 | case SNDRV_PCM_TRIGGER_START: | ||
772 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | 772 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: |
773 | if (!dev->clk_active) { | ||
774 | clk_enable(dev->clk); | ||
775 | dev->clk_active = 1; | ||
776 | } | ||
773 | davinci_mcasp_start(dev, substream->stream); | 777 | davinci_mcasp_start(dev, substream->stream); |
774 | break; | 778 | break; |
775 | 779 | ||
776 | case SNDRV_PCM_TRIGGER_STOP: | ||
777 | case SNDRV_PCM_TRIGGER_SUSPEND: | 780 | case SNDRV_PCM_TRIGGER_SUSPEND: |
781 | davinci_mcasp_stop(dev, substream->stream); | ||
782 | if (dev->clk_active) { | ||
783 | clk_disable(dev->clk); | ||
784 | dev->clk_active = 0; | ||
785 | } | ||
786 | |||
787 | break; | ||
788 | |||
789 | case SNDRV_PCM_TRIGGER_STOP: | ||
778 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | 790 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
779 | davinci_mcasp_stop(dev, substream->stream); | 791 | davinci_mcasp_stop(dev, substream->stream); |
780 | break; | 792 | break; |
@@ -866,6 +878,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev) | |||
866 | } | 878 | } |
867 | 879 | ||
868 | clk_enable(dev->clk); | 880 | clk_enable(dev->clk); |
881 | dev->clk_active = 1; | ||
869 | 882 | ||
870 | dev->base = (void __iomem *)IO_ADDRESS(mem->start); | 883 | dev->base = (void __iomem *)IO_ADDRESS(mem->start); |
871 | dev->op_mode = pdata->op_mode; | 884 | dev->op_mode = pdata->op_mode; |