[Sound-open-firmware] [PATCH 4/6] topology: Add passthrough volume capture pipe
Liam Girdwood
liam.r.girdwood at linux.intel.com
Mon Dec 11 23:04:57 CET 2017
Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
topology/sof/pipe-passthrough-vol-capture.m4 | 109 +++++++++++++++++++++++++++
1 file changed, 109 insertions(+)
create mode 100644 topology/sof/pipe-passthrough-vol-capture.m4
diff --git a/topology/sof/pipe-passthrough-vol-capture.m4 b/topology/sof/pipe-passthrough-vol-capture.m4
new file mode 100644
index 0000000..258f8fa
--- /dev/null
+++ b/topology/sof/pipe-passthrough-vol-capture.m4
@@ -0,0 +1,109 @@
+# Passthrough with volume Pipeline and PCM
+#
+# Pipeline Endpoints for connection are :-
+#
+# host PCM_C <-- B0 <-- Volume 0 <-- B1 <-- source DAI0
+
+# Include topology builder
+include(`local.m4')
+
+#
+# Controls
+#
+SectionControlMixer.STR(Master Capture Volume) {
+
+ # control belongs to this index group
+ index STR(PIPELINE_ID)
+
+ # Channel register and shift for Front Left/Right
+ channel."FL" {
+ reg "1"
+ shift "0"
+ }
+ channel."FR" {
+ reg "1"
+ shift "1"
+ }
+
+ # control uses bespoke driver get/put/info ID 0
+ ops."ctl" {
+ info "volsw"
+ get "256"
+ put "256"
+ }
+
+ # TLV 32 steps from -90dB to +6dB for 3dB
+ max "32"
+ invert "false"
+ tlv "vtlv_m90s3"
+}
+
+#
+# Components and Buffers
+#
+
+# Host "Passthrough Capture" PCM uses pipeline DMAC and channel
+# with 0 sink and 2 source periods
+W_PCM_CAPTURE(Passthrough Playback, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 0, 2, 2)
+
+# "Volume" has 2 source and 2 sink periods
+W_PGA(0, Master Capture Volume, PIPELINE_FORMAT, 2, 2, 2)
+
+# Playback Buffers
+W_BUFFER(0, COMP_BUFFER_SIZE(2,
+ COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES))
+W_BUFFER(1, COMP_BUFFER_SIZE(2,
+ COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES))
+
+#
+# DAI definitions
+#
+W_DAI_IN(DAI_TYPE, DAI_INDEX, DAI_FORMAT, 0, DAI_PERIODS,
+ DAI_PERIODS, dai0c_plat_conf)
+
+#
+# DAI pipeline - always use 0 for DAIs
+#
+W_PIPELINE(N_DAI_IN, SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES,
+ SCHEDULE_CORE, 0, pipe_dai_schedule_plat)
+
+#
+# Pipeline Graph
+#
+# host PCM_P <-- B0 <-- Volume 0 <-- B1 <-- sink DAI0
+
+SectionGraph."pipe-pass-vol-capture-PIPELINE_ID" {
+ index STR(PIPELINE_ID)
+
+ lines [
+ dapm(Passthrough Capture PCM_ID, N_PCMC)
+ dapm(N_PCMC, N_BUFFER(0))
+ dapm(N_BUFFER(0), N_PGA(0))
+ dapm(N_PGA(0), N_BUFFER(1))
+ ]
+}
+
+#
+# Pipeline Source and Sinks
+#
+indir(`define', concat(`PIPELINE_SINK_', PIPELINE_ID), N_BUFFER(1))
+indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Capture PCM_ID)
+
+#
+# PCM Configuration
+#
+
+SectionPCMCapabilities.STR(Passthrough Capture PCM_ID) {
+
+ formats "S32_LE,S24_LE,S16_LE"
+ rate_min "48000"
+ rate_max "48000"
+ 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"
+}
--
2.14.1
More information about the Sound-open-firmware
mailing list