Skip to content

[stable-v2.15] topology2: backport sdw-dmic fixes - #11269

Open
kv2019i wants to merge 2 commits into
thesofproject:stable-v2.15from
kv2019i:202610-sof215-tplg-sdw-dmic-fix-backport
Open

kv2019i wants to merge 2 commits into
thesofproject:stable-v2.15from
kv2019i:202610-sof215-tplg-sdw-dmic-fix-backport

Conversation

@kv2019i

@kv2019i kv2019i commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Backport #11268 and #11258

The IncludeByKey.SDW_DMIC_PCM_CHANNELS + nested Define pattern introduced
to set SDW_DMIC_CHANNEL_CFG/SDW_DMIC_CHANNEL_MAP is broken: outer constants
($CHANNEL_CONFIG_STEREO, $CHANNEL_MAP_STEREO, etc.) evaluate to 0 inside a
Define block nested within IncludeByKey, overwriting the correct defaults from
input_audio_format.conf with zeroes.

Fix by removing the broken intermediate variable initialization entirely and
replacing all uses of $SDW_DMIC_CHANNEL_CFG/$SDW_DMIC_CHANNEL_MAP in format
blocks with direct IncludeByKey.SDW_DMIC_PCM_CHANNELS blocks using the correct
constants. The 2-channel (stereo) case is handled by the existing defaults in
input_audio_format.conf / output_audio_format.conf, so no explicit entry is
needed for it.

This restores token1904 (in_ch_map) to 0xffffff10 and token1905 (in_ch_cfg)
to 1 for the alh-copier.Capture-SmartMic.0 widget in ARL/MTL SDW DMIC
topologies.

Fixes: 87dc581 ("topology2: sdw-dmic-generic: add multiple DMIC number support")
Link: thesofproject/linux#5960
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
(cherry picked from commit ad9eb52)
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>
(cherry picked from commit dd26374)
@kv2019i
kv2019i requested review from jsarha and ranj063 as code owners October 5, 2026 15:20
@intel-sofci

Copy link
Copy Markdown

PR 11269: test results

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

Tested commit: 8ba169ce24a5b9c99be6b4072f1a8f60974cbef6

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

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