[alsa-devel] [PATCH 7/9] ASoC: Intel: move PCI probe to a seprate file
Vinod Koul
vinod.koul at intel.com
Thu Oct 30 16:37:19 CET 2014
On Thu, Oct 30, 2014 at 04:27:09PM +0100, Takashi Iwai wrote:
> > > The standard way is something like
> > >
> > > snd-intel-sst-y := sst.o sst_ipc.o sst_stream.o sst_drv_interface.o sst_loader.o sst_pvt.o
> > > snd-intel-sst-$(CONFIG_SND_SST_IPC_PCI) += sst_pci.o
> > >
> > > But, when looking at the later patch, you try to build ACPI stuff into
> > > snd-intel-sst, too, and both are implemented as exclusive. This
> > > doesn't work well in general.
> > The hardware, firmware so the driver is pretty same. So either it gets probed
> > as PCI device is SFI platforms and as APCI device on ACPI ones.
> > Since the probe method is the only one differing, the machine will select
> > either PCI or ACPI. That one would get compiled in.
>
> ... and this exclusion mechanism is missing in your patches.
> Your current code doesn't allow to mix them.
>
> > Am okay to change if we have better method which works for both
>
> In general, it's better to provide individual modules for different
> interfaces and a common module that is referred by them. The
> selective build makes the build tests more difficult and is rather
> error-prone.
Hmmm, that makes me wonder why cant we do (based on your input above)
snd-intel-sst-y := sst.o sst_ipc.o sst_stream.o sst_drv_interface.o sst_loader.o sst_pvt.o
then either this:
snd-intel-sst-$(CONFIG_SND_SST_IPC_PCI) += sst_pci.o
snd-intel-sst-$(CONFIG_SND_SST_IPC_ACPI) += sst_acpi.o
Or:
snd-intel-sst-pci-y += snd-intel-sst.o sst_pci.o
snd-intel-sst-acpi-y += snd-intel-sst.o sst_acpi.o
And the machine will select required ones..
--
~Vinod
More information about the Alsa-devel
mailing list