diff options
author | Liam Girdwood <lrg@ti.com> | 2012-04-23 06:29:09 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-06-13 21:27:34 +0800 |
commit | 0a1a2f661cf055a6e80318ae13fe66cbe9fef3cf (patch) | |
tree | 020735c0fe19b9924b1eaa1b9b9142f9c93668a7 /sound | |
parent | 1637e377d354a1d45cbd2bcdd86d25f88ec125b4 (diff) |
ASoC: dapm: Simplify stream event logic.
If statement not needed after recent updates. To be squashed.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-pcm.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index c7759891c02d..f9423c94d228 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1300,10 +1300,7 @@ static int soc_dpcm_fe_dai_shutdown(struct snd_pcm_substream *substream) soc_pcm_close(substream); /* run the stream event for each BE */ - if (stream == SNDRV_PCM_STREAM_PLAYBACK) - soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); - else - soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); + soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; @@ -1671,10 +1668,7 @@ int soc_dpcm_fe_dai_prepare(struct snd_pcm_substream *substream) } /* run the stream event for each BE */ - if (stream == SNDRV_PCM_STREAM_PLAYBACK) - soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); - else - soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); + soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; @@ -1794,10 +1788,7 @@ static int dpcm_run_update_shutdown(struct snd_soc_pcm_runtime *fe, int stream) dev_err(fe->dev,"dpcm: shutdown FE failed %d\n", err); /* run the stream event for each BE */ - if (stream == SNDRV_PCM_STREAM_PLAYBACK) - soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP); - else - soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP); + soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP); return 0; } @@ -1846,10 +1837,7 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream) } /* run the stream event for each BE */ - if (stream == SNDRV_PCM_STREAM_PLAYBACK) - soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP); - else - soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP); + soc_dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP); /* keep going if FE state is > prepare */ if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_PREPARE || |