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 <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Pan Xiuli <xiuli.pan@linux.intel.com>,
	Evan Green <evgreen@chromium.org>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: SOF: Intel: work around snd_hdac_aligned_read link failure
Date: Mon, 9 Sep 2019 15:38:57 -0500	[thread overview]
Message-ID: <3b69e0ec-63cb-4888-9faa-acb7638d71dc@linux.intel.com> (raw)
In-Reply-To: <20190909195159.3326134-1-arnd@arndb.de>

On 9/9/19 2:51 PM, Arnd Bergmann wrote:
> When CONFIG_SND_HDA_ALIGNED_MMIO is selected by another driver
> (i.e. Tegra) that selects CONFIG_SND_HDA_CORE as a loadable
> module, but SND_SOC_SOF_HDA_COMMON is built-in, we get a
> link failure from some functions that access the hda register:
> 
> sound/soc/sof/intel/hda.o: In function `hda_ipc_irq_dump':
> hda.c:(.text+0x784): undefined reference to `snd_hdac_aligned_read'
> sound/soc/sof/intel/hda-stream.o: In function `hda_dsp_stream_threaded_handler':
> hda-stream.c:(.text+0x12e4): undefined reference to `snd_hdac_aligned_read'
> hda-stream.c:(.text+0x12f8): undefined reference to `snd_hdac_aligned_write'
> 
> Add an explicit 'select' statement as a workaround. This is
> not a great solution, but it's the easiest way I could come
> up with.

Thanks for spotting this, I don't think anyone on the SOF team looked at 
this. Maybe we can filter with depends on !TEGRA or 
!SND_HDA_ALIGNED_MMIO at the SOF Intel top-level instead?

If you can share your config off-list I can try to simplify this further.

> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   sound/soc/sof/intel/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig
> index 479ba249e219..9180184026e1 100644
> --- a/sound/soc/sof/intel/Kconfig
> +++ b/sound/soc/sof/intel/Kconfig
> @@ -248,6 +248,7 @@ config SND_SOC_SOF_HDA_COMMON
>   	tristate
>   	select SND_SOC_SOF_INTEL_COMMON
>   	select SND_SOC_SOF_HDA_LINK_BASELINE
> +	select SND_HDA_CORE if SND_HDA_ALIGNED_MMIO
>   	help
>   	  This option is not user-selectable but automagically handled by
>   	  'select' statements at a higher level
> 


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 <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org,
	Pan Xiuli <xiuli.pan@linux.intel.com>,
	linux-kernel@vger.kernel.org, Evan Green <evgreen@chromium.org>
Subject: Re: [alsa-devel] [PATCH] ASoC: SOF: Intel: work around snd_hdac_aligned_read link failure
Date: Mon, 9 Sep 2019 15:38:57 -0500	[thread overview]
Message-ID: <3b69e0ec-63cb-4888-9faa-acb7638d71dc@linux.intel.com> (raw)
In-Reply-To: <20190909195159.3326134-1-arnd@arndb.de>

On 9/9/19 2:51 PM, Arnd Bergmann wrote:
> When CONFIG_SND_HDA_ALIGNED_MMIO is selected by another driver
> (i.e. Tegra) that selects CONFIG_SND_HDA_CORE as a loadable
> module, but SND_SOC_SOF_HDA_COMMON is built-in, we get a
> link failure from some functions that access the hda register:
> 
> sound/soc/sof/intel/hda.o: In function `hda_ipc_irq_dump':
> hda.c:(.text+0x784): undefined reference to `snd_hdac_aligned_read'
> sound/soc/sof/intel/hda-stream.o: In function `hda_dsp_stream_threaded_handler':
> hda-stream.c:(.text+0x12e4): undefined reference to `snd_hdac_aligned_read'
> hda-stream.c:(.text+0x12f8): undefined reference to `snd_hdac_aligned_write'
> 
> Add an explicit 'select' statement as a workaround. This is
> not a great solution, but it's the easiest way I could come
> up with.

Thanks for spotting this, I don't think anyone on the SOF team looked at 
this. Maybe we can filter with depends on !TEGRA or 
!SND_HDA_ALIGNED_MMIO at the SOF Intel top-level instead?

If you can share your config off-list I can try to simplify this further.

> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   sound/soc/sof/intel/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig
> index 479ba249e219..9180184026e1 100644
> --- a/sound/soc/sof/intel/Kconfig
> +++ b/sound/soc/sof/intel/Kconfig
> @@ -248,6 +248,7 @@ config SND_SOC_SOF_HDA_COMMON
>   	tristate
>   	select SND_SOC_SOF_INTEL_COMMON
>   	select SND_SOC_SOF_HDA_LINK_BASELINE
> +	select SND_HDA_CORE if SND_HDA_ALIGNED_MMIO
>   	help
>   	  This option is not user-selectable but automagically handled by
>   	  'select' statements at a higher level
> 

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2019-09-09 20:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09 19:51 [PATCH] ASoC: SOF: Intel: work around snd_hdac_aligned_read link failure Arnd Bergmann
2019-09-09 19:51 ` [alsa-devel] " Arnd Bergmann
2019-09-09 20:38 ` Pierre-Louis Bossart [this message]
2019-09-09 20:38   ` Pierre-Louis Bossart
2019-09-09 20:51   ` Arnd Bergmann
2019-09-09 20:51     ` [alsa-devel] " Arnd Bergmann
2019-09-10  7:06     ` Takashi Iwai
2019-09-10  7:06       ` Takashi Iwai
2019-09-10  7:52       ` Arnd Bergmann
2019-09-10  7:52         ` Arnd Bergmann
2019-09-10  8:20         ` Takashi Iwai
2019-09-10  8:20           ` Takashi Iwai

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=3b69e0ec-63cb-4888-9faa-acb7638d71dc@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=evgreen@chromium.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiuli.pan@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.