ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE.
PATCH 1/1 ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE.
Make sure that the dpcm_get_be() only returns BE DAI links.
Signed-off-by Liam Girdwood <[email protected]>
--- sound/soc/soc-pcm.c | 6 ++++++ 1 file changed, 6 insertions(+)
sound/soc/soc-pcm.c +6 -0
@@ -830,6 +830,9 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,for (i =0 ; i < card->num_links; i++) { be = &card->rtd[i]; +if (!be->dai_link->no_pcm) +continue ; +if (be->cpu_dai->playback_widget == widget || be->codec_dai->playback_widget == widget)return be;
@@ -839,6 +842,9 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,for (i =0 ; i < card->num_links; i++) { be = &card->rtd[i]; +if (!be->dai_link->no_pcm) +continue ; +if (be->cpu_dai->capture_widget == widget || be->codec_dai->capture_widget == widget)return be;
Signature · 1 line
1.7.9.5
Mark Brown
AppliedQuoted 1 line · Liam Girdwood
Make sure that the
dpcm_get_be()only returns BE DAI links.
Applied, thanks.