Re: sound/soc/sof/intel/byt.c:1057: undefined reference to `sof_acpi_probe'

From: Arnd Bergmann
Date: Tue Apr 27 2021 - 16:01:44 EST


On Tue, Apr 27, 2021 at 9:13 PM Pierre-Louis Bossart
<pierre-louis.bossart@xxxxxxxxxxxxxxx> wrote:

> > An easy workaround would be to move the first 500 or so lines of
> > sound/soc/sof/intel/byt.c into a separate file and #include that from
> > distinct baytrail and merrifield modules, at the cost of a bit of
> > object code duplication and a somewhat dirty hack.
>
> I have a fix being tested here:
> https://github.com/thesofproject/linux/pull/2874
>
> The idea is what you suggested, move the common parts to a new file but
> I used an 'atom' module instead #include to avoid duplication. The
> exported functions are namespaced to avoid polluting the global symbol map.
>
> The only other change needed is in the Makefile, We already have
> CONFIG_SND_SOC_SOF_INTEL_ATOM_HIFI_EP in the Kconfig and that can be
> used for this module.

Makes sense. I was slightly worried this would require exporting a ton
of symbols and possibly circular dependencies but looking at your patch,
it seems entirely fine.

Arnd