From patchwork Tue Apr 19 11:36:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PC Liao X-Patchwork-Id: 8879141 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F043E9F1C1 for ; Tue, 19 Apr 2016 11:48:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1EE5620274 for ; Tue, 19 Apr 2016 11:48:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id BE7422026D for ; Tue, 19 Apr 2016 11:48:25 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D677E265AAD; Tue, 19 Apr 2016 13:48:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org 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 C8D0226603B; Tue, 19 Apr 2016 13:47:18 +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 5453526603B; Tue, 19 Apr 2016 13:47:17 +0200 (CEST) Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by alsa0.perex.cz (Postfix) with ESMTP id 3E1122660A4 for ; Tue, 19 Apr 2016 13:36:54 +0200 (CEST) Received: from mtkhts07.mediatek.inc [(172.21.101.69)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1677019561; Tue, 19 Apr 2016 19:36:47 +0800 Received: from localhost.localdomain (10.21.14.116) by mtkhts07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Tue, 19 Apr 2016 19:36:45 +0800 From: PC Liao To: , Date: Tue, 19 Apr 2016 19:36:41 +0800 Message-ID: <1461065801-19535-1-git-send-email-pc.liao@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N Cc: Jean-Francois Moine , alsa-devel@alsa-project.org, srv_heupstream@mediatek.com, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, koro.chen@mediatek.com, linux-mediatek@lists.infradead.org, PC Liao , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH] ASoC: core: export snd_soc_get_dai_name 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jean-Francois Moine snd_soc_get_dai_name() may be used to define a sound card with a different syntax from the one of the simple-card. Signed-off-by: Jean-Francois Moine Signed-off-by: PC Liao --- [1] is applied and needs this patch. Otherwise, [1] will build fail. [1] https://patchwork.kernel.org/patch/8878491/ ("ASoC: mediatek: Add second I2S on mt8173-rt5650 machine driver") --- include/sound/soc.h | 2 ++ sound/soc/soc-core.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 02b4a21..03b2d19 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1669,6 +1669,8 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np, const char *prefix, struct device_node **bitclkmaster, struct device_node **framemaster); +int snd_soc_get_dai_name(struct of_phandle_args *args, + const char **dai_name); int snd_soc_of_get_dai_name(struct device_node *of_node, const char **dai_name); int snd_soc_of_get_dai_link_codecs(struct device *dev, diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index d2e62b15..69cbbb0 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3786,8 +3786,8 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np, } EXPORT_SYMBOL_GPL(snd_soc_of_parse_daifmt); -static int snd_soc_get_dai_name(struct of_phandle_args *args, - const char **dai_name) +int snd_soc_get_dai_name(struct of_phandle_args *args, + const char **dai_name) { struct snd_soc_component *pos; struct device_node *component_of_node; @@ -3838,6 +3838,7 @@ static int snd_soc_get_dai_name(struct of_phandle_args *args, mutex_unlock(&client_mutex); return ret; } +EXPORT_SYMBOL_GPL(snd_soc_get_dai_name); int snd_soc_of_get_dai_name(struct device_node *of_node, const char **dai_name)