From: Takashi Iwai Subject: Re: [PATCH 1/2] ASoC: utils: Add internal call to determine if DAI is dummy. Date: Wed, 08 Jan 2014 11:55:40 +0100 Message-ID: References: <1389177619-2760-1-git-send-email-liam.r.girdwood@linux.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 F3230265133 for ; Wed, 8 Jan 2014 11:55:40 +0100 (CET) In-Reply-To: <1389177619-2760-1-git-send-email-liam.r.girdwood@linux.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: Liam Girdwood Cc: alsa-devel@alsa-project.org, Mark Brown List-Id: alsa-devel@alsa-project.org At Wed, 8 Jan 2014 10:40:18 +0000, Liam Girdwood wrote: > > Provide a quick way to tell if a DAI is a dummy DAI or a regular DAI. > This is for internal DAPM usage only and is used to determe whether to determine? > insert a DAI link connection into the DAPM graph. > > Signed-off-by: Liam Girdwood > --- > include/sound/soc-dai.h | 2 ++ > sound/soc/soc-utils.c | 7 +++++++ > 2 files changed, 9 insertions(+) > > diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h > index 243d3b6..71f27c4 100644 > --- a/include/sound/soc-dai.h > +++ b/include/sound/soc-dai.h > @@ -123,6 +123,8 @@ int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate); > int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute, > int direction); > > +int snd_soc_dai_is_dummy(struct snd_soc_dai *dai); Better to use bool. > + > struct snd_soc_dai_ops { > /* > * DAI clocking configuration, all optional. > diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c > index 6ebdfd9..7f22ca3 100644 > --- a/sound/soc/soc-utils.c > +++ b/sound/soc/soc-utils.c > @@ -119,6 +119,13 @@ static struct snd_soc_dai_driver dummy_dai = { > }, > }; > > +int snd_soc_dai_is_dummy(struct snd_soc_dai *dai) > +{ > + if (dai->driver == &dummy_dai) > + return 1; > + return 0; > +} No need for EXPORT_SYMBOL since it's for internal use only, or just forgotten? Takashi > + > static int snd_soc_dummy_probe(struct platform_device *pdev) > { > int ret; > -- > 1.8.3.2 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >