From: Jude Gyimah <jude.gyimah87@gmail.com>
To: lgirdwood@gmail.com, peter.ujfalusi@linux.intel.com,
yung-chuan.liao@linux.intel.com, daniel.baluta@nxp.com,
kai.vehmanen@linux.intel.com, pierre-louis.bossart@linux.dev,
Vijendar.Mukunda@amd.com
Cc: broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
arnd@arndb.de, sound-open-firmware@alsa-project.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Jude Gyimah <jude.gyimah87@gmail.com>
Subject: [PATCH] ASoC: SOF: ipc4-topology: fix link failure with SND_INTEL_DSP_CONFIG=m
Date: Wed, 25 Nov 2026 19:37:06 +0100 [thread overview]
Message-ID: <20261125183706.53331-1-jude.gyimah87@gmail.com> (raw)
Hi everyone,
Just to bring this to your attention.
snd-sof can be built into vmlinux while the Intel NHLT code that
ipc4-topology.c calls is in a module, and then the link fails:
ipc4-topology.c:(.text+0x22bc): undefined reference to
`intel_nhlt_get_endpoint_blob'
ipc4-topology.c:(.text+0x2424): undefined reference to
`intel_nhlt_ssp_device_type'
This happens with a non-Intel SOF platform built in and the Intel option
modular, for example SND_SOC_SOF_IMX_COMMON=y selecting SND_SOC_SOF while
SND_SOC_SOF_INTEL_COMMON=m selects SND_INTEL_DSP_CONFIG=m.
The existing guard cannot prevent it. intel-nhlt.o is shipped by
SND_INTEL_DSP_CONFIG, but the guard tests SND_INTEL_NHLT, a bool that
SND_INTEL_DSP_CONFIG selects "if ACPI", and a select from an m-valued
symbol sets a bool to y. So SND_INTEL_NHLT is y whenever the provider is
y or m, and the condition can only tell "NHLT present somewhere" from
"absent", never built-in from modular. The static inline fallbacks in
include/sound/intel-nhlt.h are keyed on the same condition and are
therefore unreachable too.
Test reachability of the option that actually ships the code instead. No
header change is needed: the file already stubs
snd_sof_get_nhlt_endpoint_data() in its own #else branch, and wherever
IS_REACHABLE is true with ACPI=y, SND_INTEL_NHLT is y as well, so the real
declarations are in scope.
This is the same remedy as commit 8a3fea95fab1 ("ASoC: SOF:
SND_INTEL_DSP_CONFIG dependency") applied for snd_intel_dsp_driver_probe in
sof-pci-dev.c, which commit 194fe0fc3422 ("ASoC: SOF: pci: move DSP_CONFIG
use to platform-specific drivers") later resolved by moving that call to
Intel-specific code. Moving these calls likewise would be the complete
fix so this is the one-line one.
Found with kreach, a static check that compares what Kconfig allows
against the symbols the compiled objects actually reference.
Fixes: aa84ffb72158 ("ASoC: SOF: ipc4-topology: Add support for SSP/DMIC DAI's")
Link: https://lore.kernel.org/r/20261107114944.561731-1-jude.gyimah87@gmail.com
Signed-off-by: Jude Gyimah <jude.gyimah87@gmail.com>
---
sound/soc/sof/ipc4-topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c
index 22c15fbb93f2..3ad27c57564b 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -1790,7 +1790,7 @@ static void sof_ipc4_unprepare_copier_module(struct snd_sof_widget *swidget)
}
}
-#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_INTEL_NHLT)
+#if IS_ENABLED(CONFIG_ACPI) && IS_REACHABLE(CONFIG_SND_INTEL_DSP_CONFIG)
static int snd_sof_get_hw_config_params(struct snd_sof_dev *sdev, struct snd_sof_dai *dai,
int *sample_rate, int *channel_count, int *bit_depth)
{
--
2.43.0
reply other threads:[~2026-11-25 18:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261125183706.53331-1-jude.gyimah87@gmail.com \
--to=jude.gyimah87@gmail.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=sound-open-firmware@alsa-project.org \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®