From 1faf0557554a04a06d4fd66d01c0585c0dfdfd3c Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Mon, 14 Nov 2022 09:40:29 +0800 Subject: [PATCH] topology2: cavs-sdw: use macro to define SDW jack stream and id Define macro for SoundWire jack stream name and BE id. Signed-off-by: Bard Liao --- tools/topology/topology2/cavs-sdw.conf | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/topology/topology2/cavs-sdw.conf b/tools/topology/topology2/cavs-sdw.conf index 63cdb96b5..068c22243 100644 --- a/tools/topology/topology2/cavs-sdw.conf +++ b/tools/topology/topology2/cavs-sdw.conf @@ -55,6 +55,10 @@ Define { DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1' DEEP_BUFFER_PIPELINE_SINK 'mixout.2.1' DEEP_BUFFER_PCM_NAME 'Deepbuffer Jack Out' + SDW_JACK_OUT_STREAM 'SDW0-Playback' + SDW_JACK_IN_STREAM 'SDW0-Capture' + SDW_JACK_OUT_BE_ID 0 + SDW_JACK_IN_BE_ID 1 } # include DMIC config if needed. @@ -82,9 +86,9 @@ IncludeByKey.DEEPBUFFER_FW_DMA_MS{ #ALH Index: 0, Direction: duplex Object.Dai { ALH."2" { - id 0 + id $SDW_JACK_OUT_BE_ID direction "playback" - name SDW0-Playback + name $SDW_JACK_OUT_STREAM default_hw_conf_id 0 rate 48000 channels 2 @@ -94,9 +98,9 @@ Object.Dai { } } ALH."3" { - id 1 + id $SDW_JACK_IN_BE_ID direction "capture" - name SDW0-Capture + name $SDW_JACK_IN_STREAM default_hw_conf_id 1 rate 48000 channels 2 @@ -132,7 +136,7 @@ Object.Pipeline { Object.Widget.pipeline.1.stream_name "copier.ALH.2.1" Object.Widget.copier.1 { - stream_name 'SDW0-Playback' + stream_name $SDW_JACK_OUT_STREAM dai_type "ALH" copier_type "ALH" node_type $ALH_LINK_OUTPUT_CLASS @@ -163,7 +167,7 @@ Object.Pipeline { stream_name 'copier.ALH.3.1' } Object.Widget.copier.1 { - stream_name 'SDW0-Capture' + stream_name $SDW_JACK_IN_STREAM dai_type "ALH" copier_type "ALH" type "dai_out"