summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@linux.intel.com>2016-04-19 13:12:43 +0800
committerMark Brown <broonie@kernel.org>2016-04-20 17:16:49 +0100
commitb84fff5afb16627a8973256992f3951ac3e90d84 (patch)
tree0bcc963228bc151bc3ae78fdb49635be56ff4f98
parente42839b012eb8179ed2e3571bfcd133fba5df154 (diff)
downloadlinux-b84fff5afb16627a8973256992f3951ac3e90d84.tar.gz
linux-b84fff5afb16627a8973256992f3951ac3e90d84.tar.bz2
linux-b84fff5afb16627a8973256992f3951ac3e90d84.zip
ASoC: topology: Set the link ID when creating a FE DAI link
Topology will set the link's generic id when creating a FE link. Device drivers can check the id for link specific initialization. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--include/uapi/sound/asoc.h2
-rw-r--r--sound/soc/soc-topology.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index db86b447b515..e4701a3c6331 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -423,7 +423,7 @@ struct snd_soc_tplg_pcm {
__le32 size; /* in bytes of this structure */
char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
- __le32 pcm_id; /* unique ID - used to match */
+ __le32 pcm_id; /* unique ID - used to match with DAI link */
__le32 dai_id; /* unique ID - used to match */
__le32 playback; /* supports playback mode */
__le32 capture; /* supports capture mode */
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 1cf94d7fb9f4..bdbfcef4c319 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1598,6 +1598,7 @@ static int soc_tplg_link_create(struct soc_tplg *tplg,
link->name = pcm->pcm_name;
link->stream_name = pcm->pcm_name;
+ link->id = pcm->pcm_id;
/* pass control to component driver for optional further init */
ret = soc_tplg_dai_link_load(tplg, link);