mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
ASoC: compare CPU DAI stream name to find BE DAI
While setting up route for a particular device, compare stream name of CPU DAI and Backend DAI to find the correct Backend DAI. Change-Id: Ic3f7c0e5b2a1055e7fdf52c78ded797a9a126d03 Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Meng Wang <mwang@codeaurora.org>
This commit is contained in:
parent
2a1334dded
commit
e496752fb3
1 changed files with 12 additions and 2 deletions
|
|
@ -1377,7 +1377,12 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
|
|||
be->cpu_dai->playback_widget ?
|
||||
be->cpu_dai->playback_widget->name : "(not set)");
|
||||
|
||||
if (be->cpu_dai->playback_widget == widget)
|
||||
if ((be->cpu_dai->playback_widget &&
|
||||
be->cpu_dai->playback_widget == widget &&
|
||||
(be->dai_link->stream_name &&
|
||||
!strcmp(be->dai_link->stream_name,
|
||||
be->cpu_dai->playback_widget->sname))) ||
|
||||
be->codec_dai->playback_widget == widget)
|
||||
return be;
|
||||
|
||||
for_each_rtd_codec_dai(be, i, dai) {
|
||||
|
|
@ -1396,7 +1401,12 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
|
|||
be->cpu_dai->capture_widget ?
|
||||
be->cpu_dai->capture_widget->name : "(not set)");
|
||||
|
||||
if (be->cpu_dai->capture_widget == widget)
|
||||
if ((be->cpu_dai->capture_widget &&
|
||||
be->cpu_dai->capture_widget == widget &&
|
||||
(be->dai_link->stream_name &&
|
||||
!strcmp(be->dai_link->stream_name,
|
||||
be->cpu_dai->capture_widget->sname))) ||
|
||||
be->codec_dai->capture_widget == widget)
|
||||
return be;
|
||||
|
||||
for_each_rtd_codec_dai(be, i, dai) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue