aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuneshwor Singh <guneshwor.o.singh@intel.com>2016-04-19 01:12:50 -0400
committerMark Brown <broonie@kernel.org>2016-04-20 12:21:43 -0400
commit67d1c21e37301ca3cea3705951950ce21f2723e1 (patch)
tree1e8f81aae02e1a2a948e74d0633bbd28e3c53d25
parent74dde20c2d6b360e12c17f20db7735bb5e8115ef (diff)
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: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-topology.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index bdbfcef4c319..ca5f82885031 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,
1586 return snd_soc_register_dai(tplg->comp, dai_drv); 1586 return snd_soc_register_dai(tplg->comp, dai_drv);
1587} 1587}
1588 1588
1589/* create the FE DAI link */
1589static int soc_tplg_link_create(struct soc_tplg *tplg, 1590static int soc_tplg_link_create(struct soc_tplg *tplg,
1590 struct snd_soc_tplg_pcm *pcm) 1591 struct snd_soc_tplg_pcm *pcm)
1591{ 1592{
@@ -1600,6 +1601,15 @@ static int soc_tplg_link_create(struct soc_tplg *tplg,
1600 link->stream_name = pcm->pcm_name; 1601 link->stream_name = pcm->pcm_name;
1601 link->id = pcm->pcm_id; 1602 link->id = pcm->pcm_id;
1602 1603
1604 link->cpu_dai_name = pcm->dai_name;
1605 link->codec_name = "snd-soc-dummy";
1606 link->codec_dai_name = "snd-soc-dummy-dai";
1607
1608 /* enable DPCM */
1609 link->dynamic = 1;
1610 link->dpcm_playback = pcm->playback;
1611 link->dpcm_capture = pcm->capture;
1612
1603 /* pass control to component driver for optional further init */ 1613 /* pass control to component driver for optional further init */
1604 ret = soc_tplg_dai_link_load(tplg, link); 1614 ret = soc_tplg_dai_link_load(tplg, link);
1605 if (ret < 0) { 1615 if (ret < 0) {