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

Commit 67d1c21e authored by Guneshwor Singh's avatar Guneshwor Singh Committed by Mark Brown
Browse files

ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link



When creating a FE link, the cpu_dai_name will come from topology and
dpcm will be enabled by default.

Signed-off-by: default avatarMengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 74dde20c
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -1586,6 +1586,7 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg,
	return snd_soc_register_dai(tplg->comp, dai_drv);
	return snd_soc_register_dai(tplg->comp, dai_drv);
}
}


/* create the FE DAI link */
static int soc_tplg_link_create(struct soc_tplg *tplg,
static int soc_tplg_link_create(struct soc_tplg *tplg,
	struct snd_soc_tplg_pcm *pcm)
	struct snd_soc_tplg_pcm *pcm)
{
{
@@ -1600,6 +1601,15 @@ static int soc_tplg_link_create(struct soc_tplg *tplg,
	link->stream_name = pcm->pcm_name;
	link->stream_name = pcm->pcm_name;
	link->id = pcm->pcm_id;
	link->id = pcm->pcm_id;


	link->cpu_dai_name = pcm->dai_name;
	link->codec_name = "snd-soc-dummy";
	link->codec_dai_name = "snd-soc-dummy-dai";

	/* enable DPCM */
	link->dynamic = 1;
	link->dpcm_playback = pcm->playback;
	link->dpcm_capture = pcm->capture;

	/* pass control to component driver for optional further init */
	/* pass control to component driver for optional further init */
	ret = soc_tplg_dai_link_load(tplg, link);
	ret = soc_tplg_dai_link_load(tplg, link);
	if (ret < 0) {
	if (ret < 0) {