summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAdrian Alonso <aalonso@freescale.com>2012-05-14 18:54:14 -0500
committerJason Liu <r64343@freescale.com>2012-07-20 13:37:34 +0800
commit5599029bba776b95d26f5ffdc2802f14625b35bb (patch)
tree59078f94c498582eea5f79ace8a1c3037c625c25 /sound
parent448a154b838a3dfececc1b068b5625cd249081f8 (diff)
ENGR00209384-3 mxc_spdif: capture playback stop function
* Add capture/playback stop function Stops capture/playback process Signed-off-by: Adrian Alonso <aalonso@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/mxc_spdif.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/codecs/mxc_spdif.c b/sound/soc/codecs/mxc_spdif.c
index 445650f749d9..94b1335d7855 100644
--- a/sound/soc/codecs/mxc_spdif.c
+++ b/sound/soc/codecs/mxc_spdif.c
@@ -598,7 +598,7 @@ static int mxc_spdif_playback_start(struct snd_pcm_substream *substream,
return 0;
}
-static int mxc_spdif_playback_shutdown(struct snd_pcm_substream *substream,
+static int mxc_spdif_playback_stop(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct snd_soc_codec *codec = dai->codec;
@@ -653,6 +653,7 @@ static int mxc_spdif_playback_trigger(struct snd_pcm_substream *substream,
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ ret = mxc_spdif_playback_stop(substream, dai);
break;
default:
return -EINVAL;
@@ -749,7 +750,7 @@ static int mxc_spdif_capture_start(struct snd_pcm_substream *substream,
return 0;
}
-static int mxc_spdif_capture_shutdown(struct snd_pcm_substream *substream,
+static int mxc_spdif_capture_stop(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct snd_soc_codec *codec = dai->codec;
@@ -805,6 +806,7 @@ static int mxc_spdif_capture_trigger(struct snd_pcm_substream *substream,
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ ret = mxc_spdif_capture_stop(substream, dai);
break;
default:
return -EINVAL;
@@ -1150,12 +1152,7 @@ static void mxc_spdif_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_codec *codec = dai->codec;
struct mxc_spdif_priv *spdif_priv = snd_soc_codec_get_drvdata(codec);
struct mxc_spdif_platform_data *plat_data = spdif_priv->plat_data;
- int ret;
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- ret = mxc_spdif_playback_shutdown(substream, dai);
- else
- ret = mxc_spdif_capture_shutdown(substream, dai);
/* disable spdif_core clock */
clk_disable(plat_data->spdif_core_clk);
}