Skip to content

[BUG] Topologies build fails with current alsa-lib git main #10246

@singalsu

Description

@singalsu

Describe the bug
Topologies build with scripts/build-tools.sh fails.

[237/565] Generating sof-nocodec-bt-tgl.tplg
ALSA lib conf.c:1224:(parse_value) index is not an integer
ALSA lib conf.c:2014:(_snd_config_load_with_include) _toplevel_:224:27:Unexpected char
Unable not load configuration
FAILED: [code=1] topology/topology2/development/sof-nocodec-bt-tgl.tplg /home/singalsu/work/current/sof/sof/tools/build_tools/topology/topology2/development/sof-nocodec-bt-tgl.tplg 
cd /home/singalsu/work/current/sof/sof/tools/build_tools/topology/topology2/development && cat /home/singalsu/work/current/sof/sof/tools/build_tools/topology/topology2/development/../abi.conf /home/singalsu/work/current/sof/sof/tools/topology/topology2/development/../cavs-nocodec-bt.conf > sof-nocodec-bt-tgl.conf && ALSA_CONFIG_DIR=/home/singalsu/work/current/sof/sof/tools/topology/topology2 /home/singalsu/work/current/sof/sof/tools/../../tools/bin/alsatplg ${VERBOSE:+-v 1} -I /home/singalsu/work/current/sof/sof/tools/topology/topology2/development/../ -D 'PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-nocodec-bt-tgl.bin,PLATFORM=tgl' -p -c sof-nocodec-bt-tgl.conf -o sof-nocodec-bt-tgl.tplg
ninja: build stopped: subcommand failed.

Note: It's not known if the issue is in the patch below or does the alsatplg change trigger an issue in cavs-nocodec-bt.conf.

To Reproduce
Git clone alsa-lib from https://github.com/alsa-project/alsa-lib, build and install it.
Then
rm -rf tools/build_tools/
scripts/build-tools.sh

Reproduction Rate
Always

Expected behavior
Pass the build

Impact
showstopper, but can be avoided with revert of this commit:

commit d62b1d540781c61403681c1d903b7c74af6d1fa9 (HEAD -> master, origin/master, origin/HEAD)
Author: Jaroslav Kysela <perex@perex.cz>
Date:   Thu Sep 18 11:00:47 2025 +0200

    conf: fix parse_array_def override code path
    
    The error may cause segmentation fault and incorrect behaviour.
    
    Closes: https://github.com/alsa-project/alsa-lib/issues/477
    Signed-off-by: Jaroslav Kysela <perex@perex.cz>

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
  2. Name of the topology file
    • Topology: {FILE}
  3. Name of the platform(s) on which the bug is observed.
    • Platform: {PLATFORM}

Metadata

Metadata

Labels

P2Critical bugs or normal featuresbugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions