From patchwork Mon Aug 8 10:46:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 9267759 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 34EC360754 for ; Mon, 8 Aug 2016 10:47:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24BC727FA9 for ; Mon, 8 Aug 2016 10:47:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1990F283FB; Mon, 8 Aug 2016 10:47:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A242D27FA9 for ; Mon, 8 Aug 2016 10:47:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752208AbcHHKrA (ORCPT ); Mon, 8 Aug 2016 06:47:00 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:50146 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751985AbcHHKrA (ORCPT ); Mon, 8 Aug 2016 06:47:00 -0400 Received: from debutante.sirena.org.uk ([2a01:348:6:8808:fab::3] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bWi5A-0002mI-Do; Mon, 08 Aug 2016 10:46:58 +0000 Received: from broonie by debutante with local (Exim 4.87) (envelope-from ) id 1bWi57-0000Ko-JI; Mon, 08 Aug 2016 11:46:53 +0100 From: Mark Brown To: Kuninori Morimoto Cc: Mark Brown , Mark Brown , linux-renesas-soc@vger.kernel.org, Linux-ALSA , Simon , Liam Girdwood In-Reply-To: <87fur6mjic.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Mon, 08 Aug 2016 11:46:53 +0100 X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Applied "ASoC: simple-card: use asoc_simple_card_parse_dai()" to the asoc tree X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The patch ASoC: simple-card: use asoc_simple_card_parse_dai() has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 44c16af1fa8a5b1464fd76834ee6943f721748fa Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 06:02:07 +0000 Subject: [PATCH] ASoC: simple-card: use asoc_simple_card_parse_dai() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/generic/simple-card.c | 43 +++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index b37c81b09203..05d6e02c42f3 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -44,6 +44,8 @@ struct simple_card_data { #define simple_priv_to_link(priv, i) ((priv)->snd_card.dai_link + i) #define simple_priv_to_props(priv, i) ((priv)->dai_props + i) +#define DAI "sound-dai" +#define CELL "#sound-dai-cells" #define PREFIX "simple-audio-card," #define asoc_simple_card_init_hp(card, sjack, prefix)\ @@ -243,33 +245,11 @@ asoc_simple_card_sub_parse_of(struct device_node *np, const char **name, int *args_count) { - struct of_phandle_args args; int ret; if (!np) return 0; - /* - * Get node via "sound-dai = <&phandle port>" - * it will be used as xxx_of_node on soc_bind_dai_link() - */ - ret = of_parse_phandle_with_args(np, "sound-dai", - "#sound-dai-cells", 0, &args); - if (ret) - return ret; - - *p_node = args.np; - - if (args_count) - *args_count = args.args_count; - - /* Get dai->name */ - if (name) { - ret = snd_soc_of_get_dai_name(np, name); - if (ret < 0) - return ret; - } - if (!dai) return 0; @@ -298,7 +278,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, struct device_node *codec = NULL; char prop[128]; char *prefix = ""; - int ret, cpu_args; + int ret, single_cpu; u32 val; /* For single DAI link & old style of DT node */ @@ -328,10 +308,23 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, if (!of_property_read_u32(node, "mclk-fs", &val)) dai_props->mclk_fs = val; + ret = asoc_simple_card_parse_cpu(cpu, dai_link, + DAI, CELL, &single_cpu); + if (ret < 0) + goto dai_link_of_err; + + ret = asoc_simple_card_parse_codec(codec, dai_link, DAI, CELL); + if (ret < 0) + goto dai_link_of_err; + + ret = asoc_simple_card_parse_platform(plat, dai_link, DAI, CELL); + if (ret < 0) + goto dai_link_of_err; + ret = asoc_simple_card_sub_parse_of(cpu, &dai_props->cpu_dai, &dai_link->cpu_of_node, &dai_link->cpu_dai_name, - &cpu_args); + &single_cpu); if (ret < 0) goto dai_link_of_err; @@ -392,7 +385,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, * fmt_single_name() * fmt_multiple_name() */ - if (!cpu_args) + if (single_cpu) dai_link->cpu_dai_name = NULL; dai_link_of_err: