Skip to content

Tools: Topology1: Fix topologies build with new alsa-lib#10598

Open
singalsu wants to merge 1 commit intothesofproject:mainfrom
singalsu:tplg1_fix_rtnr_bytes_control_extops
Open

Tools: Topology1: Fix topologies build with new alsa-lib#10598
singalsu wants to merge 1 commit intothesofproject:mainfrom
singalsu:tplg1_fix_rtnr_bytes_control_extops

Conversation

@singalsu
Copy link
Collaborator

@singalsu singalsu commented Mar 4, 2026

This patch fixes build error with alsa-lib commit 541427761292.

ALSA lib ops.c:47:(lookup_ops) [error.topology] wrong kcontrol ops value string ''

It impacts build of sof-mt8195-mt6359-max98390-rt5682-rtnr.tplg and sof-mt8195-mt6359-max98390-rt5682-google-aec-rtnr.tplg.

In the created .conf from m4 conversion, the value of put is an empty string in SectionControlBytes.

# control uses bespoke driver get/put/info ID for ext ops
extops."extctl" {
	#258 binds the mixer control to bytes get handlers
	get "258"
	put ""
}

The use of m4 macro CONTROLBYTES_OPS() requires three parameters while originally there was only two. All other usages of CONTROLBYTES_EXTOPS() in SOF are with 258, 258 as 2nd and 3rd parameters, so it is assumed it should be same for RTNR controls also.

This patch fixes build error with alsa-lib commit 541427761292.

ALSA lib ops.c:47:(lookup_ops) [error.topology] wrong kcontrol
ops value string ''

It impacts build of sof-mt8195-mt6359-max98390-rt5682-rtnr.tplg
and sof-mt8195-mt6359-max98390-rt5682-google-aec-rtnr.tplg.

In the created .conf from m4 conversion, the value of put is
an empty string in SectionControlBytes.

	# control uses bespoke driver get/put/info ID for ext ops
	extops."extctl" {
		thesofproject#258 binds the mixer control to bytes get handlers
		get "258"
		put ""
	}

The use of m4 macro CONTROLBYTES_OPS() requires three parameters
while originally there was only two. All other usages of
CONTROLBYTES_EXTOPS() in SOF are with 258, 258 as 2nd and 3rd
parameters, so it is assumed it should be same for RTNR
controls also.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu requested a review from a team March 4, 2026 14:40
@singalsu singalsu marked this pull request as ready for review March 4, 2026 15:05
@singalsu singalsu requested a review from ranj063 as a code owner March 4, 2026 15:05
Copilot AI review requested due to automatic review settings March 4, 2026 15:05
@singalsu singalsu requested review from kv2019i and lgirdwood March 4, 2026 15:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes topology1 build breakages with newer alsa-lib by ensuring RTNR byte controls provide valid ext ops (non-empty put), avoiding invalid kcontrol ops strings during topology conversion/build.

Changes:

  • Update RTNR CONTROLBYTES_EXTOPS() usages to pass both get and put op IDs (258, 258) where previously the put argument was missing.
  • Apply the fix to both the standard RTNR capture pipeline and the Google RTC audio processing RTNR capture pipeline.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tools/topology/topology1/sof/pipe-rtnr-google-rtc-audio-processing-capture.m4 Fix RTNR readonly bytes control extops to provide non-empty put op ID for alsa-lib compatibility.
tools/topology/topology1/sof/pipe-rtnr-capture.m4 Fix RTNR readonly bytes control extops to provide non-empty put op ID for alsa-lib compatibility.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

C_CONTROLBYTES_READONLY(DEF_RTNR_BYTES, PIPELINE_ID,
CONTROLBYTES_OPS(bytes, 258 binds the mixer control to bytes get handlers, 258),
CONTROLBYTES_EXTOPS(258 binds the mixer control to bytes get handlers, 258),
CONTROLBYTES_EXTOPS(258 binds the mixer control to bytes get handlers, 258, 258),
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

The comment string passed to CONTROLBYTES_EXTOPS says this control binds to "bytes get handlers", but the macro invocation now provides both get and put IDs (258, 258). Update the comment text to reflect get/put (or switch to CONTROLBYTES_EXTOPS_READONLY if this is intended to be get-only) so the generated .conf comments remain accurate.

Suggested change
CONTROLBYTES_EXTOPS(258 binds the mixer control to bytes get handlers, 258, 258),
CONTROLBYTES_EXTOPS(258 binds the mixer control to bytes get/put handlers, 258, 258),

Copilot uses AI. Check for mistakes.
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.

2 participants