Skip to content

topology2: tplg-targets-ace3.cmake: Correct the platform for WCL dmic… - #11161

Closed
ujfalusi wants to merge 1 commit into
thesofproject:mainfrom
ujfalusi:peter/pr/wcl-dmic
Closed

topology2: tplg-targets-ace3.cmake: Correct the platform for WCL dmic…#11161
ujfalusi wants to merge 1 commit into
thesofproject:mainfrom
ujfalusi:peter/pr/wcl-dmic

Conversation

@ujfalusi

@ujfalusi ujfalusi commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

… fragments

There is no platform as wcl defined since it is identical to PTL. For the DMIC blob creation a correct platform is needed and in case of PLATFORM=wcl, this is not going to happen.

Use the correct PLATFORM=wcl to build working DMIC blobs.

… fragments

There is no platform as wcl defined since it is identical to PTL.
For the DMIC blob creation a correct platform is needed and in case of
PLATFORM=wcl, this is not going to happen.

Use the correct PLATFORM=wcl to build working DMIC blobs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Copilot AI lite review requested due to automatic review settings September 3, 2026 10:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is a straightforward correction to platform key usage with low risk, with only a minor PR-description/comment clarity nit noted.

Pull request overview

This PR adjusts topology2 build target definitions so the WCL DMIC topologies use the PTL platform key, aligning with the existing platform override set (PTL exists; WCL does not appear to have its own platform override file).

Changes:

  • Update all sof-wcl-dmic-* topology target tuples to use PLATFORM=ptl instead of PLATFORM=wcl.
File summaries
File Description
tools/topology/topology2/production/tplg-targets-ace3.cmake Switch WCL DMIC target tuples to PLATFORM=ptl to match available platform overrides and enable correct DMIC blob preprocessing.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@@ -304,42 +304,42 @@ NHLT_BIN=nhlt-sof-ptl-dmic-4ch-id5.bin,DMIC0_ENHANCED_CAPTURE=true,\
EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default"

# for WCL

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I will not update the patch, it is obvious from the code what it does.

@ujfalusi

ujfalusi commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

2.15 candidate

@intel-sofci

Copy link
Copy Markdown

PR 11161: test results

Run date: 2026-09-03 11:21 UTC

Tested commit: 172e216911023c172f1a9db294143196c51cfc71

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Seems to be only place where "PLATFORM=wcl" was used. FYI @lgirdwood , definitely v2.15 material, we have shipped these buggy topologies in sof-bin-2025.12.

@kv2019i kv2019i added this to the v2.15 milestone Sep 3, 2026
@kv2019i

kv2019i commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

@bardliao @singalsu can one of you double-check?

@bardliao

bardliao commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Or include platform/intel/ptl.conf when PLATFORM="wcl"? Like

IncludeByKey.PLATFORM {
        "mtl"   "platform/intel/mtl.conf"
        "lnl"   "platform/intel/lnl.conf"
        "ptl"   "platform/intel/ptl.conf"
        "wcl"   "platform/intel/ptl.conf"
}

@ujfalusi

ujfalusi commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Or include platform/intel/ptl.conf when PLATFORM="wcl"? Like

IncludeByKey.PLATFORM {
        "mtl"   "platform/intel/mtl.conf"
        "lnl"   "platform/intel/lnl.conf"
        "ptl"   "platform/intel/ptl.conf"
        "wcl"   "platform/intel/ptl.conf"
}

or that, but:

$ git grep "IncludeByKey.PLATFORM" tools/ | wc -l
15

and some have ptl, some don't, some have ptl+nvl, some only ptl, I'm not sure what should be modified, but a hunch is where ptl and nvl also listed.. PTL and WCL are ACE3, NVL is ACE4.
If you know which IncludeByKey.PLATFORM should be modified, then OK, but I don't want to guess.

@bardliao

bardliao commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

For now, only tools/topology/topology2/cavs-sdw.conf. But I would like to add "wcl" "platform/intel/ptl.conf" to all IncludeByKey.PLATFORM {} to suppot wcl.

@ujfalusi

ujfalusi commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

For now, only tools/topology/topology2/cavs-sdw.conf. But I would like to add "wcl" "platform/intel/ptl.conf" to all IncludeByKey.PLATFORM {} to suppot wcl.

and at the same time the nvl as well, no? Do we have nvl-s as well as PLATFORM?

I'm fine with that also, if you do, then ping me and I'll close this PR for that, if that is better, but WCL is just a PTL variant at the end, so it is a PTL platform.

Either way is fine for me. @kv2019i, @lgirdwood , thoughts?

@bardliao

bardliao commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

For now, only tools/topology/topology2/cavs-sdw.conf. But I would like to add "wcl" "platform/intel/ptl.conf" to all IncludeByKey.PLATFORM {} to suppot wcl.

and at the same time the nvl as well, no? Do we have nvl-s as well as PLATFORM?

I'm fine with that also, if you do, then ping me and I'll close this PR for that, if that is better, but WCL is just a PTL variant at the end, so it is a PTL platform.

Either way is fine for me. @kv2019i, @lgirdwood , thoughts?

Fair enough. Let's go with this approach.

@ujfalusi

ujfalusi commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

@kv2019i, @lgirdwood, @bardliao, what about not creating these functions, but just use symlinks?
sof-wcl-dmic-2ch-id2 -> sof-ptl-dmic-2ch-id2
sof-wcl-dmic-2ch-id3 -> sof-ptl-dmic-2ch-id3
...
It would save space. I would actually do this for quite many of the topologies, we have several with the same md5sum..

@bardliao

bardliao commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

@kv2019i, @lgirdwood, @bardliao, what about not creating these functions, but just use symlinks? sof-wcl-dmic-2ch-id2 -> sof-ptl-dmic-2ch-id2 sof-wcl-dmic-2ch-id3 -> sof-ptl-dmic-2ch-id3 ... It would save space. I would actually do this for quite many of the topologies, we have several with the same md5sum..

I am fine with that. But how do we deploy?


# for WCL
"cavs-sdw\;sof-wcl-dmic-2ch-id2\;PLATFORM=wcl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=2,\
"cavs-sdw\;sof-wcl-dmic-2ch-id2\;PLATFORM=ptl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=2,\

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this better than duplicating platform/intel/ptl.conf to wcl.conf? It's just few lines.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@singalsu, I don't know where to add the wcl...
#11161 (comment)
and
#11161 (comment)

WCL is PTL, it just got rather unique name, like ADL in TGL family...

Again, of you know where we need to add nvl, nvl-s, ptl, wcl, that can work as well, I just don't feel confident on where to put and if we put wcl, we also should fix the other missing platform 'aliases'

@ujfalusi ujfalusi Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bardliao, this can create symlinks via cmake, it looks right in production, but after deploy the symlink is gone and the file is created..

diff --git a/tools/topology/CMakeLists.txt b/tools/topology/CMakeLists.txt
index 263bc8a4f75f..d75ff70ece47 100644
--- a/tools/topology/CMakeLists.txt
+++ b/tools/topology/CMakeLists.txt
@@ -111,6 +111,14 @@ macro(add_alsatplg2_command conf_header conf_target input_name output_name inclu
 		)
 endmacro()
 
+macro(symlink_topologies target link)
+	add_custom_command(
+		OUTPUT ${link}.tplg
+		COMMAND ${CMAKE_COMMAND} -E create_symlink ${target}.tplg ${link}.tplg
+		DEPENDS ${target}.tplg
+	)
+endmacro()
+
 
 add_custom_target(topologies ALL)
 add_dependencies(topologies topologies1)
diff --git a/tools/topology/topology2/production/CMakeLists.txt b/tools/topology/topology2/production/CMakeLists.txt
index c2cb86400e4b..06584b1918e5 100644
--- a/tools/topology/topology2/production/CMakeLists.txt
+++ b/tools/topology/topology2/production/CMakeLists.txt
@@ -32,3 +32,17 @@ foreach(tplg ${TPLGS})
 	add_custom_target(topology2_prod_${output} DEPENDS ${output}.tplg)
 	add_dependencies(topology2_prod topology2_prod_${output})
 endforeach()
+
+foreach(link ${SYMLINKS})
+	list(LENGTH link length)
+	if(NOT length EQUAL 2)
+		message(FATAL_ERROR "SYMLINKS entry '${link}' must have exactly 2 elements (link_name;link_target), got ${length}")
+	endif()
+	list(GET link 0 link_name)
+	list(GET link 1 link_target)
+
+	symlink_topologies("${link_target}" "${link_name}")
+
+	add_custom_target(topology2_prod_${link_name} DEPENDS ${link_name}.tplg)
+	add_dependencies(topology2_prod topology2_prod_${link_name})
+endforeach()
diff --git a/tools/topology/topology2/production/tplg-targets-ace3.cmake b/tools/topology/topology2/production/tplg-targets-ace3.cmake
index 0533fdb275fc..a24ad1a515bd 100644
--- a/tools/topology/topology2/production/tplg-targets-ace3.cmake
+++ b/tools/topology/topology2/production/tplg-targets-ace3.cmake
@@ -303,47 +303,6 @@ PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=5,DMIC1_ID=6,PREPROCESS_PLUGINS
 NHLT_BIN=nhlt-sof-ptl-dmic-4ch-id5.bin,DMIC0_ENHANCED_CAPTURE=true,\
 EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default"
 
-# for WCL
-"cavs-sdw\;sof-wcl-dmic-2ch-id2\;PLATFORM=ptl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=2,\
-PDM1_MIC_A_ENABLE=0,PDM1_MIC_B_ENABLE=0,DMIC0_ID=2,DMIC1_ID=3,PREPROCESS_PLUGINS=nhlt,\
-NHLT_BIN=nhlt-sof-wcl-dmic-2ch-id2.bin,DMIC0_ENHANCED_CAPTURE=true,\
-EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,EFX_DMIC0_DRC_PARAMS=dmic_default"
-
-"cavs-sdw\;sof-wcl-dmic-2ch-id3\;PLATFORM=ptl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=2,\
-PDM1_MIC_A_ENABLE=0,PDM1_MIC_B_ENABLE=0,DMIC0_ID=3,DMIC1_ID=4,PREPROCESS_PLUGINS=nhlt,\
-NHLT_BIN=nhlt-sof-wcl-dmic-2ch-id3.bin,DMIC0_ENHANCED_CAPTURE=true,\
-EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,EFX_DMIC0_DRC_PARAMS=dmic_default"
-
-"cavs-sdw\;sof-wcl-dmic-2ch-id4\;PLATFORM=ptl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=2,\
-PDM1_MIC_A_ENABLE=0,PDM1_MIC_B_ENABLE=0,DMIC0_ID=4,DMIC1_ID=5,PREPROCESS_PLUGINS=nhlt,\
-NHLT_BIN=nhlt-sof-wcl-dmic-2ch-id4.bin,DMIC0_ENHANCED_CAPTURE=true,\
-EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,EFX_DMIC0_DRC_PARAMS=dmic_default"
-
-"cavs-sdw\;sof-wcl-dmic-2ch-id5\;PLATFORM=ptl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=2,\
-PDM1_MIC_A_ENABLE=0,PDM1_MIC_B_ENABLE=0,DMIC0_ID=5,DMIC1_ID=6,PREPROCESS_PLUGINS=nhlt,\
-NHLT_BIN=nhlt-sof-wcl-dmic-2ch-id5.bin,DMIC0_ENHANCED_CAPTURE=true,\
-EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,EFX_DMIC0_DRC_PARAMS=dmic_default"
-
-"cavs-sdw\;sof-wcl-dmic-4ch-id2\;PLATFORM=ptl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=4,\
-PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=2,DMIC1_ID=3,PREPROCESS_PLUGINS=nhlt,\
-NHLT_BIN=nhlt-sof-wcl-dmic-4ch-id2.bin,DMIC0_ENHANCED_CAPTURE=true,\
-EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default"
-
-"cavs-sdw\;sof-wcl-dmic-4ch-id3\;PLATFORM=ptl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=4,\
-PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,PREPROCESS_PLUGINS=nhlt,\
-NHLT_BIN=nhlt-sof-wcl-dmic-4ch-id3.bin,DMIC0_ENHANCED_CAPTURE=true,\
-EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default"
-
-"cavs-sdw\;sof-wcl-dmic-4ch-id4\;PLATFORM=ptl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=4,\
-PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=4,DMIC1_ID=5,PREPROCESS_PLUGINS=nhlt,\
-NHLT_BIN=nhlt-sof-wcl-dmic-4ch-id4.bin,DMIC0_ENHANCED_CAPTURE=true,\
-EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default"
-
-"cavs-sdw\;sof-wcl-dmic-4ch-id5\;PLATFORM=ptl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=4,\
-PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=5,DMIC1_ID=6,PREPROCESS_PLUGINS=nhlt,\
-NHLT_BIN=nhlt-sof-wcl-dmic-4ch-id5.bin,DMIC0_ENHANCED_CAPTURE=true,\
-EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default"
-
 "cavs-es83x6\;sof-ptl-ssp1-jack-id0\;PLATFORM=ptl,PREPROCESS_PLUGINS=nhlt,\
 NHLT_BIN=nhlt-sof-ptl-ssp1-jack-id0.bin,HEADSET_SSP_DAI_INDEX=1,\
 HEADSET_CODEC=true,HEADSET_CODEC_NAME=SSP1-Codec,NUM_HDMIS=0,\
@@ -376,3 +335,14 @@ BT_CP_HOST_PIPELINE_ID=201,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-ssp2-bt
 HEADSET_CODEC=false,HDMI_IN_CAPTURE=false,BT_ID=10,BT_PCM_ID=20,BT_PCM_NAME=Bluetooth,\
 BT_CP_HOST_PIPELINE_ID=201,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-ssp2-bt-id10.bin"
 )
+
+list(APPEND SYMLINKS
+"sof-wcl-dmic-2ch-id2\;sof-ptl-dmic-2ch-id2"
+"sof-wcl-dmic-2ch-id3\;sof-ptl-dmic-2ch-id3"
+"sof-wcl-dmic-2ch-id4\;sof-ptl-dmic-2ch-id4"
+"sof-wcl-dmic-2ch-id5\;sof-ptl-dmic-2ch-id5"
+"sof-wcl-dmic-4ch-id2\;sof-ptl-dmic-4ch-id2"
+"sof-wcl-dmic-4ch-id3\;sof-ptl-dmic-4ch-id3"
+"sof-wcl-dmic-4ch-id4\;sof-ptl-dmic-4ch-id4"
+"sof-wcl-dmic-4ch-id5\;sof-ptl-dmic-4ch-id5"
+)

even if I change the copy_if_different to copy, it still not preserves the symlink, but probably still better for deduping the cmake rules for identical topologies?

diff updated. We could do the deploy by

diff --git a/tools/topology/topology2/CMakeLists.txt b/tools/topology/topology2/CMakeLists.txt
index 2a1ee5483e7e..813223c233ff 100644
--- a/tools/topology/topology2/CMakeLists.txt
+++ b/tools/topology/topology2/CMakeLists.txt
@@ -9,8 +9,9 @@ add_custom_target(topologies2 ALL
     COMMAND ${CMAKE_COMMAND} -E create_symlink sof-ipc4-tplg ${CMAKE_CURRENT_BINARY_DIR}/target/sof-ace-tplg
     COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/target/development
     # copy the topology files only to target
-    COMMAND ${CMAKE_COMMAND} -E copy_if_different production/*.tplg ${CMAKE_CURRENT_BINARY_DIR}/target/sof-ipc4-tplg/
-    COMMAND ${CMAKE_COMMAND} -E copy_if_different development/*.tplg ${CMAKE_CURRENT_BINARY_DIR}/target/development/
+    COMMAND sh -c "cp -a production/*.tplg ${CMAKE_CURRENT_BINARY_DIR}/target/sof-ipc4-tplg/"
+    COMMAND sh -c "cp -a development/*.tplg ${CMAKE_CURRENT_BINARY_DIR}/target/development/"
+
 )
 
 # Check alsatplg version and build topology2 if alsatplg version is

and preserve the symlinks...

@ujfalusi

ujfalusi commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

replaced by: #11174

@ujfalusi ujfalusi closed this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants