All of lore.kernel.org
 help / color / mirror / Atom feed
From: mengdong.lin@linux.intel.com
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: Mengdong Lin <mengdong.lin@linux.intel.com>,
	vinod.koul@intel.com, hardik.t.shah@intel.com,
	guneshwor.o.singh@intel.com, liam.r.girdwood@linux.intel.com,
	rakesh.a.ughreja@intel.com, mengdong.lin@intel.com
Subject: [PATCH 4/4] ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link
Date: Tue, 19 Apr 2016 13:12:50 +0800	[thread overview]
Message-ID: <c80352fa0ae3d1f881ea8ea15f474314ad63e3ae.1461042239.git.mengdong.lin@linux.intel.com> (raw)
In-Reply-To: <cover.1461042239.git.mengdong.lin@linux.intel.com>

From: Guneshwor Singh <guneshwor.o.singh@intel.com>

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

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>

diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index bdbfcef..ca5f828 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1586,6 +1586,7 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg,
 	return snd_soc_register_dai(tplg->comp, dai_drv);
 }
 
+/* create the FE DAI link */
 static int soc_tplg_link_create(struct soc_tplg *tplg,
 	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->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 */
 	ret = soc_tplg_dai_link_load(tplg, link);
 	if (ret < 0) {
-- 
2.5.0

  parent reply	other threads:[~2016-04-19  5:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19  5:12 [PATCH 0/4] ASoC: topology: configure more on DAI & DAI links mengdong.lin
2016-04-19  5:12 ` [PATCH 1/4] ASoC: Export snd_soc_find_dai() mengdong.lin
2016-04-20 16:12   ` Mark Brown
2016-04-21  6:55     ` Mengdong Lin
2016-04-20 16:19   ` Applied "ASoC: Export snd_soc_find_dai()" to the asoc tree Mark Brown
2016-04-19  5:12 ` [PATCH 2/4] ASoC: Change DAI link's be_id to a generic id mengdong.lin
2016-04-20 16:19   ` Applied "ASoC: Change DAI link's be_id to a generic id" to the asoc tree Mark Brown
2016-04-19  5:12 ` [PATCH 3/4] ASoC: topology: Set the link ID when creating a FE DAI link mengdong.lin
2016-04-20 16:19   ` Applied "ASoC: topology: Set the link ID when creating a FE DAI link" to the asoc tree Mark Brown
2016-04-19  5:12 ` mengdong.lin [this message]
2016-04-20 16:21   ` Applied "ASoC: topology: Set CPU DAI name and enable DPCM by default for FE " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c80352fa0ae3d1f881ea8ea15f474314ad63e3ae.1461042239.git.mengdong.lin@linux.intel.com \
    --to=mengdong.lin@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=guneshwor.o.singh@intel.com \
    --cc=hardik.t.shah@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=mengdong.lin@intel.com \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.