Repository navigation
topology: Import SOF topologies (topology1, topology2, test/topology) and standalone build/install tooling - #1
Merged
Conversation
lgirdwood
marked this pull request as ready for review
November 8, 2026 14:16
… and standalone build/install tooling Migrate ALSA topology sources (topology1, topology2, and test/topology) from the sof repository into sof-topologies along with standalone CMake build, installation, CPack packaging, validation tooling, and dual-repo synchronization support. Key changes: - topology1/, topology2/, test/topology/: - Import all v1 M4-based IPC3 topologies, v2 alsaconf class-based IPC4 & IPC3 topologies, and component/SSP/DMIC test topology generators from sof. - Decouple ABI manifest generation (topology1/get_abi.sh and topology2/get_abi.sh) using an in-tree include/kernel/abi.h header with optional -DSOF_ABI_HEADER override. - CMakeLists.txt & cmake/alsatplg.cmake: - Add top-level standalone CMake project (SOF_TOPOLOGY) with BUILD_TOPOLOGY1, BUILD_TOPOLOGY2, BUILD_DEV_TOPOLOGIES, BUILD_TEST_TOPOLOGIES, and TPLG_SEQUENTIAL_BUILD options. - Automatically resolve alsatplg, LD_LIBRARY_PATH, and ALSA_TOPOLOGY_PLUGIN_DIR so NHLT and pre-processor plugins are relocatable across workspaces. - Add standard cmake --install rules (ipc3-prod, ipc4-prod, and dev components with sof-ace-tplg symlink creation) and CPack TGZ archive generation. - scripts/: - Add scripts/build-topology.sh (-T, -1/-X, -2/-Y, -t, -s, -A, -C, -L compatibility link mode, -i install, -p package). - Add scripts/build-alsa-tools.sh to clone and build pinned alsa-lib and alsa-utils. - Add scripts/install-topology.sh supporting local /lib/firmware, offline/NFS rootfs (--rootfs), versioned sof-bin release trees (--sof-bin --version), and remote SSH DUT deployment (--ssh). - Add scripts/sync-from-sof.sh (--pull, --push, --check) to keep sof and sof-topologies synchronized during the CI transition period while leaving Octave module tuning scripts in sof. - tools/ & CI: - Add tools/validate-tplg.py, tools/tplgtool2.py, and tools/pretty-macro.sh wired into CTest (4 validation suites verifying binary block headers, manifests, symlinks, and PCM parsing). - Add .github/workflows/topology.yml GitHub Actions workflow. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
lgirdwood
force-pushed
the
initial-topology-import
branch
from
November 8, 2026 14:18
91c1f26 to
d7319ac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Imports the Sound Open Firmware (SOF) ALSA topology definitions (
topology1,topology2, andtest/topology) fromthesofproject/sofintosof-topologies, alongside standalone CMake build, installation, packaging, binary validation tooling, and dual-repo synchronization scripts to support a seamless CI transition.Included Components
Core Topology Sources:
topology1/: Legacym4-based IPC3 topologies (i.MX8,i.MX8MP,i.MX8ULP,i.MX93,i.MX95,MediaTek MT8186/8188/8195/8196/8365,AMD ACP,CAVS nocodec) andtopology1/get_abi.sh.topology2/: Class-basedalsatplg -pIPC4 & IPC3 topologies (Intel CAVS 2.5,ACE 1.x/2.x/3.x/4.x,HDA generic,SDCA generic,i.MX8,CHT, andsof-testbench4development/benchmark graphs) andtopology2/get_abi.sh.test/topology/: Automated component, SSP, and DMIC test topology matrix (tplg-build.sh).include/kernel/abi.h: Standalone SOF ABI version header (overridable via-DSOF_ABI_HEADER=/path/to/abi.h).tools/tune/andsrc/audio/*/tune/) remain insofalongside the audio modules.Standalone Build, Install & Packaging (
CMakeLists.txt&cmake/alsatplg.cmake):BUILD_TOPOLOGY1,BUILD_TOPOLOGY2,BUILD_DEV_TOPOLOGIES,BUILD_TEST_TOPOLOGIES,TPLG_SEQUENTIAL_BUILD,SOF_TPLG_VERSION_SUFFIX,SOF_TPLG_INSTALL_VENDOR_DIR.alsatplg(-DALSATPLG_CMD,$ALSATPLG,${SOF_WORKSPACE}/tools/bin/alsatplg,../tools/bin/alsatplg, orPATH) with relocatableLD_LIBRARY_PATHandALSA_TOPOLOGY_PLUGIN_DIRconfiguration for NHLT and pre-processor plugins.cmake --installcomponent rules (ipc3-prod,ipc4-prod,dev) installingsof-tplg,sof-ipc4-tplg, and thesof-ace-tplgsymlink, plusCPacktarball packaging (sof-topology-<abi>-Linux.tar.gz).Scripts & Dual-Repo CI Transition Tooling (
scripts/&tools/):scripts/build-topology.sh: CLI build driver supporting-T(all),-1/-X(topology1),-2/-Y(topology2),-t(test topologies),-s(sequential),-A(build localalsa-lib/alsa-utils),-L(compatibility symlinks into../sof/tools/build_tools/topology),-i <dir>(install), and-p(package).scripts/build-alsa-tools.sh: Clones and builds pinnedthesofproject/alsa-libandthesofproject/alsa-utils.scripts/install-topology.sh: Deploys.tplgbinaries to/lib/firmware/intel(--dest), an offline/NFS rootfs (--rootfs), a versionedsof-binrelease directory (--sof-bin ... --version ...), or directly to a DUT over SSH (--ssh root@<dut>).scripts/sync-from-sof.sh: Synchronizes topology sources (--pull,--push,--check) betweensofandsof-topologieswhile CI systems transition.tools/validate-tplg.py,tools/tplgtool2.py, andtools/pretty-macro.sh: Wired intoctest --test-dir buildand.github/workflows/topology.yml.Verification
topology1and 595topology2targets via./scripts/build-topology.sh -T.ctest --test-dir build --output-on-failure(4/4 validation suites passed across all 94 IPC3 production, 253 IPC4 production, and 248 development.tplgbinaries).cmake --install,./scripts/install-topology.sh,./scripts/build-topology.sh -p, and./scripts/sync-from-sof.sh --check.