From b3d998a80eabf901513efd01d88bd4b8416b632d Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Thu, 22 Jul 2021 10:03:30 -0700 Subject: [PATCH 1/4] Revert "topology1: sof-cavs-nocodec: Add the deep buffer PCMs" This reverts commit 6516a8c89ba0ca165bd353e28667f1b431fb7e77. Signed-off-by: Ranjani Sridharan --- tools/topology/topology1/sof-cavs-nocodec.m4 | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/topology/topology1/sof-cavs-nocodec.m4 b/tools/topology/topology1/sof-cavs-nocodec.m4 index f52ac37ff66e..e5c91b47a87e 100644 --- a/tools/topology/topology1/sof-cavs-nocodec.m4 +++ b/tools/topology/topology1/sof-cavs-nocodec.m4 @@ -254,8 +254,6 @@ dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) PCM_DUPLEX_ADD(`Port'SSP0_IDX, 0, PIPELINE_PCM_7, PIPELINE_PCM_2) PCM_DUPLEX_ADD(`Port'SSP1_IDX, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) PCM_DUPLEX_ADD(`Port'SSP2_IDX, 2, PIPELINE_PCM_8, PIPELINE_PCM_6) -PCM_PLAYBACK_ADD(`Port'SSP0_IDX` Deep Buffer', 3, PIPELINE_PCM_11) -PCM_PLAYBACK_ADD(`Port'SSP2_IDX` Deep Buffer', 4, PIPELINE_PCM_12) # # BE configurations - overrides config in ACPI if present From c981862ee6c2edcbbf029f6839600e0935f6ca90 Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Thu, 22 Jul 2021 10:03:33 -0700 Subject: [PATCH 2/4] Revert "topology: cavs-nocodec: Add deepbuffer pipeline to SSP0 and SSP2" This reverts commit a10b5dcf85294f08d0e9c1eb2634bbff2d529f57. Signed-off-by: Ranjani Sridharan --- tools/topology/topology1/sof-cavs-nocodec.m4 | 96 +++++--------------- 1 file changed, 22 insertions(+), 74 deletions(-) diff --git a/tools/topology/topology1/sof-cavs-nocodec.m4 b/tools/topology/topology1/sof-cavs-nocodec.m4 index e5c91b47a87e..4e75668147e9 100644 --- a/tools/topology/topology1/sof-cavs-nocodec.m4 +++ b/tools/topology/topology1/sof-cavs-nocodec.m4 @@ -105,6 +105,13 @@ dnl period, priority, core, dnl pcm_min_rate, pcm_max_rate, pipeline_rate, dnl time_domain, sched_comp) +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of PIPE_BITS. +# Set 1000us deadline on core 2 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, + 1, 0, 2, PIPE_BITS, + 1000, 0, SSP0_CORE_ID, + 48000, 48000, 48000) + # Volume switch capture pipeline 2 on PCM 0 using max 2 channels of PIPE_BITS. # Set 1000us deadline on core 2 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-switch-capture.m4, @@ -126,6 +133,13 @@ PIPELINE_PCM_ADD(sof/pipe-volume-switch-capture.m4, 1000, 0, SSP1_CORE_ID, 48000, 48000, 48000) +# Low Latency playback pipeline 5 on PCM 2 using max 2 channels of PIPE_BITS. +# Set 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, + 5, 2, 2, PIPE_BITS, + 1000, 0, SSP2_CORE_ID, + 48000, 48000, 48000) + # Volume switch capture pipeline 6 on PCM 2 using max 2 channels of PIPE_BITS. # Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-switch-capture.m4, @@ -144,30 +158,10 @@ dnl deadline, priority, core, time_domain) # playback DAI is SSP0 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 -# The 'NOT_USED_IGNORED' is due to dependencies and is adjusted later with an explicit dapm line. -DAI_ADD(sof/pipe-mixer-dai-playback.m4, +DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, SSP0_IDX, NoCodec-0, - NOT_USED_IGNORED, 2, DAI_BITS, - 1000, 0, SSP0_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER, 2, 48000) - -# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of PIPE_BITS. -# Set 1000us deadline on core 2 with priority 0 -PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, - 7, 0, 2, PIPE_BITS, - 1000, 0, SSP0_CORE_ID, - 48000, 48000, 48000, - SCHEDULE_TIME_DOMAIN_TIMER, - PIPELINE_PLAYBACK_SCHED_COMP_1) - -# Deep buffer playback pipeline 11 on PCM 3 using max 2 channels of PIPE_BITS. -# Set 1000us deadline on core 2 with priority 0. -# TODO: Modify pipeline deadline to account for deep buffering -PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, - 11, 3, 2, PIPE_BITS, - 1000, 0, SSP0_CORE_ID, - 48000, 48000, 48000, - SCHEDULE_TIME_DOMAIN_TIMER, - PIPELINE_PLAYBACK_SCHED_COMP_1) + PIPELINE_SOURCE_1, 2, DAI_BITS, + 1000, 0, SSP0_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER) # capture DAI is SSP0 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 @@ -192,30 +186,10 @@ DAI_ADD(sof/pipe-dai-capture.m4, # playback DAI is SSP2 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 -# The 'NOT_USED_IGNORED' is due to dependencies and is adjusted later with an explicit dapm line. -DAI_ADD(sof/pipe-mixer-dai-playback.m4, +DAI_ADD(sof/pipe-dai-playback.m4, 5, SSP, SSP2_IDX, NoCodec-2, - NOT_USED_IGNORED, 2, DAI_BITS, - 1000, 0, SSP2_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER, 2, 48000) - -# Low Latency playback pipeline 5 on PCM 2 using max 2 channels of PIPE_BITS. -# Set 1000us deadline on core 0 with priority 0 -PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, - 8, 2, 2, PIPE_BITS, - 1000, 0, SSP2_CORE_ID, - 48000, 48000, 48000, - SCHEDULE_TIME_DOMAIN_TIMER, - PIPELINE_PLAYBACK_SCHED_COMP_5) - -# Deep buffer playback pipeline 12 on PCM 4 using max 2 channels of PIPE_BITS. -# Set 1000us deadline on core 2 with priority 0. -# TODO: Modify pipeline deadline to account for deep buffering -PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, - 12, 4, 2, PIPE_BITS, - 1000, 0, SSP2_CORE_ID, - 48000, 48000, 48000, - SCHEDULE_TIME_DOMAIN_TIMER, - PIPELINE_PLAYBACK_SCHED_COMP_5) + PIPELINE_SOURCE_5, 2, DAI_BITS, + 1000, 0, SSP2_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER) # capture DAI is SSP2 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 @@ -224,36 +198,10 @@ DAI_ADD(sof/pipe-dai-capture.m4, PIPELINE_SINK_6, 2, DAI_BITS, 1000, 0, SSP2_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER) -# Connect pipelines 7 and 11 to 1 -SectionGraph."Pipeline-1-11-7" { - index "0" - - lines [ - # PCM pipeline 7 to DAI pipeline 1 - dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_7) - # PCM pipeline 11 to DAI pipeline 1 - dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_11) - - ] -} - -# Connect pipelines 8 and 12 to 5 -SectionGraph."Pipeline-5-12-8" { - index "0" - - lines [ - # PCM pipeline 8 to DAI pipeline 5 - dapm(PIPELINE_MIXER_5, PIPELINE_SOURCE_8) - # PCM pipeline 12 to DAI pipeline 5 - dapm(PIPELINE_MIXER_5, PIPELINE_SOURCE_12) - - ] -} - dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) -PCM_DUPLEX_ADD(`Port'SSP0_IDX, 0, PIPELINE_PCM_7, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(`Port'SSP0_IDX, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) PCM_DUPLEX_ADD(`Port'SSP1_IDX, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) -PCM_DUPLEX_ADD(`Port'SSP2_IDX, 2, PIPELINE_PCM_8, PIPELINE_PCM_6) +PCM_DUPLEX_ADD(`Port'SSP2_IDX, 2, PIPELINE_PCM_5, PIPELINE_PCM_6) # # BE configurations - overrides config in ACPI if present From fbfc700dae8086a0c907cc6133d91b1dc52a21a9 Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Thu, 22 Jul 2021 12:14:17 -0700 Subject: [PATCH 3/4] topology1: sof-cavs-nocodec: convert all playback pipelines to mixer-based pipelines Convert all playback pipelines to have a mixer so adding a deep-buffer pipeline will be simpler. Signed-off-by: Ranjani Sridharan --- tools/topology/topology1/sof-cavs-nocodec.m4 | 85 ++++++++++++-------- 1 file changed, 52 insertions(+), 33 deletions(-) diff --git a/tools/topology/topology1/sof-cavs-nocodec.m4 b/tools/topology/topology1/sof-cavs-nocodec.m4 index 4e75668147e9..cc9860289565 100644 --- a/tools/topology/topology1/sof-cavs-nocodec.m4 +++ b/tools/topology/topology1/sof-cavs-nocodec.m4 @@ -105,13 +105,6 @@ dnl period, priority, core, dnl pcm_min_rate, pcm_max_rate, pipeline_rate, dnl time_domain, sched_comp) -# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of PIPE_BITS. -# Set 1000us deadline on core 2 with priority 0 -PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, - 1, 0, 2, PIPE_BITS, - 1000, 0, SSP0_CORE_ID, - 48000, 48000, 48000) - # Volume switch capture pipeline 2 on PCM 0 using max 2 channels of PIPE_BITS. # Set 1000us deadline on core 2 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-switch-capture.m4, @@ -119,13 +112,6 @@ PIPELINE_PCM_ADD(sof/pipe-volume-switch-capture.m4, 1000, 0, SSP0_CORE_ID, 48000, 48000, 48000) -# Low Latency playback pipeline 3 on PCM 1 using max 2 channels of PIPE_BITS. -# Set 1000us deadline on core 1 with priority 0 -PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, - 3, 1, 2, PIPE_BITS, - 1000, 0, SSP1_CORE_ID, - 48000, 48000, 48000) - # Volume switch capture pipeline 4 on PCM 1 using max 2 channels of PIPE_BITS. # Set 1000us deadline on core 1 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-switch-capture.m4, @@ -133,13 +119,6 @@ PIPELINE_PCM_ADD(sof/pipe-volume-switch-capture.m4, 1000, 0, SSP1_CORE_ID, 48000, 48000, 48000) -# Low Latency playback pipeline 5 on PCM 2 using max 2 channels of PIPE_BITS. -# Set 1000us deadline on core 0 with priority 0 -PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, - 5, 2, 2, PIPE_BITS, - 1000, 0, SSP2_CORE_ID, - 48000, 48000, 48000) - # Volume switch capture pipeline 6 on PCM 2 using max 2 channels of PIPE_BITS. # Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-switch-capture.m4, @@ -158,10 +137,20 @@ dnl deadline, priority, core, time_domain) # playback DAI is SSP0 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 -DAI_ADD(sof/pipe-dai-playback.m4, +# The 'NOT_USED_IGNORED' is due to dependencies and is adjusted later with an explicit dapm line. +DAI_ADD(sof/pipe-mixer-dai-playback.m4, 1, SSP, SSP0_IDX, NoCodec-0, - PIPELINE_SOURCE_1, 2, DAI_BITS, - 1000, 0, SSP0_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER) + NOT_USED_IGNORED, 2, DAI_BITS, + 1000, 0, SSP0_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER, 2, 48000) + +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of PIPE_BITS. +# Set 1000us deadline on core 2 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, + 7, 0, 2, PIPE_BITS, + 1000, 0, SSP0_CORE_ID, + 48000, 48000, 48000, + SCHEDULE_TIME_DOMAIN_TIMER, + PIPELINE_PLAYBACK_SCHED_COMP_1) # capture DAI is SSP0 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 @@ -172,10 +161,19 @@ DAI_ADD(sof/pipe-dai-capture.m4, # playback DAI is SSP1 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 -DAI_ADD(sof/pipe-dai-playback.m4, +DAI_ADD(sof/pipe-mixer-dai-playback.m4, 3, SSP, SSP1_IDX, NoCodec-1, - PIPELINE_SOURCE_3, 2, DAI_BITS, - 1000, 0, SSP1_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER) + NOT_USED_IGNORED, 2, DAI_BITS, + 1000, 0, SSP1_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER, 2, 48000) + +# Low Latency playback pipeline 8 on PCM 1 using max 2 channels of PIPE_BITS. +# Set 1000us deadline on core 2 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, + 8, 1, 2, PIPE_BITS, + 1000, 0, SSP1_CORE_ID, + 48000, 48000, 48000, + SCHEDULE_TIME_DOMAIN_TIMER, + PIPELINE_PLAYBACK_SCHED_COMP_3) # capture DAI is SSP1 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 @@ -186,10 +184,19 @@ DAI_ADD(sof/pipe-dai-capture.m4, # playback DAI is SSP2 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 -DAI_ADD(sof/pipe-dai-playback.m4, +DAI_ADD(sof/pipe-mixer-dai-playback.m4, 5, SSP, SSP2_IDX, NoCodec-2, - PIPELINE_SOURCE_5, 2, DAI_BITS, - 1000, 0, SSP2_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER) + NOT_USED_IGNORED, 2, DAI_BITS, + 1000, 0, SSP2_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER, 2, 48000) + +# Low Latency playback pipeline 9 on PCM 2 using max 2 channels of PIPE_BITS. +# Set 1000us deadline on core 2 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, + 9, 2, 2, PIPE_BITS, + 1000, 0, SSP2_CORE_ID, + 48000, 48000, 48000, + SCHEDULE_TIME_DOMAIN_TIMER, + PIPELINE_PLAYBACK_SCHED_COMP_5) # capture DAI is SSP2 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 @@ -198,10 +205,22 @@ DAI_ADD(sof/pipe-dai-capture.m4, PIPELINE_SINK_6, 2, DAI_BITS, 1000, 0, SSP2_CORE_ID, SCHEDULE_TIME_DOMAIN_TIMER) +SectionGraph."mixer-host" { + index "0" + + lines [ + # connect mixer dai pipelines to PCM pipelines + dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_7) + dapm(PIPELINE_MIXER_3, PIPELINE_SOURCE_8) + dapm(PIPELINE_MIXER_5, PIPELINE_SOURCE_9) + + ] +} + dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) -PCM_DUPLEX_ADD(`Port'SSP0_IDX, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) -PCM_DUPLEX_ADD(`Port'SSP1_IDX, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) -PCM_DUPLEX_ADD(`Port'SSP2_IDX, 2, PIPELINE_PCM_5, PIPELINE_PCM_6) +PCM_DUPLEX_ADD(`Port'SSP0_IDX, 0, PIPELINE_PCM_7, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(`Port'SSP1_IDX, 1, PIPELINE_PCM_8, PIPELINE_PCM_4) +PCM_DUPLEX_ADD(`Port'SSP2_IDX, 2, PIPELINE_PCM_9, PIPELINE_PCM_6) # # BE configurations - overrides config in ACPI if present From c4af1355ec137ff00b68a6e849d8de75932c727d Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Thu, 22 Jul 2021 12:38:09 -0700 Subject: [PATCH 4/4] topology1: sof-cavs-nocodec: Add deep buffer playback pipeline on SSP5 for BXT and SSP0 for all others. Signed-off-by: Ranjani Sridharan --- tools/topology/topology1/sof-cavs-nocodec.m4 | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tools/topology/topology1/sof-cavs-nocodec.m4 b/tools/topology/topology1/sof-cavs-nocodec.m4 index cc9860289565..0033d6174267 100644 --- a/tools/topology/topology1/sof-cavs-nocodec.m4 +++ b/tools/topology/topology1/sof-cavs-nocodec.m4 @@ -152,6 +152,17 @@ PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, SCHEDULE_TIME_DOMAIN_TIMER, PIPELINE_PLAYBACK_SCHED_COMP_1) +# Deep buffer playback pipeline 11 on PCM 3 using max 2 channels of PIPE_BITS. +# Set 1000us deadline on core 2 with priority 0. +# TODO: Modify pipeline deadline to account for deep buffering +ifelse(PLATFORM, `bxt', `', +`PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, + 11, 3, 2, PIPE_BITS, + 1000, 0, SSP0_CORE_ID, + 48000, 48000, 48000, + SCHEDULE_TIME_DOMAIN_TIMER, + PIPELINE_PLAYBACK_SCHED_COMP_1)') + # capture DAI is SSP0 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, @@ -198,6 +209,17 @@ PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, SCHEDULE_TIME_DOMAIN_TIMER, PIPELINE_PLAYBACK_SCHED_COMP_5) +# Deep buffer playback pipeline 11 on PCM 3 using max 2 channels of PIPE_BITS. +# Set 1000us deadline on core 2 with priority 0. +# TODO: Modify pipeline deadline to account for deep buffering +ifelse(PLATFORM, `bxt', +`PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, + 11, 3, 2, PIPE_BITS, + 1000, 0, SSP2_CORE_ID, + 48000, 48000, 48000, + SCHEDULE_TIME_DOMAIN_TIMER, + PIPELINE_PLAYBACK_SCHED_COMP_5)') + # capture DAI is SSP2 using 2 periods # Buffers use DAI_BITS format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, @@ -213,6 +235,9 @@ SectionGraph."mixer-host" { dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_7) dapm(PIPELINE_MIXER_3, PIPELINE_SOURCE_8) dapm(PIPELINE_MIXER_5, PIPELINE_SOURCE_9) + ifelse(PLATFORM, `bxt', + `dapm(PIPELINE_MIXER_5, PIPELINE_SOURCE_11)', + `dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_11)') ] } @@ -221,6 +246,9 @@ dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) PCM_DUPLEX_ADD(`Port'SSP0_IDX, 0, PIPELINE_PCM_7, PIPELINE_PCM_2) PCM_DUPLEX_ADD(`Port'SSP1_IDX, 1, PIPELINE_PCM_8, PIPELINE_PCM_4) PCM_DUPLEX_ADD(`Port'SSP2_IDX, 2, PIPELINE_PCM_9, PIPELINE_PCM_6) +ifelse(PLATFORM,`bxt', +`PCM_PLAYBACK_ADD(`Port'SSP2_IDX` Deep Buffer', 3, PIPELINE_PCM_11)', +`PCM_PLAYBACK_ADD(`Port'SSP0_IDX` Deep Buffer', 3, PIPELINE_PCM_11)') # # BE configurations - overrides config in ACPI if present