Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49341d80 authored by Banajit Goswami's avatar Banajit Goswami Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarBanajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: default avatarMeng Wang <mwang@codeaurora.org>
parent 1f629ea9
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1331,7 +1331,11 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
			if (!be->dai_link->no_pcm)
				continue;

			if (be->cpu_dai->playback_widget == widget)
			if ((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 (i = 0; i < be->num_codecs; i++) {
@@ -1347,7 +1351,11 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
			if (!be->dai_link->no_pcm)
				continue;

			if (be->cpu_dai->capture_widget == widget)
			if ((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 (i = 0; i < be->num_codecs; i++) {