From patchwork Tue Feb 25 06:06:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 3712771 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 09944BF13A for ; Tue, 25 Feb 2014 06:06:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 33E13201B4 for ; Tue, 25 Feb 2014 06:06:36 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 037102017E for ; Tue, 25 Feb 2014 06:06:35 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id ABC8326559E; Tue, 25 Feb 2014 07:06:31 +0100 (CET) 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 AE3D7265574; Tue, 25 Feb 2014 07:06:20 +0100 (CET) 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 F0A3F265576; Tue, 25 Feb 2014 07:06:19 +0100 (CET) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by alsa0.perex.cz (Postfix) with ESMTP id 1B45D265574 for ; Tue, 25 Feb 2014 07:06:11 +0100 (CET) Received: by mail-pd0-f182.google.com with SMTP id v10so7339584pde.13 for ; Mon, 24 Feb 2014 22:06:10 -0800 (PST) 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:mime-version :content-type; bh=VG5BDrZpayDBJTh1pJMMIDaKjYaoyIDWLm72tHIl0aM=; b=JGyszV6sWyYEFLAqqSlmko4JEKuVpf5w5Ayj6pcbAwQMj2IOMWH5mbVa+VoiVWTfI+ MTxFPfO0Dz8pnGtgvysESbZwOo8xTJv0AgTQ8NMLhdZOuYK9n/E3jtu/o6ZuH1iwZAfb 6ZFHEj2GoOJ4r5lV0EkQgfHkRUXhFbSrhtG0EKe3ZqhwwbIPaxSFcKJSAq78ZHd+216V B/b0oRwbxU5e10WKvPv2LvEG6+Gv9FvbdCyNlXhceShEzR0eyYFgtC/BNO5+53yNF3yi D1QMMRt44hYoIOaGeHpoTONTXaAl2iylMGUgvwzQf9XZWL2lLx5rk01SSVd4eQ6cVcSY IlpQ== X-Received: by 10.68.143.231 with SMTP id sh7mr4469840pbb.7.1393308370539; Mon, 24 Feb 2014 22:06:10 -0800 (PST) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id xs1sm135763863pac.7.2014.02.24.22.06.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 24 Feb 2014 22:06:09 -0800 (PST) Date: Mon, 24 Feb 2014 22:06:09 -0800 (PST) Message-ID: <87eh2r9169.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Mark Brown MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: Linux-ALSA , Simon , Liam Girdwood , Kuninori Morimoto , Kuninori Morimoto Subject: [alsa-devel] [PATCH] ASoC: simple-card: cpu_dai_name creates confusion when DT case 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 Basically, soc_bind_dai_link() checks cpu_dai->dev->of_node and dai_link->cpu_of_node in DT case. But after that it will check cpu_dai->name and dai_link->cpu_dai_name too. On the other hand, snd_soc_dai :: name is created by fmt_single_name() or fmt_multiple_name(). There is no confusion if dai name is created by fmt_multiple_name(), since cpu_dai->name is same as dai_link->cpu_dai_name. but, if dai name is created by fmt_single_name(), CPU DAI never match. Thus, simple-card not set dai_link->cpu_dai_name if DT case to skip naming match on soc_bind_dai_link() Signed-off-by: Kuninori Morimoto --- sound/soc/generic/simple-card.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 2a1b1b5..4a0e06e 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -242,7 +242,8 @@ static int asoc_simple_card_probe(struct platform_device *pdev) */ cinfo->snd_link.name = cinfo->name; cinfo->snd_link.stream_name = cinfo->name; - cinfo->snd_link.cpu_dai_name = cinfo->cpu_dai.name; + if (!of_cpu) + cinfo->snd_link.cpu_dai_name = cinfo->cpu_dai.name; cinfo->snd_link.platform_name = cinfo->platform; cinfo->snd_link.codec_name = cinfo->codec; cinfo->snd_link.codec_dai_name = cinfo->codec_dai.name;