lkml.org 
[lkml]   [2019]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] ASoC: SOF: Intel: work around snd_hdac_aligned_read link failure
On Mon, Sep 9, 2019 at 10:39 PM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
>
> 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?

That doesn't sound much better than my approach, but could also work.
One idea that I had but did not manage to implement was to move out
the snd_hdac_aligned_read/write functions from the core hda code
into a separate file. I think that would be the cleanest solution,
as it decouples the problem from any drivers.

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

I uploaded the .config to https://pastebin.com/raw/RMBGXTky
for reference now. This is with the latest linux-next kernel, plus
a series of patches that I keep around for fixing other build
problems.

Arnd

\
 
 \ /
  Last update: 2019-09-09 22:52    [W:0.062 / U:2.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site