All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
	subhransu.s.prusty@intel.com, lgirdwood@gmail.com
Subject: Re: [PATCH 7/9] ASoC: Intel: move PCI probe to a seprate	file
Date: Thu, 30 Oct 2014 20:04:44 +0530	[thread overview]
Message-ID: <20141030143444.GA28745@intel.com> (raw)
In-Reply-To: <s5hmw8d4n1c.wl-tiwai@suse.de>

On Thu, Oct 30, 2014 at 04:03:59PM +0100, Takashi Iwai wrote:
> At Thu, 30 Oct 2014 16:21:50 +0530,
> Vinod Koul wrote:
> > 
> > From: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
> > 
> > This allow the sst.c to be common across PCI and APCI usages
> > 
> > Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
> > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> > 
> > Author:    Subhransu S. Prusty <subhransu.s.prusty@intel.com>
> > ---
> >  sound/soc/intel/Kconfig       |    4 +
> >  sound/soc/intel/sst/Makefile  |    4 +
> >  sound/soc/intel/sst/sst.c     |  200 +------------------------------------
> >  sound/soc/intel/sst/sst.h     |    6 +
> >  sound/soc/intel/sst/sst_pci.c |  225 +++++++++++++++++++++++++++++++++++++++++
> >  5 files changed, 240 insertions(+), 199 deletions(-)
> >  create mode 100644 sound/soc/intel/sst/sst_pci.c
> > 
> > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> > index 2a3af88..cbc987e 100644
> > --- a/sound/soc/intel/Kconfig
> > +++ b/sound/soc/intel/Kconfig
> > @@ -4,6 +4,7 @@ config SND_MFLD_MACHINE
> >  	select SND_SOC_SN95031
> >  	select SND_SST_MFLD_PLATFORM
> >  	select SND_SST_IPC
> > +	select SND_SST_IPC_PCI
> >  	help
> >            This adds support for ASoC machine driver for Intel(R) MID Medfield platform
> >            used as alsa device in audio substem in Intel(R) MID devices
> > @@ -16,6 +17,9 @@ config SND_SST_MFLD_PLATFORM
> >  config SND_SST_IPC
> >  	tristate
> >  
> > +config SND_SST_IPC_PCI
> > +	bool
> > +
> >  config SND_SOC_INTEL_SST
> >  	tristate "ASoC support for Intel(R) Smart Sound Technology"
> >  	select SND_SOC_INTEL_SST_ACPI if ACPI
> > diff --git a/sound/soc/intel/sst/Makefile b/sound/soc/intel/sst/Makefile
> > index 4d0e79b..b3fbccd 100644
> > --- a/sound/soc/intel/sst/Makefile
> > +++ b/sound/soc/intel/sst/Makefile
> > @@ -1,3 +1,7 @@
> >  snd-intel-sst-objs := sst.o sst_ipc.o sst_stream.o sst_drv_interface.o sst_loader.o sst_pvt.o
> >  
> > +ifneq ($(CONFIG_SND_SST_IPC_PCI),)
> > +snd-intel-sst-objs += sst_pci.o
> > +endif
> 
> 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.

Am okay to change if we have better method which works for both

-- 
~Vinod

  reply	other threads:[~2014-10-30 15:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 10:51 [PATCH 0/9] ASoC: Intel: more modulartion of init and add ACPI Vinod Koul
2014-10-30 10:51 ` [PATCH 1/9] ASoC: Intel: mfld-pcm: Fix to Store device context in sst_data Vinod Koul
2014-10-30 10:51 ` [PATCH 2/9] ASoC: Intel: move the driver wq init to a routine Vinod Koul
2014-10-30 10:51 ` [PATCH 3/9] ASoC: Intel: move the lock and wq initialization to routine Vinod Koul
2014-10-30 10:51 ` [PATCH 4/9] ASoC: Intel: move the driver context allocation " Vinod Koul
2014-10-30 10:51 ` [PATCH 5/9] ASoC: Intel: modularize driver probe and remove Vinod Koul
2014-10-31 16:46   ` Mark Brown
2014-10-30 10:51 ` [PATCH 6/9] ASoC: Intel: more probe modularization for sst Vinod Koul
2014-10-30 10:51 ` [PATCH 7/9] ASoC: Intel: move PCI probe to a seprate file Vinod Koul
2014-10-30 15:03   ` Takashi Iwai
2014-10-30 14:34     ` Vinod Koul [this message]
2014-10-30 15:27       ` Takashi Iwai
2014-10-30 15:37         ` Vinod Koul
2014-10-30 16:28           ` Mark Brown
2014-10-30 16:29           ` Takashi Iwai
2014-10-30 15:59             ` Vinod Koul
2014-10-30 16:49               ` Takashi Iwai
2014-10-30 16:14                 ` Vinod Koul
2014-10-30 17:07                   ` Takashi Iwai
2014-10-30 17:31                     ` Mark Brown
2014-10-31  5:55                       ` Vinod Koul
2014-10-31 17:32                       ` Takashi Iwai
2014-10-30 10:51 ` [PATCH 8/9] ASoC: Intel: add shim save context and restore routines Vinod Koul
2014-10-31 16:58   ` Mark Brown
2014-10-30 10:51 ` [PATCH 9/9] ASoC: Intel: Add ACPI driver for SST Vinod Koul

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=20141030143444.GA28745@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=subhransu.s.prusty@intel.com \
    --cc=tiwai@suse.de \
    /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.