summaryrefslogtreecommitdiff
path: root/sound/soc/omap/omap-abe.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/omap-abe.c')
-rw-r--r--sound/soc/omap/omap-abe.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/sound/soc/omap/omap-abe.c b/sound/soc/omap/omap-abe.c
index a7ee806675c2..9c1b9bc4e317 100644
--- a/sound/soc/omap/omap-abe.c
+++ b/sound/soc/omap/omap-abe.c
@@ -112,36 +112,6 @@ static void omap_abe_dai_shutdown(struct snd_pcm_substream *substream,
omap_mcpdm_free();
}
-static int omap_abe_dai_trigger(struct snd_pcm_substream *substream, int cmd,
- struct snd_soc_dai *dai)
-{
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
- struct omap_mcpdm_data *mcpdm_priv = cpu_dai->private_data;
- int stream = substream->stream;
- int err = 0;
-
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- if (!mcpdm_priv->active[stream]++)
- omap_mcpdm_start(stream);
- break;
-
- case SNDRV_PCM_TRIGGER_STOP:
- case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (!--mcpdm_priv->active[stream])
- omap_mcpdm_stop(stream);
- break;
- default:
- err = -EINVAL;
- }
-
- return err;
-}
-
static int omap_abe_dai_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
@@ -213,6 +183,8 @@ static int omap_abe_dai_hw_params(struct snd_pcm_substream *substream,
else
err = omap_mcpdm_capture_open(&mcpdm_links[stream]);
+ omap_mcpdm_start(stream);
+
return err;
}
@@ -231,13 +203,14 @@ static int omap_abe_dai_hw_free(struct snd_pcm_substream *substream,
else
err = omap_mcpdm_capture_close(&mcpdm_links[stream]);
+ omap_mcpdm_stop(stream);
+
return err;
}
static struct snd_soc_dai_ops omap_abe_dai_ops = {
.startup = omap_abe_dai_startup,
.shutdown = omap_abe_dai_shutdown,
- .trigger = omap_abe_dai_trigger,
.hw_params = omap_abe_dai_hw_params,
.hw_free = omap_abe_dai_hw_free,
};