[Sound-open-firmware] [PATCH v2 3/5] topology: create m4 wrapper SectionPCMCapabilities
Ranjani Sridharan
ranjani.sridharan at linux.intel.com
Mon Mar 5 08:13:09 CET 2018
This patch adds a m4 wrpper for PCM Capabilities sections
in pipeline definition
Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
---
topology/m4/local.m4 | 16 ++++++++++++++++
topology/sof/pipe-low-latency-capture.m4 | 16 +---------------
topology/sof/pipe-low-latency-playback.m4 | 16 ++--------------
topology/sof/pipe-passthrough-capture.m4 | 15 +--------------
topology/sof/pipe-passthrough-playback.m4 | 15 +--------------
topology/sof/pipe-pcm-media.m4 | 14 +-------------
topology/sof/pipe-src-capture.m4 | 15 +--------------
topology/sof/pipe-src-playback.m4 | 15 +--------------
topology/sof/pipe-volume-capture.m4 | 14 +-------------
topology/sof/pipe-volume-playback.m4 | 17 ++---------------
10 files changed, 27 insertions(+), 126 deletions(-)
diff --git a/topology/m4/local.m4 b/topology/m4/local.m4
index b7bc78f..7e99a60 100644
--- a/topology/m4/local.m4
+++ b/topology/m4/local.m4
@@ -611,6 +611,22 @@ define(`P_GRAPH',
` ]'
`}')
+dnl PCM_CAPABILITIES(name, formats, rate_min, rate_max, channels_min, channels_max, periods_min, periods_max, period_size_min, period_size_max, buffer_size_min, buffer_size_max)
+define(`PCM_CAPABILITIES',
+`SectionPCMCapabilities.STR($1) {'
+`'
+` formats "$2"'
+` rate_min STR($3)'
+` rate_max STR($4)'
+` channels_min STR($5)'
+` channels_max STR($6)'
+` periods_min STR($7)'
+` periods_max STR($8)'
+` period_size_min STR($9)'
+` period_size_max STR($10)'
+` buffer_size_min STR($11)'
+` buffer_size_max STR($12)'
+`}')
divert(0) dnl
diff --git a/topology/sof/pipe-low-latency-capture.m4 b/topology/sof/pipe-low-latency-capture.m4
index 9728032..8b338bc 100644
--- a/topology/sof/pipe-low-latency-capture.m4
+++ b/topology/sof/pipe-low-latency-capture.m4
@@ -57,18 +57,4 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Low Latency Capture PCM_ID
# PCM Configuration
#
-SectionPCMCapabilities.STR(Low Latency 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 "4"
- period_size_min "192"
- period_size_max "16384"
- buffer_size_min "65536"
- buffer_size_max "65536"
-}
-
+PCM_CAPABILITIES(Low Latency Capture PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, 4, 2, 4, 192, 16384, 65536, 65536)
diff --git a/topology/sof/pipe-low-latency-playback.m4 b/topology/sof/pipe-low-latency-playback.m4
index a278a2a..ce3c506 100644
--- a/topology/sof/pipe-low-latency-playback.m4
+++ b/topology/sof/pipe-low-latency-playback.m4
@@ -103,19 +103,7 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Low Latency Playback PCM_I
# PCM Configuration
#
+
# PCM capabilities supported by FW
-SectionPCMCapabilities.STR(Low Latency Playback PCM_ID) {
-
- formats "S32_LE,S24_LE,S16_LE"
- rate_min "48000"
- rate_max "48000"
- channels_min "2"
- channels_max "2"
- periods_min "2"
- periods_max "16"
- period_size_min "192"
- period_size_max "16384"
- buffer_size_min "65536"
- buffer_size_max "65536"
-}
+PCM_CAPABILITIES(Low Latency Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, 2, 2, 16, 192, 16384, 65536, 65536)
diff --git a/topology/sof/pipe-passthrough-capture.m4 b/topology/sof/pipe-passthrough-capture.m4
index aae92b9..cf5defb 100644
--- a/topology/sof/pipe-passthrough-capture.m4
+++ b/topology/sof/pipe-passthrough-capture.m4
@@ -49,17 +49,4 @@ 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"
-}
+PCM_CAPABILITIES(Passthrough Capture PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, 4, 2, 16, 192, 16384, 65536, 65536)
diff --git a/topology/sof/pipe-passthrough-playback.m4 b/topology/sof/pipe-passthrough-playback.m4
index 71be139..7a14d46 100644
--- a/topology/sof/pipe-passthrough-playback.m4
+++ b/topology/sof/pipe-passthrough-playback.m4
@@ -49,17 +49,4 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_I
# PCM Configuration
#
-SectionPCMCapabilities.STR(Passthrough Playback 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"
-}
+PCM_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, 4, 2, 16, 192, 16384, 65536, 65536)
diff --git a/topology/sof/pipe-pcm-media.m4 b/topology/sof/pipe-pcm-media.m4
index b3a306c..dd89361 100644
--- a/topology/sof/pipe-pcm-media.m4
+++ b/topology/sof/pipe-pcm-media.m4
@@ -93,19 +93,7 @@ W_PIPELINE(N_SRC(0), SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCHE
# PCM capabilities supported by FW
-SectionPCMCapabilities.STR(Media Playback PCM_ID) {
- formats "S32_LE,S24_LE,S16_LE"
- rate_min "8000"
- rate_max "192000"
- channels_min "2"
- channels_max "2"
- periods_min "2"
- periods_max "32"
- period_size_min "192"
- period_size_max "262144"
- buffer_size_min "8388608"
- buffer_size_max "8388608"
-}
+PCM_CAPABILITIES(Media Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 8000, 192000, 2, 2, 2, 32, 192, 262144, 8388608, 8388608)
# PCM Low Latency Playback and Capture
SectionPCM.STR(Media Playback PCM_ID) {
diff --git a/topology/sof/pipe-src-capture.m4 b/topology/sof/pipe-src-capture.m4
index 1af9826..e1ae5a9 100644
--- a/topology/sof/pipe-src-capture.m4
+++ b/topology/sof/pipe-src-capture.m4
@@ -74,17 +74,4 @@ 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 "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_CAPABILITIES(Passthrough Capture PCM_ID, `S32_LE,S24_LE,S16_LE', 8000, 96000, 2, 4, 2, 16, 192, 16384, 65536, 65536)
diff --git a/topology/sof/pipe-src-playback.m4 b/topology/sof/pipe-src-playback.m4
index 608ce0f..276a510 100644
--- a/topology/sof/pipe-src-playback.m4
+++ b/topology/sof/pipe-src-playback.m4
@@ -74,18 +74,5 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_I
# 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_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 8000, 96000, 2, 4, 2, 16, 192, 16384, 65536, 65536)
diff --git a/topology/sof/pipe-volume-capture.m4 b/topology/sof/pipe-volume-capture.m4
index 21335f1..2484b7e 100644
--- a/topology/sof/pipe-volume-capture.m4
+++ b/topology/sof/pipe-volume-capture.m4
@@ -69,17 +69,5 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Capture PCM_ID
# PCM Configuration
#
-SectionPCMCapabilities.STR(Passthrough Capture PCM_ID) {
+PCM_CAPABILITIES(Passthrough Capture PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, 4, 2, 16, 192, 16384, 65536, 65536)
- 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"
-}
diff --git a/topology/sof/pipe-volume-playback.m4 b/topology/sof/pipe-volume-playback.m4
index 7ea823a..f41b4a1 100644
--- a/topology/sof/pipe-volume-playback.m4
+++ b/topology/sof/pipe-volume-playback.m4
@@ -77,20 +77,7 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_I
#
# PCM Configuration
-#
-SectionPCMCapabilities.STR(Passthrough Playback 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"
-}
+#
+PCM_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, 4, 2, 16, 192, 16384, 65536, 65536)
--
2.14.1
More information about the Sound-open-firmware
mailing list