From 9e95cd288bc371581dcb0960b556d490bd825913 Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Tue, 16 May 2023 14:01:47 -0700 Subject: [PATCH] topology2: gain-capture: Use host-copier Replace the generic copier with host-copier in the class definition and the instances. Signed-off-by: Ranjani Sridharan --- tools/topology/topology2/cavs-nocodec.conf | 14 ++++++++++++-- .../include/pipelines/cavs/gain-capture.conf | 13 +++---------- .../topology2/platform/intel/dmic-generic.conf | 7 ++++++- .../platform/intel/google-rtc-aec-reference.conf | 7 ++++++- 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/tools/topology/topology2/cavs-nocodec.conf b/tools/topology/topology2/cavs-nocodec.conf index da4f5ac7b..b12c3b2f3 100644 --- a/tools/topology/topology2/cavs-nocodec.conf +++ b/tools/topology/topology2/cavs-nocodec.conf @@ -629,8 +629,9 @@ IncludeByKey.PASSTHROUGH { Object.Widget.pipeline.1 { stream_name "DMIC0 Raw" } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name "Gain Capture 18" + pcm_id 27 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -684,8 +685,9 @@ IncludeByKey.PASSTHROUGH { Object.Widget.pipeline.1 { stream_name "DMIC0 Raw 2" } - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name "Gain Capture 20" + pcm_id 28 num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -885,6 +887,14 @@ IncludeByKey.PASSTHROUGH { source 'host-copier.2.playback' sink 'gain.5.1' } + { + source "gain.18.1" + sink "host-copier.27.capture" + } + { + source "gain.20.1" + sink "host-copier.28.capture" + } ] } "true" { diff --git a/tools/topology/topology2/include/pipelines/cavs/gain-capture.conf b/tools/topology/topology2/include/pipelines/cavs/gain-capture.conf index 371991dbf..57e65070b 100644 --- a/tools/topology/topology2/include/pipelines/cavs/gain-capture.conf +++ b/tools/topology/topology2/include/pipelines/cavs/gain-capture.conf @@ -18,7 +18,7 @@ # - + @@ -45,11 +45,11 @@ Class.Pipeline."gain-capture" { } Object.Widget { - copier."1" { - copier_type "host" + host-copier."1" { type "aif_out" num_input_audio_formats 3 num_output_audio_formats 3 + num_input_pins 1 # 16-bit 48KHz 2ch Object.Base.audio_format.1 { in_bit_depth 32 @@ -107,13 +107,6 @@ Class.Pipeline."gain-capture" { } } - Object.Base { - route."1" { - source "gain.$index.1" - sink "copier.host.$index.1" - } - } - direction "capture" dynamic_pipeline 1 time_domain "timer" diff --git a/tools/topology/topology2/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf index 34fc26afa..7aa68f9f5 100644 --- a/tools/topology/topology2/platform/intel/dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/dmic-generic.conf @@ -73,9 +73,10 @@ IncludeByKey.PASSTHROUGH { format $FORMAT index $DMIC0_HOST_PIPELINE_ID - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name $DMIC0_PCM_CAPS core_id $DMIC_CORE_ID + pcm_id $DMIC0_PCM_ID num_input_audio_formats 2 num_output_audio_formats 2 Object.Base.audio_format.1 { @@ -248,6 +249,10 @@ IncludeByKey.PASSTHROUGH { source $DMIC0_DAI_PIPELINE_SRC sink $DMIC0_HOST_PIPELINE_SINK } + { + source "gain.$DMIC0_HOST_PIPELINE_ID.1" + sink "host-copier.$DMIC0_PCM_ID.capture" + } ] } "true" { diff --git a/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf b/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf index e7c641468..9b0cd412f 100644 --- a/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf +++ b/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf @@ -31,8 +31,9 @@ Object.Pipeline.gain-capture [ { index 20 - Object.Widget.copier.1 { + Object.Widget.host-copier.1 { stream_name "DMIC0 AN" + pcm_id 28 } Object.Widget.gain.1 { @@ -95,4 +96,8 @@ Object.Base.route [ source "module-copier.18.2" sink "gain.20.1" } + { + source "gain.20.1" + sink "host-copier.28.capture" + } ]