diff options
author | Guneshwor Singh <guneshwor.o.singh@intel.com> | 2016-04-19 13:12:50 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-04-20 17:21:43 +0100 |
commit | 67d1c21e37301ca3cea3705951950ce21f2723e1 (patch) | |
tree | 1e8f81aae02e1a2a948e74d0633bbd28e3c53d25 /sound/soc/soc-topology.c | |
parent | 74dde20c2d6b360e12c17f20db7735bb5e8115ef (diff) | |
download | linux-67d1c21e37301ca3cea3705951950ce21f2723e1.tar.bz2 |
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>
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r-- | sound/soc/soc-topology.c | 10 |
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, 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) { |