Skip to content

Tools: Topology2: Add 24 kHz rate to topologies with SRC#10597

Open
singalsu wants to merge 4 commits into
thesofproject:mainfrom
singalsu:tplg_add_24k_rate_to_src_pcms
Open

Tools: Topology2: Add 24 kHz rate to topologies with SRC#10597
singalsu wants to merge 4 commits into
thesofproject:mainfrom
singalsu:tplg_add_24k_rate_to_src_pcms

Conversation

@singalsu

@singalsu singalsu commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator

This patch adds the missing 24 kHz rate that is used with MPEG-2 standard based and other codecs. The support started with Linux kernel 6.12.

Note: Build of these topologies needs alsa-lib version TBD.

@singalsu

singalsu commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator Author

Topologies build in SOF CI fails with:

ALSA lib pcm.c:366:(split_rate) unsupported stream rate 24000

Need to have alsa-lib with patch alsa-project/alsa-lib#497

@singalsu

singalsu commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator Author

This PR also depends on #10598 . We can't update alsa-lib with 24 kHz rate support without fixing the topology build issue.

@lgirdwood

Copy link
Copy Markdown
Member

This PR also depends on #10598 . We can't update alsa-lib with 24 kHz rate support without fixing the topology build issue.

Merged. Non draft ?

@singalsu

singalsu commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator Author

This PR also depends on #10598 . We can't update alsa-lib with 24 kHz rate support without fixing the topology build issue.

Merged. Non draft ?

I need to wait for Perex to merge the alsa-lib patch.

@lgirdwood

Copy link
Copy Markdown
Member

This PR also depends on #10598 . We can't update alsa-lib with 24 kHz rate support without fixing the topology build issue.

Merged. Non draft ?

I need to wait for Perex to merge the alsa-lib patch.

Fyi @singalsu now merged.

@singalsu

Copy link
Copy Markdown
Collaborator Author

This PR also depends on #10598 . We can't update alsa-lib with 24 kHz rate support without fixing the topology build issue.

Merged. Non draft ?

I need to wait for Perex to merge the alsa-lib patch.

Fyi @singalsu now merged.

He has before closed the PR when merged (alsa-project/alsa-lib#497) but it's still open and I can't see "24 kHz" in latest commit titles.

@singalsu

Copy link
Copy Markdown
Collaborator Author

He has before closed the PR when merged (alsa-project/alsa-lib#497) but it's still open and I can't see "24 kHz" in latest commit titles.

I pinged today Perex on the alsa-lib PR, hope he responds.

@singalsu singalsu marked this pull request as ready for review May 29, 2026 15:37
@singalsu singalsu requested a review from ranj063 as a code owner May 29, 2026 15:37
Copilot AI review requested due to automatic review settings May 29, 2026 15:37
@singalsu singalsu requested a review from jsarha as a code owner May 29, 2026 15:37

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@singalsu singalsu force-pushed the tplg_add_24k_rate_to_src_pcms branch from 7dd260d to bc9a8fc Compare June 2, 2026 14:06
This change updates to Release v1.2.16, needed for extended
sample rates add to SOF topologies.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the tplg_add_24k_rate_to_src_pcms branch from bc9a8fc to 44c5302 Compare June 2, 2026 14:14
@singalsu singalsu requested a review from Copilot June 2, 2026 14:15

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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@singalsu singalsu force-pushed the tplg_add_24k_rate_to_src_pcms branch from 44c5302 to 50f0f06 Compare June 2, 2026 14:36
This patch updates the commits to Release v1.2.16. It is needed
to build topologies with extended sample rates.

The autoconf install is needed due to dependency from alsa-lib.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the tplg_add_24k_rate_to_src_pcms branch from 50f0f06 to 02bdca6 Compare June 2, 2026 15:27
@lgirdwood

Copy link
Copy Markdown
Member

LGTM @singalsu , but do we have the wrong ALSA commit id ?

ALSA lib pcm.c:366:(split_rate) unsupported stream rate 24000
ALSA lib parser.c:211:(tplg_load_config) failed to parse topology
Unable to load configuration: Invalid argument
FAILED: topology/topology2/development/sof-mtl-sdw-benchmark-sound_dose16-sdw0.tplg /home/sof/work/sof.git/tools/build_tools/topology/topology2/development/sof-mtl-sdw-benchmark-sound_dose16-sdw0.tplg 
cd /home/sof/work/sof.git/tools/build_tools/topology/topology2/development && cat /home/sof/work/sof.git/tools/build_tools/topology/topology2/development/../abi.conf /home/sof/work/sof.git/tools/topology/topology2/development/../cavs-benchmark-sdw.conf > sof-mtl-sdw-benchmark-sound_dose16-sdw0.conf && ALSA_CONFIG_DIR=/home/sof/work/sof.git/tools/topology/topology2 /home/sof/work/sof.git/tools/../../tools/bin/alsatplg ${VERBOSE:+-v 1} -I /home/sof/work/sof.git/tools/topology/topology2/development/../ -D 'PLATFORM=mtl,BENCH_MODULE_FORMAT=s16,BENCH_CONFIG=sound_dose16,BENCH_SOUND_DOSE_PARAMS=default' -p -c sof-mtl-sdw-benchmark-sound_dose16-sdw0.conf -o sof-mtl-sdw-benchmark-sound_dose16-sdw0.tplg
ninja: build stopped: subcommand failed.
Error: Process completed with exit code 1.

@singalsu

singalsu commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

LGTM @singalsu , but do we have the wrong ALSA commit id ?

Not wrong but I need to replace the build-tools docker container (no more maintainer for it) based test tools.yml with native version as e.g. testbench.yml.

singalsu added 2 commits June 5, 2026 18:32
The pre-built thesofproject/sof docker image carries an older
alsa-lib / alsa-utils that no longer matches the versions required to
build the current SOF user-space tools (in particular alsatplg used by
the topology2 build). This patch moves the user-space tools build off
docker and build it directly on the ubuntu-24.04 runner.

  - install the toolchain via apt
  - bootstrap autoconf 2.72 (Ubuntu 24.04 ships 2.71)
  - build the SOF forks of alsa-lib and alsa-utils at the same pinned
    commits used by testbench.yml
  - run scripts/build-tools.sh with PKG_CONFIG_PATH / LD_LIBRARY_PATH /
    PATH pointed at the freshly built ALSA tree

The SOF-alsa-plugin job in the same workflow was already native and is
left unchanged. The only consumer of this reusable workflow
(daily-tests.yml) is unaffected by the internal switch.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the missing 24 kHz rate that is used with
MPEG-2 standard based and other codecs. The support started
with Linux kernel 6.12.

Note: Build of these topologies needs alsa-lib version TBD.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the tplg_add_24k_rate_to_src_pcms branch from 02bdca6 to c8f9145 Compare June 5, 2026 15:33
@singalsu

singalsu commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

LGTM @singalsu , but do we have the wrong ALSA commit id ?

Not wrong but I need to replace the build-tools docker container (no more maintainer for it) based test tools.yml with native version as e.g. testbench.yml.

@lgirdwood The build-tools step passed with the added workflow commit. Please review it too.

@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.

Seems this is going to be a bit of a mess if SOF cannot be built with 24.04 anymore, but alas it is what is. 26.04 is now out.

sudo make install
hash -r
autoconf --version | head -n1

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.

@singalsu I wonder if easier change would be change s/24.04/26.04/ on line 36 of this file...? OTOH, this recipe to build autoconf might help people still using 24.04 (I'm sure there are multiple). It seems build latest SOF main will become harder on 24.04LTS after this PR (but that's an alsa-lib choice, so not much we can do).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@kv2019i The Ubuntu 26.06 does not have ALSA v1.2.16 that contains the extended rates patch. It's still at 1.2.15. What would bump to 26.04 improve? Though generally it's good to test with latest Ubuntu, especially when it is a LTS.

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.

@singalsu I assumed based on "Ubuntu 24.04 ships autoconf 2.71, but current alsa-lib/alsa-utils # require >= 2.72" that you could skip building autoconf from source in the workflow if we simply moved to 26.04. alsa-lib we always need to build as we want to use a specific commit (or at least have the ability to do so). Anyways, I approved already, just wondering if we could simplify and not build autoconf from source.

# This is not the same as building every ./build-tools.sh option.
top-level_default_CMake_target_ALL:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

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.

Hmm, I guess ubuntu-latest does not pull 26.04 then...?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess it depends on when GH roll out the 26.04 as latest.

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.

4 participants