diff options
author | Liam Girdwood <lrg@ti.com> | 2012-06-05 14:26:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-07 18:56:38 -0400 |
commit | 35ea0655a1bcdb1dcb1c1d0c4b6b391ade9c6d01 (patch) | |
tree | 080733710359f9376f955d21c3fad66690a03fad /sound/soc | |
parent | bfd37bb5f681961e255fd2f346c20fdae2ef3f27 (diff) |
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>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/soc-pcm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index bedd1717a373..48fd15b312c1 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
@@ -794,6 +794,9 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card, | |||
794 | for (i = 0; i < card->num_links; i++) { | 794 | for (i = 0; i < card->num_links; i++) { |
795 | be = &card->rtd[i]; | 795 | be = &card->rtd[i]; |
796 | 796 | ||
797 | if (!be->dai_link->no_pcm) | ||
798 | continue; | ||
799 | |||
797 | if (be->cpu_dai->playback_widget == widget || | 800 | if (be->cpu_dai->playback_widget == widget || |
798 | be->codec_dai->playback_widget == widget) | 801 | be->codec_dai->playback_widget == widget) |
799 | return be; | 802 | return be; |
@@ -803,6 +806,9 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card, | |||
803 | for (i = 0; i < card->num_links; i++) { | 806 | for (i = 0; i < card->num_links; i++) { |
804 | be = &card->rtd[i]; | 807 | be = &card->rtd[i]; |
805 | 808 | ||
809 | if (!be->dai_link->no_pcm) | ||
810 | continue; | ||
811 | |||
806 | if (be->cpu_dai->capture_widget == widget || | 812 | if (be->cpu_dai->capture_widget == widget || |
807 | be->codec_dai->capture_widget == widget) | 813 | be->codec_dai->capture_widget == widget) |
808 | return be; | 814 | return be; |