Skip to content

topology2: host-gateway-tdfb-drc-capture: fix channel map/cfg regression - #11268

Merged
kv2019i merged 1 commit into
thesofproject:mainfrom
kv2019i:202610-sdw-tdfb-drc-chmap-fix
Oct 5, 2026
Merged

kv2019i merged 1 commit into
thesofproject:mainfrom
kv2019i:202610-sdw-tdfb-drc-chmap-fix

Conversation

@kv2019i

@kv2019i kv2019i commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Same problem with IncludeByKey + nested Define pattern as present earlier in sdw-dmic-generic: the
TDFB_DMIC_CHANNEL_CFG/TDFB_DMIC_CHANNEL_MAP variables are set to zero because outer constants ($CHANNEL_CONFIG_STEREO etc.) evaluate to 0 inside a Define block nested within IncludeByKey.

Also another issue in the "8"-channel case: it incorrectly uses TDFB_SDW_DMIC_CHANNEL_CFG/MAP instead of TDFB_DMIC_CHANNEL_CFG/MAP, so this needs a fix as well.

Fix by removing the broken initialization block entirely and replacing all four uses of $TDFB_DMIC_CHANNEL_CFG/$TDFB_DMIC_CHANNEL_MAP in the tdfb and drc widget format blocks with direct IncludeByKey.TDFB_DMIC_PCM_CHANNELS blocks using the correct constants. Stereo (2-channel) is handled by defaults.

This restores token1904/1905 (in_ch_map/cfg) and token1934/1935 (out_ch_map/cfg) to correct stereo values in the tdfb.40.1 and drc.40.1 widgets when SDW_DMIC_ENHANCED_CAPTURE=true.

Fixes: 87dc581 ("topology2: sdw-dmic-generic: add multiple DMIC number support")

Same problem with IncludeByKey + nested Define pattern as present
earlier in sdw-dmic-generic: the
TDFB_DMIC_CHANNEL_CFG/TDFB_DMIC_CHANNEL_MAP variables are set to zero
because outer constants ($CHANNEL_CONFIG_STEREO etc.) evaluate to 0
inside a Define block nested within IncludeByKey.

Also another issue in the "8"-channel case: it incorrectly uses
TDFB_SDW_DMIC_CHANNEL_CFG/MAP instead of TDFB_DMIC_CHANNEL_CFG/MAP, so
this needs a fix as well.

Fix by removing the broken initialization block entirely and replacing all
four uses of $TDFB_DMIC_CHANNEL_CFG/$TDFB_DMIC_CHANNEL_MAP in the tdfb and
drc widget format blocks with direct IncludeByKey.TDFB_DMIC_PCM_CHANNELS
blocks using the correct constants. Stereo (2-channel) is handled by defaults.

This restores token1904/1905 (in_ch_map/cfg) and token1934/1935
(out_ch_map/cfg) to correct stereo values in the tdfb.40.1 and drc.40.1
widgets when SDW_DMIC_ENHANCED_CAPTURE=true.

Fixes: 87dc581 ("topology2: sdw-dmic-generic: add multiple DMIC number support")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i
kv2019i requested review from jsarha and ranj063 as code owners October 5, 2026 11:10
Copilot AI balanced review requested due to automatic review settings October 5, 2026 11:10
@kv2019i

kv2019i commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up to #11258

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 review overview

🟢 Approval recommended

The direct mappings correctly avoid nested-definition evaluation and preserve valid stereo defaults.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes TDFB/DRC channel configuration generation for enhanced SoundWire microphone capture.

Changes:

  • Replaces broken nested Define initialization with direct channel-count mappings.
  • Corrects mono, 4-channel, and 8-channel maps; stereo retains class defaults.
File Description
tools/​topology/​topology2/​include/​pipelines/​cavs/​host-gateway-tdfb-drc-capture.conf Applies correct input/output channel maps to TDFB and DRC formats.

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

@intel-sofci

intel-sofci commented Oct 5, 2026 •

Copy link
Copy Markdown

PR 11268: test results

Run date: 2026-10-05 16:01 UTC

Tested commit: c75a236b902c79a3157e8690623e02620dbb6a55

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

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

It would be great to understand why.
It worked on @bardliao's local build, I'm sure of that, so, what has changed upstream alsatplg?

@bardliao

bardliao commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

It would be great to understand why. It worked on @bardliao's local build, I'm sure of that, so, what has changed upstream alsatplg?

It is possible that AI changed my alsatplg.

@kv2019i

kv2019i commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Ignoring remaining checks as this is a tplg-only change and not covered by the currently pending CI runs.

@kv2019i
kv2019i merged commit dd26374 into thesofproject:main Oct 5, 2026
43 of 46 checks passed
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