ASoC: soc-pcm/soc-compress: use snd_soc_dapm_stream_stop() for SND_SOC_DAPM_STREAM_STOP
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 10 Jan 2020 02:36:56 +0000 (11:36 +0900)
committerMark Brown <broonie@kernel.org>
Fri, 10 Jan 2020 13:34:19 +0000 (13:34 +0000)
dpcm_fe_dai_shutdown() / soc_compr_free_fe() didn't care pmdown_time.
We already have snd_soc_dapm_stream_stop() for it.
Let's use common method.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zhewrq9j.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-compress.c
sound/soc/soc-pcm.c

index 392a1c5b15d3240e9afa17550c2bb35d100c8b36..223cd045719e8df10dbd71221391387b3f378fe2 100644 (file)
@@ -299,7 +299,7 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream)
        for_each_dpcm_be(fe, stream, dpcm)
                dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE;
 
-       dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP);
+       snd_soc_dapm_stream_stop(fe, stream);
 
        fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE;
        fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
index dfff2ddb469ad48ccb9dd075681c40ee36c7981e..74d340d1c9f7797178debe02730226145007ce8d 100644 (file)
@@ -1966,7 +1966,7 @@ static int dpcm_fe_dai_shutdown(struct snd_pcm_substream *substream)
        soc_pcm_close(substream);
 
        /* run the stream event for each BE */
-       dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP);
+       snd_soc_dapm_stream_stop(fe, stream);
 
        fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE;
        dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO);