Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1405553ybm; Tue, 21 May 2019 13:35:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzWeTigKwu+EU97o9D93ibVjwDicq1HM8g2YJHg0HZM0wnwjsXpbekRLPscUVmbMbIDX6J X-Received: by 2002:a63:db4e:: with SMTP id x14mr70082279pgi.119.1558470944850; Tue, 21 May 2019 13:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558470944; cv=none; d=google.com; s=arc-20160816; b=mJ6XIJeHIZiQuT8qgOXrvRLsCIIct5Dalyu8ygKCpZm9F32qKln2xhEOW01GxfnYmI +aUl1zmBhV88jS0TLDFaJtbyuk+nBhRPFkb9vnfsZGcHBYKZHAi0kp9ccmaTm2tplO8r 74FMzBVDBcndxp06Zyb1aFdElMBXo4lIZG0obNpYPNZxKBhbhMuZBWts55dMPdr7Veo7 PMhYdBhUk3xNhKWtxCJp0rdPoLyW1mD0Kb65fj3ATtESEuEif7GRy75rQ30bFQm+lI2i 0dCMO2ioTcX/2RG5OgK8mu3f9xZ2Qu05UtZyyqIRSQis4AncZou9W6uDqQd5kyUFVkyo ZrOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=NroV3N1vJpd6DZ4DRQosf/gwRkeYD5eyKfv4NsTZWn0=; b=uQtmGB8uurbmssgCldBEOTnOvIamq5tmxOt9D3UNKd6NLHbjDSyyIbf/CRZDpXrXtb oYwCH/wxHI2mWX4WZNltpbbfWHkpqECgFipZFKITcgBtrvsjM/WU86BmJ2hopPk4HFsk hptgAd6yEv2W5vswsRz/czQZaiVJCfj9l6xQUo0eXlznPAME3Ez+BzRE6hViYEUXFLY+ aJ8myApaoy2yyxeMq2XTwgIbOTZH8uSzYWv+4vzB9ujv3NMb0M2bsRnOUuYtLwbvGT+c hPCH3VQ8c6v5ZN6S30ic3ndIDwF84yddTeuZnb4/AkGGmTanQqRRna+CYHgDvG1c0aLk xXVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=RPDaCjlC; 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 y4si16530087pfn.47.2019.05.21.13.35.29; Tue, 21 May 2019 13:35:44 -0700 (PDT) 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; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=RPDaCjlC; 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 S1727885AbfEUUdA (ORCPT + 99 others); Tue, 21 May 2019 16:33:00 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:38264 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727428AbfEUUc7 (ORCPT ); Tue, 21 May 2019 16:32:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=NroV3N1vJpd6DZ4DRQosf/gwRkeYD5eyKfv4NsTZWn0=; b=RPDaCjlCbz/v cUKM5iO9XPYzdRBGIj22IbikbB00PudC+BrqAz0xLKLvAyXLO1rxocbP3u8IhdvSjIfALlfybFDKn 7ZLR5eFXTwFyzJaT5BqlBrcy/ou1yerLY5rtw9dxmo5dSiuwMlzyBzKz5A9U1N0W0oAPk30VRGeRf ATPkM=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1hTBRI-0001yj-04; Tue, 21 May 2019 20:32:48 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id B277E1126D1B; Tue, 21 May 2019 21:32:41 +0100 (BST) From: Mark Brown To: Jon Hunter Cc: alsa-devel@alsa-project.org, Jaroslav Kysela , Liam Girdwood , linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Mark Brown , Takashi Iwai Subject: Applied "ASoC: simple-card: Fix configuration of DAI format" to the asoc tree In-Reply-To: <1558029086-18024-1-git-send-email-jonathanh@nvidia.com> X-Patchwork-Hint: ignore Message-Id: <20190521203241.B277E1126D1B@debutante.sirena.org.uk> Date: Tue, 21 May 2019 21:32:41 +0100 (BST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: simple-card: Fix configuration of DAI format has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2 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 069d037aea98ffa64c26d4b1dc958fb8f39f5c2b Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 16 May 2019 18:51:26 +0100 Subject: [PATCH] ASoC: simple-card: Fix configuration of DAI format When configuring a codec to be both bit-clock and frame-master, it was found that the codec was always configured as bit-clock and frame-slave. Looking at the simple_dai_link_of() function there appears to be two problems with the configuration of the DAI format, which are ... 1. The function asoc_simple_parse_daifmt() is called before the function asoc_simple_parse_codec() and this means that the device-tree node for the codec has not been parsed yet, which is needed by the function asoc_simple_parse_daifmt() to determine who is the codec. 2. The phandle passed to asoc_simple_parse_daifmt() is the phandle to the 'codec' node and not the phandle of the actual codec defined by the 'sound-dai' property under the 'codec' node. Fix the above by moving the call to asoc_simple_parse_daifmt() after the the call to asoc_simple_parse_codec() and pass the phandle for the codec to asoc_simple_parse_daifmt(). Signed-off-by: Jon Hunter Signed-off-by: Mark Brown --- sound/soc/generic/simple-card.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 9b568f578bcd..c2c8dcbcf795 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -283,11 +283,6 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv, codec_dai = dai_props->codec_dai = &priv->dais[li->dais++]; - ret = asoc_simple_parse_daifmt(dev, node, codec, - prefix, &dai_link->dai_fmt); - if (ret < 0) - goto dai_link_of_err; - simple_parse_mclk_fs(top, cpu, codec, dai_props, prefix); ret = asoc_simple_parse_cpu(cpu, dai_link, &single_cpu); @@ -298,6 +293,11 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv, if (ret < 0) goto dai_link_of_err; + ret = asoc_simple_parse_daifmt(dev, node, dai_link->codecs->of_node, + prefix, &dai_link->dai_fmt); + if (ret < 0) + goto dai_link_of_err; + ret = asoc_simple_parse_platform(plat, dai_link); if (ret < 0) goto dai_link_of_err; -- 2.20.1