Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5392832ybl; Tue, 10 Dec 2019 05:24:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzt9xEvMDjN7LnLCHzAa9nCNLGfM9fC//aPBcayaZFIkN0baFARI5Ub8UiIyP1pLOVLrHi2 X-Received: by 2002:a9d:7999:: with SMTP id h25mr25624534otm.347.1575984263997; Tue, 10 Dec 2019 05:24:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575984263; cv=none; d=google.com; s=arc-20160816; b=YS0AhnQhPQ190rXmuGMVnSdqgrYfUf4ejXvRcjdPCpI0vF5gFYk/VJqp0P2jevm4xk XOkcCKdIAQMiRJYlOCq8u4E7bCBOOZ+wZukNovMnmQdqVx0AnyPwZCISVY+yKt+UwFH3 8c+zMy6YcBuIkfuDV99JDHHxFKOSN/QX5igcYkeHX//YTHKaZQqRIXEuaIRKWJGusmX1 pnnjDKHdbuGOAmQSyy1o355xHK1jrxX2FfiEum69hyhPDzSQguz7btKrgCVvPyK08BGc 1b2v1f9sbkHV1L2AMiktxAa9BAHyOwAyOnYnnhCYQjIGF5GN73DQDTKK/NmRUSkI/t09 qV4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to:subject:cc:to:from :date; bh=158xGxwLSmCyk6nk4iGMLAzUBxhwVi/SoqXop0HHj/Q=; b=Htwiq1/512bkxGJA41wO+YY0EbXJbBTKiaroOwwE2PuEPIYgpgrshteh2WXKJxC5G6 v3ehKYKTl8F++eafKFPe8JQTWg/DMqhksP+iF55C9yeWw7yULhxUF9XzwtIkAW30VBKC 0g0PQKB99CEkLtytKzp861GczixlQHCJvw0V4evmHYISdVJbwJ94+RHZbIN9FyGki3RG hkHle6yqF5cGXEkOrrB2ENU1xJ0wo27fzr9JKK2ALxtqpDbedwsmpcejogpspF7r+K3e lmdJkBuH+YGq1Mm256iSm0XFDNnNN9hNXswuJlPD2363+2i5CFzqMbo9jCCN1BclD2d/ l2kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si1860699oto.91.2019.12.10.05.24.11; Tue, 10 Dec 2019 05:24:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727500AbfLJNXg (ORCPT + 99 others); Tue, 10 Dec 2019 08:23:36 -0500 Received: from foss.arm.com ([217.140.110.172]:44154 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727440AbfLJNXg (ORCPT ); Tue, 10 Dec 2019 08:23:36 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6ECA61396; Tue, 10 Dec 2019 05:23:35 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E387D3F52E; Tue, 10 Dec 2019 05:23:34 -0800 (PST) Date: Tue, 10 Dec 2019 13:23:32 +0000 From: Mark Brown To: Daniel Baluta Cc: alsa-devel@alsa-project.org, broonie@kernel.org, kuninori.morimoto.gx@renesas.com, Kuninori Morimoto , linux-kernel@vger.kernel.org, Mark Brown Subject: Applied "ASoC: simple-card: Don't create separate link when platform is present" to the asoc tree In-Reply-To: <20191209135353.17427-1-daniel.baluta@nxp.com> Message-Id: X-Patchwork-Hint: ignore Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: simple-card: Don't create separate link when platform is present has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.5 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 5525cf07d15f7c7eab619707627c31aa8e39dff1 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Mon, 9 Dec 2019 15:53:53 +0200 Subject: [PATCH] ASoC: simple-card: Don't create separate link when platform is present In normal sound case all DAIs are detected as CPU-Codec. simple_dai_link_of supports the presence of a platform but it counts it as a CPU DAI resulting in the creation of an extra link. Adding a platform property to a link description like: simple-audio-card,dai-link { cpu { sound-dai = <&sai1>; }; plat { sound-dai = <&dsp>; }; codec { sound-dai = <&wm8960>; } will result in the creation of two links: * sai1 <-> wm8960 * dsp <-> wm8960 which is obviously not what we want. We just want one single link with: * sai1 <-> wm8960 (and platform set to dsp). Signed-off-by: Daniel Baluta Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20191209135353.17427-1-daniel.baluta@nxp.com Signed-off-by: Mark Brown --- sound/soc/generic/simple-card.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 10b82bf043d1..55e9f8800b3e 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -371,6 +371,7 @@ static int simple_for_each_link(struct asoc_simple_priv *priv, do { struct asoc_simple_data adata; struct device_node *codec; + struct device_node *plat; struct device_node *np; int num = of_get_child_count(node); @@ -381,6 +382,9 @@ static int simple_for_each_link(struct asoc_simple_priv *priv, ret = -ENODEV; goto error; } + /* get platform */ + plat = of_get_child_by_name(node, is_top ? + PREFIX "plat" : "plat"); /* get convert-xxx property */ memset(&adata, 0, sizeof(adata)); @@ -389,6 +393,8 @@ static int simple_for_each_link(struct asoc_simple_priv *priv, /* loop for all CPU/Codec node */ for_each_child_of_node(node, np) { + if (plat == np) + continue; /* * It is DPCM * if it has many CPUs, -- 2.20.1