From 0a1a2f661cf055a6e80318ae13fe66cbe9fef3cf Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Mon, 23 Apr 2012 06:29:09 +0800 Subject: ASoC: dapm: Simplify stream event logic. If statement not needed after recent updates. To be squashed. Signed-off-by: Liam Girdwood --- sound/soc/soc-pcm.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'sound') 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 || -- cgit v1.2.3