Commit 027a4838 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-pcm: use dpcm_get_be() at dpcm_end_walk_at_be()

dpcm_end_walk_at_be() and dpcm_get_be() are almost same code.
This patch uses dpcm_get_be() from dpcm_end_walk_at_be().
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87d0adbouh.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c2cd8216
......@@ -1297,10 +1297,7 @@ static bool dpcm_end_walk_at_be(struct snd_soc_dapm_widget *widget,
{
struct snd_soc_card *card = widget->dapm->card;
struct snd_soc_pcm_runtime *rtd;
struct snd_soc_dapm_widget *w;
struct snd_soc_dai *dai;
int stream;
int i;
/* adjust dir to stream */
if (dir == SND_SOC_DAPM_DIR_OUT)
......@@ -1308,20 +1305,9 @@ static bool dpcm_end_walk_at_be(struct snd_soc_dapm_widget *widget,
else
stream = SNDRV_PCM_STREAM_CAPTURE;
for_each_card_rtds(card, rtd) {
if (!rtd->dai_link->no_pcm)
continue;
w = dai_get_widget(rtd->cpu_dai, stream);
if (w == widget)
return true;
for_each_rtd_codec_dai(rtd, i, dai) {
w = dai_get_widget(dai, stream);
if (w == widget)
rtd = dpcm_get_be(card, widget, stream);
if (rtd)
return true;
}
}
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment