[Sound-open-firmware] [PATCH v3 8/8] topology: create m4 wrapper for Data section in pipeline definition
Ranjani Sridharan
ranjani.sridharan at linux.intel.com
Mon Mar 5 21:40:24 CET 2018
This patch adds a m4 wrapper for data section in pipeline definitions
Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
---
topology/dsps/bdw.m4 | 28 +++++++---------------------
topology/dsps/bxt.m4 | 28 +++++++---------------------
topology/dsps/byt.m4 | 28 +++++++---------------------
topology/dsps/cht.m4 | 28 +++++++---------------------
topology/dsps/cnl.m4 | 28 +++++++---------------------
topology/dsps/hsw.m4 | 28 +++++++---------------------
topology/m4/local.m4 | 7 +++++++
topology/sof/pipe-pcm-media.m4 | 4 +---
topology/sof/pipe-src-capture.m4 | 4 +---
topology/sof/pipe-src-playback.m4 | 4 +---
10 files changed, 52 insertions(+), 135 deletions(-)
diff --git a/topology/dsps/bdw.m4 b/topology/dsps/bdw.m4
index 7d57561..ea20aac 100644
--- a/topology/dsps/bdw.m4
+++ b/topology/dsps/bdw.m4
@@ -13,48 +13,34 @@ define(`PLATFORM_COMP_MEM_CAP', MEMCAPS(MEM_CAP_RAM, MEM_CAP_CACHE))
# Low Latency PCM Configuration
W_VENDORTUPLES(pipe_ll_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "50000"'))
-SectionData."pipe_ll_schedule_plat" {
- tuples "pipe_ll_schedule_plat_tokens"
-}
+W_DATA(pipe_ll_schedule_plat, pipe_ll_schedule_plat_tokens)
# Media PCM Configuration
W_VENDORTUPLES(pipe_media_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "100000"'))
-SectionData."pipe_media_schedule_plat" {
- tuples "pipe_media_schedule_plat_tokens"
-}
+W_DATA(pipe_media_schedule_plat, pipe_media_schedule_plat_tokens)
# Tone Signal Generator Configuration
W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "200000"'))
-SectionData."pipe_tone_schedule_plat" {
- tuples "pipe_tone_schedule_plat_tokens"
-}
+W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
# DAI0 platform playback configuration
W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-SectionData."dai0p_plat_conf" {
- tuples "dai0p_plat_tokens"
-}
+W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
# DAI0 platform capture configuration
W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC "1"'))
-SectionData."dai0c_plat_conf" {
- tuples "dai0c_plat_tokens"
-}
+W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
# PCM platform configuration
W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-SectionData."pcm_plat_conf" {
- tuples "pcm_plat_tokens"
-}
+W_DATA(pcm_plat_conf, pcm_plat_tokens)
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', SOF_TKN_SCHED_MIPS "5000"'))
-SectionData."pipe_dai_schedule_plat" {
- tuples "pipe_dai_schedule_plat_tokens"
-}
+W_DATA(pipe_dai_schedule_plat, pipe_dai_schedule_plat_tokens)
diff --git a/topology/dsps/bxt.m4 b/topology/dsps/bxt.m4
index 3a975d1..1286f57 100644
--- a/topology/dsps/bxt.m4
+++ b/topology/dsps/bxt.m4
@@ -16,48 +16,34 @@ define(`PLATFORM_COMP_MEM_CAP', MEMCAPS(MEM_CAP_RAM, MEM_CAP_CACHE))
# Low Latency PCM Configuration
W_VENDORTUPLES(pipe_ll_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "50000"'))
-SectionData."pipe_ll_schedule_plat" {
- tuples "pipe_ll_schedule_plat_tokens"
-}
+W_DATA(pipe_ll_schedule_plat, pipe_ll_schedule_plat_tokens)
# Media PCM Configuration
W_VENDORTUPLES(pipe_media_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "100000"'))
-SectionData."pipe_media_schedule_plat" {
- tuples "pipe_media_schedule_plat_tokens"
-}
+W_DATA(pipe_media_schedule_plat, pipe_media_schedule_plat_tokens)
# Tone Signal Generator Configuration
W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "200000"'))
-SectionData."pipe_tone_schedule_plat" {
- tuples "pipe_tone_schedule_plat_tokens"
-}
+W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
# DAI0 platform playback configuration
W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-SectionData."dai0p_plat_conf" {
- tuples "dai0p_plat_tokens"
-}
+W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
# DAI0 platform capture configuration
W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC "1"'))
-SectionData."dai0c_plat_conf" {
- tuples "dai0c_plat_tokens"
-}
+W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
# PCM platform configuration
W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-SectionData."pcm_plat_conf" {
- tuples "pcm_plat_tokens"
-}
+W_DATA(pcm_plat_conf, pcm_plat_tokens)
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', SOF_TKN_SCHED_MIPS "5000"'))
-SectionData."pipe_dai_schedule_plat" {
- tuples "pipe_dai_schedule_plat_tokens"
-}
+W_DATA(pipe_dai_schedule_plat, pipe_dai_schedule_plat_tokens)
diff --git a/topology/dsps/byt.m4 b/topology/dsps/byt.m4
index 490a6eb..ab707f8 100644
--- a/topology/dsps/byt.m4
+++ b/topology/dsps/byt.m4
@@ -13,48 +13,34 @@ define(`PLATFORM_COMP_MEM_CAP', MEMCAPS(MEM_CAP_RAM, MEM_CAP_CACHE))
# Low Latency PCM Configuration
W_VENDORTUPLES(pipe_ll_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "50000"'))
-SectionData."pipe_ll_schedule_plat" {
- tuples "pipe_ll_schedule_plat_tokens"
-}
+W_DATA(pipe_ll_schedule_plat, pipe_ll_schedule_plat_tokens)
# Media PCM Configuration
W_VENDORTUPLES(pipe_media_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "100000"'))
-SectionData."pipe_media_schedule_plat" {
- tuples "pipe_media_schedule_plat_tokens"
-}
+W_DATA(pipe_media_schedule_plat, pipe_media_schedule_plat_tokens)
# Tone Signal Generator Configuration
W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "200000"'))
-SectionData."pipe_tone_schedule_plat" {
- tuples "pipe_tone_schedule_plat_tokens"
-}
+W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
# DAI0 platform playback configuration
W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-SectionData."dai0p_plat_conf" {
- tuples "dai0p_plat_tokens"
-}
+W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
# DAI0 platform capture configuration
W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC "1"'))
-SectionData."dai0c_plat_conf" {
- tuples "dai0c_plat_tokens"
-}
+W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
# PCM platform configuration
W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-SectionData."pcm_plat_conf" {
- tuples "pcm_plat_tokens"
-}
+W_DATA(pcm_plat_conf, pcm_plat_tokens)
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "5000"'))
-SectionData."pipe_dai_schedule_plat" {
- tuples "pipe_dai_schedule_plat_tokens"
-}
+W_DATA(pipe_dai_schedule_plat, pipe_dai_schedule_plat_tokens)
diff --git a/topology/dsps/cht.m4 b/topology/dsps/cht.m4
index 9d9cc79..ed92860 100644
--- a/topology/dsps/cht.m4
+++ b/topology/dsps/cht.m4
@@ -13,48 +13,34 @@ define(`PLATFORM_COMP_MEM_CAP', MEMCAPS(MEM_CAP_RAM, MEM_CAP_CACHE))
# Low Latency PCM Configuration
W_VENDORTUPLES(pipe_ll_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "50000"'))
-SectionData."pipe_ll_schedule_plat" {
- tuples "pipe_ll_schedule_plat_tokens"
-}
+W_DATA(pipe_ll_schedule_plat, pipe_ll_schedule_plat_tokens)
# Media PCM Configuration
W_VENDORTUPLES(pipe_media_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "100000"'))
-SectionData."pipe_media_schedule_plat" {
- tuples "pipe_media_schedule_plat_tokens"
-}
+W_DATA(pipe_media_schedule_plat, pipe_media_schedule_plat_tokens)
# Tone Signal Generator Configuration
W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "200000"'))
-SectionData."pipe_tone_schedule_plat" {
- tuples "pipe_tone_schedule_plat_tokens"
-}
+W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
# DAI0 platform playback configuration
W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-SectionData."dai0p_plat_conf" {
- tuples "dai0p_plat_tokens"
-}
+W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
# DAI0 platform capture configuration
W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC "1"'))
-SectionData."dai0c_plat_conf" {
- tuples "dai0c_plat_tokens"
-}
+W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
# PCM platform configuration
W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-SectionData."pcm_plat_conf" {
- tuples "pcm_plat_tokens"
-}
+W_DATA(pcm_plat_conf, pcm_plat_tokens)
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', SOF_TKN_SCHED_MIPS "5000"'))
-SectionData."pipe_dai_schedule_plat" {
- tuples "pipe_dai_schedule_plat_tokens"
-}
+W_DATA(pipe_dai_schedule_plat, pipe_dai_schedule_plat_tokens)
diff --git a/topology/dsps/cnl.m4 b/topology/dsps/cnl.m4
index 0257ee5..95094f3 100644
--- a/topology/dsps/cnl.m4
+++ b/topology/dsps/cnl.m4
@@ -17,48 +17,34 @@ define(`PLATFORM_COMP_MEM_CAP', MEMCAPS(MEM_CAP_RAM, MEM_CAP_CACHE))
# Low Latency PCM Configuration
W_VENDORTUPLES(pipe_ll_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "50000"'))
-SectionData."pipe_ll_schedule_plat" {
- tuples "pipe_ll_schedule_plat_tokens"
-}
+W_DATA(pipe_ll_schedule_plat, pipe_ll_schedule_plat_tokens)
# Media PCM Configuration
W_VENDORTUPLES(pipe_media_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "100000"'))
-SectionData."pipe_media_schedule_plat" {
- tuples "pipe_media_schedule_plat_tokens"
-}
+W_DATA(pipe_media_schedule_plat, pipe_media_schedule_plat_tokens)
# Tone Signal Generator Configuration
W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "200000"'))
-SectionData."pipe_tone_schedule_plat" {
- tuples "pipe_tone_schedule_plat_tokens"
-}
+W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
# DAI0 platform playback configuration
W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-SectionData."dai0p_plat_conf" {
- tuples "dai0p_plat_tokens"
-}
+W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
# DAI0 platform capture configuration
W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC "1"'))
-SectionData."dai0c_plat_conf" {
- tuples "dai0c_plat_tokens"
-}
+W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
# PCM platform configuration
W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-SectionData."pcm_plat_conf" {
- tuples "pcm_plat_tokens"
-}
+W_DATA(pcm_plat_conf, pcm_plat_tokens)
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', SOF_TKN_SCHED_MIPS "5000"'))
-SectionData."pipe_dai_schedule_plat" {
- tuples "pipe_dai_schedule_plat_tokens"
-}
+W_DATA(pipe_dai_schedule_plat, pipe_dai_schedule_plat_tokens)
diff --git a/topology/dsps/hsw.m4 b/topology/dsps/hsw.m4
index 494d8d2..348ffc6 100644
--- a/topology/dsps/hsw.m4
+++ b/topology/dsps/hsw.m4
@@ -13,48 +13,34 @@ define(`PLATFORM_COMP_MEM_CAP', MEMCAPS(MEM_CAP_RAM, MEM_CAP_CACHE))
# Low Latency PCM Configuration
W_VENDORTUPLES(pipe_ll_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "50000"'))
-SectionData."pipe_ll_schedule_plat" {
- tuples "pipe_ll_schedule_plat_tokens"
-}
+W_DATA(pipe_ll_schedule_plat, pipe_ll_schedule_plat_tokens)
# Media PCM Configuration
W_VENDORTUPLES(pipe_media_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "100000"'))
-SectionData."pipe_media_schedule_plat" {
- tuples "pipe_media_schedule_plat_tokens"
-}
+W_DATA(pipe_media_schedule_plat, pipe_media_schedule_plat_tokens)
# Tone Signal Generator Configuration
W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "200000"'))
-SectionData."pipe_tone_schedule_plat" {
- tuples "pipe_tone_schedule_plat_tokens"
-}
+W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
# DAI0 platform playback configuration
W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-SectionData."dai0p_plat_conf" {
- tuples "dai0p_plat_tokens"
-}
+W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
# DAI0 platform capture configuration
W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC "1"'))
-SectionData."dai0c_plat_conf" {
- tuples "dai0c_plat_tokens"
-}
+W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
# PCM platform configuration
W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-SectionData."pcm_plat_conf" {
- tuples "pcm_plat_tokens"
-}
+W_DATA(pcm_plat_conf, pcm_plat_tokens)
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', SOF_TKN_SCHED_MIPS "5000"'))
-SectionData."pipe_dai_schedule_plat" {
- tuples "pipe_dai_schedule_plat_tokens"
-}
+W_DATA(pipe_dai_schedule_plat, pipe_dai_schedule_plat_tokens)
diff --git a/topology/m4/local.m4 b/topology/m4/local.m4
index b951d01..df6ea14 100644
--- a/topology/m4/local.m4
+++ b/topology/m4/local.m4
@@ -642,6 +642,13 @@ define(`W_VENDORTUPLES',
` }'
`}')
+dnl W_DATA(name, tuples)
+define(`W_DATA',
+`SectionData.STR($1) {'
+` tuples STR($2)'
+`}')
+
+
divert(0) dnl
diff --git a/topology/sof/pipe-pcm-media.m4 b/topology/sof/pipe-pcm-media.m4
index 2c59f7a..0196f98 100644
--- a/topology/sof/pipe-pcm-media.m4
+++ b/topology/sof/pipe-pcm-media.m4
@@ -28,9 +28,7 @@ C_CONTROLMIXER(PCM PCM_ID Playback Volume, PIPELINE_ID,
W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OUT "48000"'))
-SectionData."media_src_conf" {
- tuples "media_src_tokens"
-}
+W_DATA(media_src_conf, media_src_tokens)
#
# Components and Buffers
diff --git a/topology/sof/pipe-src-capture.m4 b/topology/sof/pipe-src-capture.m4
index d09c5ac..824dcdb 100644
--- a/topology/sof/pipe-src-capture.m4
+++ b/topology/sof/pipe-src-capture.m4
@@ -22,9 +22,7 @@ W_PCM_CAPTURE(Passthrough Capture, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 4, 0, 2)
W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OUT "48000"'))
-SectionData."media_src_conf" {
- tuples "media_src_tokens"
-}
+W_DATA(media_src_conf, media_src_tokens)
# "SRC" has 4 source and 4 sink periods
W_SRC(0, PIPELINE_FORMAT, 4, 4, media_src_conf, 2)
diff --git a/topology/sof/pipe-src-playback.m4 b/topology/sof/pipe-src-playback.m4
index e93cd64..3009ff7 100644
--- a/topology/sof/pipe-src-playback.m4
+++ b/topology/sof/pipe-src-playback.m4
@@ -22,9 +22,7 @@ W_PCM_PLAYBACK(Passthrough Playback, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 4, 0, 2)
W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OUT "48000"'))
-SectionData."media_src_conf" {
- tuples "media_src_tokens"
-}
+W_DATA(media_src_conf, media_src_tokens)
# "SRC" has 4 source and 4 sink periods
W_SRC(0, PIPELINE_FORMAT, 4, 4, media_src_conf, 2)
--
2.14.1
More information about the Sound-open-firmware
mailing list