public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Arnd Bergmann <arnd@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Takashi Iwai <tiwai@suse.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	sound-open-firmware@alsa-project.org
Subject: Re: [PATCH] ALSA: hda: fix SND_INTEL_DSP_CONFIG dependency
Date: Mon, 04 Jan 2021 16:05:09 +0100	[thread overview]
Message-ID: <s5hble491zu.wl-tiwai@suse.de> (raw)
In-Reply-To: <3c19a5d5-8883-f917-a96a-f51bb188d115@perex.cz>

On Mon, 04 Jan 2021 16:00:05 +0100,
Jaroslav Kysela wrote:
> 
> Dne 03. 01. 21 v 14:52 Arnd Bergmann napsal(a):
> > From: Arnd Bergmann <arnd@arndb.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@arndb.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.

As I wrote in another post, a part of the problem is that SOF PCI and
ACPI drivers call snd_intel_dsp_driver_probe() unconditionally, even
if no Intel driver is bound.  So even if changing like the above (or
better to use IS_REACHABLE() macro) works around the issue, the call
pattern needs to be reconsidered.


thanks,

Takashi

  reply	other threads:[~2021-01-04 15:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03 13:52 [PATCH] ALSA: hda: fix SND_INTEL_DSP_CONFIG dependency Arnd Bergmann
2021-01-04 14:09 ` Takashi Iwai
2021-01-04 14:13   ` Mark Brown
2021-01-04 15:00 ` Jaroslav Kysela
2021-01-04 15:05   ` Takashi Iwai [this message]
2021-01-05 13:43     ` Arnd Bergmann
2021-01-05 15:39       ` Kai Vehmanen
2021-01-05 19:06         ` Arnd Bergmann
2021-01-05 19:07           ` [PATCH] ASoC: SOF: Intel: avoid reverse module dependency Arnd Bergmann
2021-01-06  9:30             ` Arnd Bergmann
2021-01-07 11:45               ` Kai Vehmanen
2021-01-11 19:54             ` Pierre-Louis Bossart
2021-01-12 13:55               ` Takashi Iwai
2021-01-12 20:17                 ` [Sound-open-firmware] " Pierre-Louis Bossart
2021-01-12 20:31                   ` Arnd Bergmann
2021-01-05 13:30   ` [PATCH] ALSA: hda: fix SND_INTEL_DSP_CONFIG dependency Arnd Bergmann

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=s5hble491zu.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --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=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.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