[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c19a5d5-8883-f917-a96a-f51bb188d115@perex.cz>
Date: Mon, 4 Jan 2021 16:00:05 +0100
From: Jaroslav Kysela <perex@...ex.cz>
To: Arnd Bergmann <arnd@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, Takashi Iwai <tiwai@...e.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Daniel Baluta <daniel.baluta@....com>,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
sound-open-firmware@...a-project.org
Subject: Re: [PATCH] ALSA: hda: fix SND_INTEL_DSP_CONFIG dependency
Dne 03. 01. 21 v 14:52 Arnd Bergmann napsal(a):
> From: Arnd Bergmann <arnd@...db.de>
>
> The sof-pci-dev driver fails to link when built into the kernel
> and CONFIG_SND_INTEL_DSP_CONFIG is set to =m:
>
> arm-linux-gnueabi-ld: sound/soc/sof/sof-pci-dev.o: in function `sof_pci_probe':
> sof-pci-dev.c:(.text+0x1c): undefined reference to `snd_intel_dsp_driver_probe'
>
> All other drivers using this interface already use a 'select
> SND_INTEL_DSP_CONFIG' statement to force the it to be present, so it
> seems reasonable to do the same here.
>
> The stub implementation in the header makes the problem harder to find,
> as it avoids the link error when SND_INTEL_DSP_CONFIG is completely
> disabled, without any obvious upsides. Remove these stubs to make it
> clearer that the driver is in fact needed here.
>
> Fixes: 82d9d54a6c0e ("ALSA: hda: add Intel DSP configuration / probe code")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> include/sound/intel-dsp-config.h | 17 -----------------
> sound/soc/sof/Kconfig | 2 ++
> 2 files changed, 2 insertions(+), 17 deletions(-)
>
> diff --git a/include/sound/intel-dsp-config.h b/include/sound/intel-dsp-config.h
> index d4609077c258..94667e870029 100644
> --- a/include/sound/intel-dsp-config.h
> +++ b/include/sound/intel-dsp-config.h
> @@ -18,24 +18,7 @@ enum {
> SND_INTEL_DSP_DRIVER_LAST = SND_INTEL_DSP_DRIVER_SOF
> };
>
> -#if IS_ENABLED(CONFIG_SND_INTEL_DSP_CONFIG)
The SOF drivers selects the DSP config code only when required (for specific
platforms - see sound/soc/sof/intel/Kconfig).
It seems that the above if should be modified as:
#if IS_BUILDIN(CONFIG_SND_INTEL_DSP_CONFIG) || (defined(MODULE) &&
IS_MODULE(CONFIG_SND_INTEL_DSP_CONFIG))
So the buildin drivers which do not require the DSP config probe can be
compiled without this dependency.
Jaroslav
--
Jaroslav Kysela <perex@...ex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
Powered by blists - more mailing lists