[Sound-open-firmware] [PATCH] topology: SRC testing passthrough pipeline.

Liam Girdwood liam.r.girdwood at linux.intel.com
Mon Sep 11 17:38:36 CEST 2017


The testing pipline for 24 bit SRC 48kHz output.

Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
 topology/sof/pipe-passthrough-src-playback.m4 | 109 ++++++++++++++++++++++++++
 1 file changed, 109 insertions(+)
 create mode 100644 topology/sof/pipe-passthrough-src-playback.m4

diff --git a/topology/sof/pipe-passthrough-src-playback.m4 b/topology/sof/pipe-passthrough-src-playback.m4
new file mode 100644
index 0000000..0ffc2a4
--- /dev/null
+++ b/topology/sof/pipe-passthrough-src-playback.m4
@@ -0,0 +1,109 @@
+# Low Latency Passthrough with volume Pipeline and PCM
+#
+# Pipeline Endpoints for connection are :-
+#
+#  host PCM_P --> SRC --> sink DAI0
+
+# Include topology builder
+include(`local.m4')
+
+
+#
+# Components and Buffers
+#
+
+# Host "Passthrough Playback" PCM uses pipeline DMAC and channel
+# with 4 sink and 0 source periods
+W_PCM_PLAYBACK(Passthrough Playback, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 4, 0, 2)
+
+#
+# SRC Configuration
+#
+
+SectionVendorTuples."media_src_tokens" {
+	tokens "sof_src_tokens"
+
+	tuples."word" {
+		SOF_TKN_SRC_RATE_OUT	"48000"
+	}
+}
+
+SectionData."media_src_conf" {
+	tuples "media_src_tokens"
+}
+
+# "SRC" has 4 source and 4 sink periods
+W_SRC(0, PIPELINE_FORMAT, 4, 4, media_src_conf, 2)
+
+# Playback Buffers
+W_BUFFER(0, COMP_BUFFER_SIZE(4,
+	COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES))
+W_BUFFER(1, COMP_BUFFER_SIZE(4,
+	COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES))
+
+#
+# DAI definitions
+#
+W_DAI_OUT(DAI_SNAME, DAI_TYPE, DAI_INDEX, DAI_FORMAT, 0, DAI_PERIODS,
+	DAI_PERIODS, dai0p_plat_conf)
+
+#
+# DAI pipeline
+#
+W_PIPELINE(N_DAI_OUT, SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES,
+	SCHEDULE_CORE, 0, pipe_dai_schedule_plat)
+
+#
+# Pipeline Graph
+#
+#  host PCM_P --> B0 --> SRC 0 --> B1 --> sink DAI0
+
+SectionGraph."pipe-pass-src-playback-PIPELINE_ID" {
+	index STR(PIPELINE_ID)
+
+	lines [
+		dapm(N_PCM, Passthrough Playback PCM_ID)
+		dapm(N_BUFFER(0), N_PCM)
+		dapm(N_SRC(0), N_BUFFER(0))
+		dapm(N_BUFFER(1), N_SRC(0))
+		dapm(N_DAI_OUT, N_BUFFER(1))
+	]
+}
+
+
+#
+# PCM Configuration
+#
+
+SectionPCMCapabilities.STR(Passthrough Playback PCM_ID) {
+
+	formats "S32_LE,S24_LE,S16_LE"
+	rate_min "8000"
+	rate_max "96000"
+	channels_min "2"
+	channels_max "4"
+	periods_min "2"
+	periods_max "16"
+	period_size_min	"192"
+	period_size_max	"16384"
+	buffer_size_min	"65536"
+	buffer_size_max	"65536"
+}
+
+# PCM Passthrough Playback
+SectionPCM.STR(PCM PCM_ID) {
+
+	index STR(PIPELINE_ID)
+
+	# used for binding to the PCM
+	id STR(PCM_ID)
+
+	dai.STR(Passthrough Playback PCM_ID) {
+		id STR(PCM_ID)
+	}
+
+	pcm."playback" {
+
+		capabilities STR(Passthrough Playback PCM_ID)
+	}
+}
-- 
2.11.0



More information about the Sound-open-firmware mailing list