From patchwork Tue Apr 19 05:12:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mengdong.lin@linux.intel.com X-Patchwork-Id: 8876961 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B8BB2BF29F for ; Tue, 19 Apr 2016 05:11:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8CDE20204 for ; Tue, 19 Apr 2016 05:11:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AD3D82017D for ; Tue, 19 Apr 2016 05:11:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C2CCA265D9A; Tue, 19 Apr 2016 07:11:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CBCE8265C98; Tue, 19 Apr 2016 07:10:23 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 64BB2265C98; Tue, 19 Apr 2016 07:10:22 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by alsa0.perex.cz (Postfix) with ESMTP id 9C15D265C99 for ; Tue, 19 Apr 2016 07:09:55 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 18 Apr 2016 22:09:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,505,1455004800"; d="scan'208";a="948107009" Received: from amanda-haswell-pc.sh.intel.com ([10.239.159.169]) by fmsmga001.fm.intel.com with ESMTP; 18 Apr 2016 22:09:39 -0700 From: mengdong.lin@linux.intel.com To: alsa-devel@alsa-project.org, broonie@kernel.org Date: Tue, 19 Apr 2016 13:12:25 +0800 Message-Id: <5e7147f76b2c54d2d23eb1f6a1146a3716bd5172.1461042239.git.mengdong.lin@linux.intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: Cc: Mengdong Lin , vinod.koul@intel.com, hardik.t.shah@intel.com, guneshwor.o.singh@intel.com, liam.r.girdwood@linux.intel.com, rakesh.a.ughreja@intel.com, mengdong.lin@intel.com Subject: [alsa-devel] [PATCH 1/4] ASoC: Export snd_soc_find_dai() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mengdong Lin This API can be used by topology to find an existing BE dai by name and further configure it. Topology will also check DAI ID to avoid wrong match. Signed-off-by: Mengdong Lin diff --git a/include/sound/soc.h b/include/sound/soc.h index 02b4a21..7687e2d 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1683,6 +1683,9 @@ void snd_soc_remove_dai_link(struct snd_soc_card *card, int snd_soc_register_dai(struct snd_soc_component *component, struct snd_soc_dai_driver *dai_drv); +struct snd_soc_dai *snd_soc_find_dai( + const struct snd_soc_dai_link_component *dlc); + #include #ifdef CONFIG_DEBUG_FS diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index d2e62b15..07663de 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -930,7 +930,7 @@ static struct snd_soc_component *soc_find_component( return NULL; } -static struct snd_soc_dai *snd_soc_find_dai( +struct snd_soc_dai *snd_soc_find_dai( const struct snd_soc_dai_link_component *dlc) { struct snd_soc_component *component; @@ -959,6 +959,7 @@ static struct snd_soc_dai *snd_soc_find_dai( return NULL; } +EXPORT_SYMBOL_GPL(snd_soc_find_dai); static bool soc_is_dai_link_bound(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link)