mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
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 <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
bfd37bb5f6
commit
35ea0655a1
1 changed files with 6 additions and 0 deletions
|
@ -794,6 +794,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;
|
||||
|
@ -803,6 +806,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;
|
||||
|
|
Loading…
Reference in a new issue