From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 1/3] ALSA: hda: add hdac_adsp_enable module flag Date: Thu, 30 Apr 2015 22:47:35 +0200 Message-ID: References: <1430405556-19166-1-git-send-email-vinod.koul@intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 78ADD261ABF for ; Thu, 30 Apr 2015 22:47:35 +0200 (CEST) In-Reply-To: <1430405556-19166-1-git-send-email-vinod.koul@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Vinod Koul Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com, alsa-devel@alsa-project.org, broonie@kernel.org List-Id: alsa-devel@alsa-project.org At Thu, 30 Apr 2015 20:22:34 +0530, Vinod Koul wrote: > > Some Intel HDA controllers sport a DSP. These systems can also be enabled > with ASoC HDA driver as well. So add a flag in hda-core to enable/disable > aDSP This flag for now is false, and should be true once the ASoC based > systems mature. The integrators/OS vendors can configure this flag based on > system preference. > > Signed-off-by: Vinod Koul > --- > include/sound/hdaudio.h | 11 +++++++++++ > sound/hda/hda_bus_type.c | 4 ++++ > 2 files changed, 15 insertions(+) > > diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h > index b97c59eab7ab..015bec1079f9 100644 > --- a/include/sound/hdaudio.h > +++ b/include/sound/hdaudio.h > @@ -12,6 +12,17 @@ > #include > #include > > +/* > + * hdac_adsp_enable: exported HD-A aDSP enable configuration. > + * > + * Some Intel HDA controllers sport a DSP, for these platform we can bypass > + * aDSP and use as regular HDA controller or enable aDSP and use aDSP > + * along with I2S codecs etc. > + * hdac_adsp_enable would enable the aDSP based HDA controller if the > + * platform supports it > + */ > +extern bool hdac_adsp_enable; I prefer snd_ prefix for exported symbols, partly for consistency and partly for safety reason. > + > /* codec node id */ > typedef u16 hda_nid_t; > > diff --git a/sound/hda/hda_bus_type.c b/sound/hda/hda_bus_type.c > index 519914a12e8a..80e0570ffbf4 100644 > --- a/sound/hda/hda_bus_type.c > +++ b/sound/hda/hda_bus_type.c > @@ -10,6 +10,10 @@ > MODULE_DESCRIPTION("HD-audio bus"); > MODULE_LICENSE("GPL"); > > +bool hdac_adsp_enable = false; > +module_param(hdac_adsp_enable, bool, 0444); Try to reduce to a shorter option name, e.g. enable_adsp. With module_param_named(), you can have different option- and variable names. thanks, Takashi