All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Jie Yang <yang.jie@linux.intel.com>,
	Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Vinod Koul <vkoul@kernel.org>,
	Sriram Periyasamy <sriramx.periyasamy@intel.com>,
	Rakesh Ughreja <rakesh.a.ughreja@intel.com>,
	Guneshwor Singh <guneshwor.o.singh@intel.com>,
	Naveen Manohar <naveen.m@intel.com>,
	Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>,
	Sanyog Kale <sanyog.r.kale@intel.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: skl: always select SND_SOC_HDAC_HDA
Date: Fri, 2 Nov 2018 09:56:52 -0500	[thread overview]
Message-ID: <943d10e2-299c-4393-f2f5-4ac8bbe400c3@linux.intel.com> (raw)
In-Reply-To: <20181102112456.780127-1-arnd@arndb.de>


On 11/2/18 6:24 AM, Arnd Bergmann wrote:
> The skylake sound support is written to work both with or without
> CONFIG_SND_SOC_HDAC_HDA, and uses an #ifdef to decide whether it should
> link against that. However, this fails with SND_SOC_ALL_CODECS=m or
> SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH=m when the Skylake support itself
> is built-in, with this link error:
>
> sound/soc/intel/skylake/skl.o: In function `skl_probe':
> skl.c:(.text+0x56c): undefined reference to `snd_soc_hdac_hda_get_ops'
>
> Using an explicit 'select' here simplifies the logic and prevents
> it from happening, at the cost of always including the compile
> time dependency.

Thanks Arnd for the report. I don't quite agree with the proposal, this 
should be similar to HDAC_HDMI which is not selected by default, and 
there's no reason to force the support for HDAudio when the vast 
majority of Skylake+ devices which enable this driver don't have any 
HDaudio codec.

Also the code is skl.c is already conditional, so this function should 
not be required.

Do you have a config that fails, I'd like to look at this further.

>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   sound/soc/intel/Kconfig       | 1 +
>   sound/soc/intel/skylake/skl.c | 2 --
>   2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> index 0caa1f4eb94d..c21ce7624af1 100644
> --- a/sound/soc/intel/Kconfig
> +++ b/sound/soc/intel/Kconfig
> @@ -109,6 +109,7 @@ config SND_SOC_INTEL_SKYLAKE
>   	depends on PCI && ACPI
>   	select SND_HDA_EXT_CORE
>   	select SND_HDA_DSP_LOADER
> +	select SND_SOC_HDAC_HDA
>   	select SND_SOC_TOPOLOGY
>   	select SND_SOC_INTEL_SST
>   	select SND_SOC_ACPI_INTEL_MATCH
> diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
> index 29225623b4b4..1069ee265ce5 100644
> --- a/sound/soc/intel/skylake/skl.c
> +++ b/sound/soc/intel/skylake/skl.c
> @@ -870,9 +870,7 @@ static int skl_create(struct pci_dev *pci,
>   	hbus = skl_to_hbus(skl);
>   	bus = skl_to_bus(skl);
>   
> -#if IS_ENABLED(CONFIG_SND_SOC_HDAC_HDA)
>   	ext_ops = snd_soc_hdac_hda_get_ops();
> -#endif
>   	snd_hdac_ext_bus_init(bus, &pci->dev, &bus_core_ops, io_ops, ext_ops);
>   	bus->use_posbuf = 1;
>   	skl->pci = pci;

WARNING: multiple messages have this Message-ID (diff)
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Jie Yang <yang.jie@linux.intel.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org,
	Sriram Periyasamy <sriramx.periyasamy@intel.com>,
	Guneshwor Singh <guneshwor.o.singh@intel.com>,
	Takashi Iwai <tiwai@suse.com>, Vinod Koul <vkoul@kernel.org>,
	Rakesh Ughreja <rakesh.a.ughreja@intel.com>,
	Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>,
	Naveen Manohar <naveen.m@intel.com>,
	Sanyog Kale <sanyog.r.kale@intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: skl: always select SND_SOC_HDAC_HDA
Date: Fri, 2 Nov 2018 09:56:52 -0500	[thread overview]
Message-ID: <943d10e2-299c-4393-f2f5-4ac8bbe400c3@linux.intel.com> (raw)
In-Reply-To: <20181102112456.780127-1-arnd@arndb.de>


On 11/2/18 6:24 AM, Arnd Bergmann wrote:
> The skylake sound support is written to work both with or without
> CONFIG_SND_SOC_HDAC_HDA, and uses an #ifdef to decide whether it should
> link against that. However, this fails with SND_SOC_ALL_CODECS=m or
> SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH=m when the Skylake support itself
> is built-in, with this link error:
>
> sound/soc/intel/skylake/skl.o: In function `skl_probe':
> skl.c:(.text+0x56c): undefined reference to `snd_soc_hdac_hda_get_ops'
>
> Using an explicit 'select' here simplifies the logic and prevents
> it from happening, at the cost of always including the compile
> time dependency.

Thanks Arnd for the report. I don't quite agree with the proposal, this 
should be similar to HDAC_HDMI which is not selected by default, and 
there's no reason to force the support for HDAudio when the vast 
majority of Skylake+ devices which enable this driver don't have any 
HDaudio codec.

Also the code is skl.c is already conditional, so this function should 
not be required.

Do you have a config that fails, I'd like to look at this further.

>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   sound/soc/intel/Kconfig       | 1 +
>   sound/soc/intel/skylake/skl.c | 2 --
>   2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> index 0caa1f4eb94d..c21ce7624af1 100644
> --- a/sound/soc/intel/Kconfig
> +++ b/sound/soc/intel/Kconfig
> @@ -109,6 +109,7 @@ config SND_SOC_INTEL_SKYLAKE
>   	depends on PCI && ACPI
>   	select SND_HDA_EXT_CORE
>   	select SND_HDA_DSP_LOADER
> +	select SND_SOC_HDAC_HDA
>   	select SND_SOC_TOPOLOGY
>   	select SND_SOC_INTEL_SST
>   	select SND_SOC_ACPI_INTEL_MATCH
> diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
> index 29225623b4b4..1069ee265ce5 100644
> --- a/sound/soc/intel/skylake/skl.c
> +++ b/sound/soc/intel/skylake/skl.c
> @@ -870,9 +870,7 @@ static int skl_create(struct pci_dev *pci,
>   	hbus = skl_to_hbus(skl);
>   	bus = skl_to_bus(skl);
>   
> -#if IS_ENABLED(CONFIG_SND_SOC_HDAC_HDA)
>   	ext_ops = snd_soc_hdac_hda_get_ops();
> -#endif
>   	snd_hdac_ext_bus_init(bus, &pci->dev, &bus_core_ops, io_ops, ext_ops);
>   	bus->use_posbuf = 1;
>   	skl->pci = pci;

  reply	other threads:[~2018-11-02 14:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 11:24 [PATCH] ASoC: skl: always select SND_SOC_HDAC_HDA Arnd Bergmann
2018-11-02 11:24 ` Arnd Bergmann
2018-11-02 14:56 ` Pierre-Louis Bossart [this message]
2018-11-02 14:56   ` Pierre-Louis Bossart
2018-11-02 22:03   ` Arnd Bergmann
2018-11-02 22:03     ` Arnd Bergmann
2018-11-04 16:45     ` [alsa-devel] " Pierre-Louis Bossart
2018-11-05 13:35       ` Andy Shevchenko
2018-11-05 15:07         ` Arnd Bergmann
2018-11-05 15:25           ` Takashi Iwai
2018-11-05 15:25             ` Takashi Iwai
2018-11-05 17:18             ` Pierre-Louis Bossart
2018-11-05 20:46               ` Andy Shevchenko
2018-11-05 21:19                 ` Arnd Bergmann
2018-11-06 10:10                   ` Andy Shevchenko

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=943d10e2-299c-4393-f2f5-4ac8bbe400c3@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=guneshwor.o.singh@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveen.m@intel.com \
    --cc=pankaj.laxminarayan.bharadiya@intel.com \
    --cc=perex@perex.cz \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=sriramx.periyasamy@intel.com \
    --cc=tiwai@suse.com \
    --cc=vkoul@kernel.org \
    --cc=yang.jie@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.