From patchwork Thu Aug 28 03:08:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4812621 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4DB6DC0338 for ; Fri, 29 Aug 2014 21:45:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 860D920122 for ; Fri, 29 Aug 2014 21:45:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3AFF5200F0 for ; Fri, 29 Aug 2014 21:45:33 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3E11F26585F; Fri, 29 Aug 2014 23:45:32 +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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id D18FB265989; Fri, 29 Aug 2014 16:06:56 +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 C952B265981; Fri, 29 Aug 2014 16:06:53 +0200 (CEST) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by alsa0.perex.cz (Postfix) with ESMTP id DDC44265A3D for ; Thu, 28 Aug 2014 05:08:07 +0200 (CEST) Received: by mail-pa0-f42.google.com with SMTP id lf10so654437pab.1 for ; Wed, 27 Aug 2014 20:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=JpNMrQ83vtceVdhODV7UNZlEtTdtKo06kMsLmEwk7UA=; b=l9So1ninK1pAoZit7yFG5o6ghcGhXo3UWtDYeXV0zKsq6VNYYiluY0U5nDT9AUfPMQ 2ltCWKWnLNumQo56gVKRYrqF7ZgElt0n5JLuwQBm9Nza3vQapVJg2yiRB7zjbwtnIk0s N6MDV5Vp/OMXkFfqu2MOV1mT9LeuacN9n/7VMPWkzR/qI7RGoXKGD9cczbL0qDp2fMZq YdheScJppRZjNYn7ioB0F3DRZ1ZHzMLcFvhN81+hKW8YhS/TehHKhwZTvogS5Gm/4u/u dQHSp909eXCg/Z4nrSkTPEOI9dUZOMzloa2MaRTR15mhryBOi7wgrCeLgKfEpRvn2MKe 2nVA== X-Received: by 10.70.49.166 with SMTP id v6mr1531527pdn.142.1409195286986; Wed, 27 Aug 2014 20:08:06 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id ft9sm3103997pdb.24.2014.08.27.20.08.05 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 27 Aug 2014 20:08:06 -0700 (PDT) Date: Wed, 27 Aug 2014 20:08:06 -0700 (PDT) Message-ID: <8738chia5n.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Mark Brown In-Reply-To: <8761hdia86.wl%kuninori.morimoto.gx@gmail.com> References: <87fvgriqrb.wl%kuninori.morimoto.gx@gmail.com> <8761hdia86.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: Linux-ALSA , Simon , Liam Girdwood , Kuninori Morimoto Subject: [alsa-devel] [PATCH 2/4 v2] ASoC: simple-card: remove dai_link->cpu_dai_name when DT 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: Kuninori Morimoto f687d900d30a61dda38db2a99239f5284a86a309 (ASoC: simple-card: cpu_dai_name creates confusion when DT case) removed dai_link->cpu_dai_name when DT case, since it uses DT phand in soc_bind_dai_link(). This binding will fail if it has cpu_dai_name. 6a91a17bd7b92b2d2aa9ece85457f52a62fd7708 (ASoC: simple-card: Handle many DAI links) added multi DAI link support to simple-card driver. Then, removing cpu_dai_name was cared only single DAI. But, it is needed in all DT cases. This patch moves it to asoc_simple_card_dai_link_of() so that care about all DAIs. Signed-off-by: Kuninori Morimoto --- v1 -> v2 - no change sound/soc/generic/simple-card.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index c5445b0..e8185a0 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -285,6 +285,17 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, dai_props->codec_dai.fmt, dai_props->codec_dai.sysclk); + /* + * soc_bind_dai_link() will check cpu name + * after of_node matching if dai_link has cpu_dai_name. + * but, it will never match if name was created by fmt_single_name() + * remove cpu_dai_name to escape name matching. + * see + * fmt_single_name() + * fmt_multiple_name() + */ + dai_link->cpu_dai_name = NULL; + dai_link_of_err: if (np) of_node_put(np); @@ -429,18 +440,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev) goto err; } - /* - * soc_bind_dai_link() will check cpu name - * after of_node matching if dai_link has cpu_dai_name. - * but, it will never match if name was created by fmt_single_name() - * remove cpu_dai_name to escape name matching. - * see - * fmt_single_name() - * fmt_multiple_name() - */ - if (num_links == 1) - dai_link->cpu_dai_name = NULL; - } else { struct asoc_simple_card_info *cinfo;