diff --git a/topology/m4/buffer.m4 b/topology/m4/buffer.m4 index 55dd065..4bfd212 100644 --- a/topology/m4/buffer.m4 +++ b/topology/m4/buffer.m4 @@ -29,4 +29,23 @@ define(`W_BUFFER', dnl COMP_BUFFER_SIZE( num_periods, sample_size, channels, fmames) define(`COMP_BUFFER_SIZE', `eval(`$1 * $2 * $3 * $4')') +dnl PCM_PLAYBACK_ADD(name, pipeline, pcm_id, dai_id, playback) +define(`PCM_PLAYBACK_ADD', +`SectionPCM.STR($1) {' +`' +` index STR($2)' +`' +` # used for binding to the PCM' +` id STR($3)' +`' +` dai.STR($1 $3) {' +` id STR($4)' +` }' +`' +` pcm."playback" {' +`' +` capabilities STR($5)' +` }' +`}') + divert(0)dnl diff --git a/topology/m4/pcm.m4 b/topology/m4/pcm.m4 index 28bcb8f..51775fb 100644 --- a/topology/m4/pcm.m4 +++ b/topology/m4/pcm.m4 @@ -71,56 +71,46 @@ define(`PCM_CAPABILITIES', ` buffer_size_max STR($12)' `}') -dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) -define(`PCM_PLAYBACK_ADD', -`SectionPCM.STR($1) {' -`' -` # used for binding to the PCM' -` id STR($2)' -`' -` dai.STR($1 $2) {' -` }' -`' -` pcm."playback" {' -`' -` capabilities STR($3)' -` }' -`}') - -dnl PCM_CAPTURE_ADD(name, pcm_id, capture) +dnl PCM_CAPTURE_ADD(name, pipeline, pcm_id, dai_id, capture) define(`PCM_CAPTURE_ADD', `SectionPCM.STR($1) {' `' -` # used for binding to the PCM' -` id STR($2)' +` index STR($2)' `' -` dai.STR($1 $2) {' +` # used for binding to the PCM' +` id STR($3)' +`' +` dai.STR($1 $3) {' +` id STR($4)' ` }' `' ` pcm."capture" {' `' -` capabilities STR($3)' +` capabilities STR($5)' ` }' `}') -dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) +dnl PCM_DUPLEX_ADD(name, pipeline, pcm_id, dai_id, playback, capture) define(`PCM_DUPLEX_ADD', `SectionPCM.STR($1) {' `' -` # used for binding to the PCM' -` id STR($2)' +` index STR($2)' `' -` dai.STR($1 $2) {' +` # used for binding to the PCM' +` id STR($3)' +`' +` dai.STR($1 $3) {' +` id STR($4)' ` }' `' ` pcm."capture" {' `' -` capabilities STR($4)' +` capabilities STR($6)' ` }' `' ` pcm."playback" {' `' -` capabilities STR($3)' +` capabilities STR($5)' ` }' `}') diff --git a/topology/sof-apl-nocodec.m4 b/topology/sof-apl-nocodec.m4 index da61ece..0818026 100644 --- a/topology/sof-apl-nocodec.m4 +++ b/topology/sof-apl-nocodec.m4 @@ -218,15 +218,16 @@ DAI_ADD(sof/pipe-dai-capture.m4, PIPELINE_SINK_13, 2, s32le, 48, 1000, 0, 0) -dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) -PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) -PCM_DUPLEX_ADD(Port1, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) -PCM_DUPLEX_ADD(Port2, 2, PIPELINE_PCM_5, PIPELINE_PCM_6) -PCM_DUPLEX_ADD(Port3, 3, PIPELINE_PCM_7, PIPELINE_PCM_8) -PCM_DUPLEX_ADD(Port4, 4, PIPELINE_PCM_9, PIPELINE_PCM_10) -PCM_DUPLEX_ADD(Port5, 5, PIPELINE_PCM_11, PIPELINE_PCM_12) -dnl PCM_CAPTURE_ADD(name, pipeline, capture) -PCM_CAPTURE_ADD(DMIC01, 6, PIPELINE_PCM_13) +# PCM Low Latency, id 0 +dnl PCM_DUPLEX_ADD(name, pipeline, pcm_id, dai_id, playback, capture) +PCM_DUPLEX_ADD(Port0, 0, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Port1, 1, 1, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) +PCM_DUPLEX_ADD(Port2, 2, 2, 2, PIPELINE_PCM_5, PIPELINE_PCM_6) +PCM_DUPLEX_ADD(Port3, 3, 3, 3, PIPELINE_PCM_7, PIPELINE_PCM_8) +PCM_DUPLEX_ADD(Port4, 4, 4, 4, PIPELINE_PCM_9, PIPELINE_PCM_10) +PCM_DUPLEX_ADD(Port5, 5, 5, 5, PIPELINE_PCM_11, PIPELINE_PCM_12) +dnl PCM_CAPTURE_ADD(name, pipeline, pcm_id, dai_id, capture) +PCM_CAPTURE_ADD(DMIC01, 6, 6, 6, PIPELINE_PCM_13) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-apl-pcm512x.m4 b/topology/sof-apl-pcm512x.m4 index cf85337..d0b4461 100644 --- a/topology/sof-apl-pcm512x.m4 +++ b/topology/sof-apl-pcm512x.m4 @@ -41,7 +41,7 @@ DAI_ADD(sof/pipe-dai-playback.m4, 48, 1000, 0, 0) # PCM Low Latency, id 0 -PCM_PLAYBACK_ADD(Port5, 0, PIPELINE_PCM_1) +PCM_PLAYBACK_ADD(Port5, 0, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-apl-tdf8532.m4 b/topology/sof-apl-tdf8532.m4 index c82c1f0..8421c07 100644 --- a/topology/sof-apl-tdf8532.m4 +++ b/topology/sof-apl-tdf8532.m4 @@ -168,12 +168,12 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency, id 0 -PCM_DUPLEX_ADD(Port0, 2, PIPELINE_PCM_4, PIPELINE_PCM_5) -PCM_CAPTURE_ADD(Port1, 3, PIPELINE_PCM_6) -PCM_DUPLEX_ADD(Port2, 1, PIPELINE_PCM_2, PIPELINE_PCM_3) -PCM_DUPLEX_ADD(Port3, 4, PIPELINE_PCM_7, PIPELINE_PCM_8) -PCM_PLAYBACK_ADD(Port4, 0, PIPELINE_PCM_1) -PCM_DUPLEX_ADD(Port5, 5, PIPELINE_PCM_9, PIPELINE_PCM_10) +PCM_DUPLEX_ADD(Port0, 2, 2, 2, PIPELINE_PCM_4, PIPELINE_PCM_5) +PCM_CAPTURE_ADD(Port1, 3, 3, 3, PIPELINE_PCM_6) +PCM_DUPLEX_ADD(Port2, 1, 1, 1, PIPELINE_PCM_2, PIPELINE_PCM_3) +PCM_DUPLEX_ADD(Port3, 4, 4, 4, PIPELINE_PCM_7, PIPELINE_PCM_8) +PCM_PLAYBACK_ADD(Port4, 0, 0, 0, PIPELINE_PCM_1) +PCM_DUPLEX_ADD(Port5, 5, 5, 5, PIPELINE_PCM_9, PIPELINE_PCM_10) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-bdw-rt286.m4 b/topology/sof-bdw-rt286.m4 index a750344..f8294d2 100644 --- a/topology/sof-bdw-rt286.m4 +++ b/topology/sof-bdw-rt286.m4 @@ -86,7 +86,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-bdw-rt5640.m4 b/topology/sof-bdw-rt5640.m4 index 454e050..3c72d30 100644 --- a/topology/sof-bdw-rt5640.m4 +++ b/topology/sof-bdw-rt5640.m4 @@ -86,7 +86,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-byt-da7213.m4 b/topology/sof-byt-da7213.m4 index 6008ff0..af5129c 100644 --- a/topology/sof-byt-da7213.m4 +++ b/topology/sof-byt-da7213.m4 @@ -86,7 +86,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-byt-nocodec.m4 b/topology/sof-byt-nocodec.m4 index 6df25ca..3c52603 100644 --- a/topology/sof-byt-nocodec.m4 +++ b/topology/sof-byt-nocodec.m4 @@ -86,7 +86,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-byt-rt5640.m4 b/topology/sof-byt-rt5640.m4 index 2177fe3..4107491 100644 --- a/topology/sof-byt-rt5640.m4 +++ b/topology/sof-byt-rt5640.m4 @@ -86,7 +86,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-byt-rt5645.m4 b/topology/sof-byt-rt5645.m4 index 23f1a75..028cb45 100644 --- a/topology/sof-byt-rt5645.m4 +++ b/topology/sof-byt-rt5645.m4 @@ -86,7 +86,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-byt-rt5651.m4 b/topology/sof-byt-rt5651.m4 index 724c34e..d2cdfad 100644 --- a/topology/sof-byt-rt5651.m4 +++ b/topology/sof-byt-rt5651.m4 @@ -86,7 +86,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Low Latency, 3, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-cht-max98090.m4 b/topology/sof-cht-max98090.m4 index 627181f..38244d7 100644 --- a/topology/sof-cht-max98090.m4 +++ b/topology/sof-cht-max98090.m4 @@ -86,7 +86,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-cht-nocodec.m4 b/topology/sof-cht-nocodec.m4 index dae6dca..23c6ef7 100644 --- a/topology/sof-cht-nocodec.m4 +++ b/topology/sof-cht-nocodec.m4 @@ -86,7 +86,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-cnl-rt274.m4 b/topology/sof-cnl-rt274.m4 index 141e03b..a2e6d52 100644 --- a/topology/sof-cnl-rt274.m4 +++ b/topology/sof-cnl-rt274.m4 @@ -58,7 +58,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Passthrough, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-hsw-rt5640.m4 b/topology/sof-hsw-rt5640.m4 index 272cb15..9bf8976 100644 --- a/topology/sof-hsw-rt5640.m4 +++ b/topology/sof-hsw-rt5640.m4 @@ -86,7 +86,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/sof-icl-nocodec.m4 b/topology/sof-icl-nocodec.m4 index 1dffe18..9cabf7e 100644 --- a/topology/sof-icl-nocodec.m4 +++ b/topology/sof-icl-nocodec.m4 @@ -58,7 +58,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Low Latency -PCM_DUPLEX_ADD(Passthrough, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/test/test-all.m4 b/topology/test/test-all.m4 index 518c909..4f4241f 100644 --- a/topology/test/test-all.m4 +++ b/topology/test/test-all.m4 @@ -76,7 +76,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Passthrough -PCM_DUPLEX_ADD(Passthrough, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/test/test-capture.m4 b/topology/test/test-capture.m4 index 4e10d3d..b21a47f 100644 --- a/topology/test/test-capture.m4 +++ b/topology/test/test-capture.m4 @@ -60,7 +60,7 @@ DAI_ADD(sof/pipe-dai-capture.m4, 48, 1000, 0, 0) # PCM Passthrough -PCM_CAPTURE_ADD(Passthrough, 0, PIPELINE_PCM_2) +PCM_CAPTURE_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present diff --git a/topology/test/test-playback.m4 b/topology/test/test-playback.m4 index 9833ea9..1c6f712 100644 --- a/topology/test/test-playback.m4 +++ b/topology/test/test-playback.m4 @@ -59,7 +59,7 @@ DAI_ADD(sof/pipe-dai-playback.m4, 48, 1000, 0, 0) # PCM Passthrough -PCM_PLAYBACK_ADD(Passthrough, 0, PIPELINE_PCM_1) +PCM_PLAYBACK_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1) # # BE configurations - overrides config in ACPI if present