topology2: host-gateway-tdfb-drc-capture: fix channel map/cfg regression - #11268
Conversation
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>
|
Follow-up to #11258 |
There was a problem hiding this comment.
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
Defineinitialization 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.
PR 11268: test resultsRun date: 2026-10-05 16:01 UTC Tested commit: c75a236b902c79a3157e8690623e02620dbb6a55 |
It is possible that AI changed my alsatplg. |
|
Ignoring remaining checks as this is a tplg-only change and not covered by the currently pending CI runs. |
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")