summaryrefslogtreecommitdiff
path: root/src/topology/pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/topology/pcm.c')
-rw-r--r--src/topology/pcm.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/topology/pcm.c b/src/topology/pcm.c
index bd70dc95..77b76056 100644
--- a/src/topology/pcm.c
+++ b/src/topology/pcm.c
@@ -70,8 +70,20 @@ static int tplg_build_stream_caps(snd_tplg_t *tplg,
return 0;
}
-/* build FE DAI/PCM configurations */
-int tplg_build_pcm(snd_tplg_t *tplg, unsigned int type)
+/* build a PCM (FE DAI & DAI link) element */
+static int build_pcm(snd_tplg_t *tplg, struct tplg_elem *elem)
+{
+ int err;
+
+ err = tplg_build_stream_caps(tplg, elem->id, elem->pcm->caps);
+ if (err < 0)
+ return err;
+
+ return 0;
+}
+
+/* build all PCM (FE DAI & DAI link) elements */
+int tplg_build_pcms(snd_tplg_t *tplg, unsigned int type)
{
struct list_head *base, *pos;
struct tplg_elem *elem;
@@ -86,7 +98,7 @@ int tplg_build_pcm(snd_tplg_t *tplg, unsigned int type)
return -EINVAL;
}
- err = tplg_build_stream_caps(tplg, elem->id, elem->pcm->caps);
+ err = build_pcm(tplg, elem);
if (err < 0)
return err;