Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2154685ybc; Wed, 20 Nov 2019 09:40:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwswCCU3xA3vFVCck707ax+kTvt0Z+R/tL8KWHNrDy6M/SSurKFXAvUyr1qTAzXzMTTytpK X-Received: by 2002:a17:907:20d2:: with SMTP id qq18mr6694704ejb.305.1574271612707; Wed, 20 Nov 2019 09:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574271612; cv=none; d=google.com; s=arc-20160816; b=NYLMLu57g8oA29hbXTzGvglX25jcoCS5G1gFXg3qYCdqRA8GE3dhwkQNMRpeo9sF2y 2YXLaLVhAU15Wk0imZHCMgcU0EsukWT2m20hiP8BsdrgG2VvI4lG8mpfIUwWbwmW2wxm 1XuPZe/VmkA1Y+9rZaRs/C8OE23vRPDAFYmHMoRYP3aElw0c69wJYq/cpDH8bNQh3tNS lZtwTh3j/VNUFlFHlrvC5NVXqS/GU0aju6qnsaZsuHEtfQD3ywaNoC46YlG8kT5dtjEW QumgxcX9uLFAqCztqN2UeTJtjBvE5JGPt1TPfqmZfb6OpcFpXOqXSAZF6B9Z989WTxwL h9jw== 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=hdZhl4Cd6T4ScagHGsOV4BAq5XAqUWML/l1/j3QBpY8=; b=a1xSiFPZ65t5GUEHyDznYRTtxq0zpoXb7IB3hqSEmNSLi1jZd4liQhgW4U8H8PNv+g oNRUUHSZvrZzNWCZjYlTPRZJe0kq4iE/KQMr74K6oAt+QCWbPUELRd7TaYbGBkaEJ9+7 mN0UhnDcGYP+OPjOPUE7Z8Tx6ldDQeIINtdeR5iPDVfMJ19GzGAHv+XDul0ZwAHvTJWV WT3IP1lZix3K5Smh+jZpUC3Erc/+R1aLWVJjmZzKBFnJueDaVgC8mxZv3Z3lHTAFhoyQ 3U1TJmj8Pt7Z5cHlJBslVj10N7HKgejnpA00BORWHHW34UQm/SCXHqJjyeLPob3JoPY8 kG1w== 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 b11si16406039ejv.278.2019.11.20.09.39.24; Wed, 20 Nov 2019 09:40:12 -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 S1730088AbfKTRSF (ORCPT + 99 others); Wed, 20 Nov 2019 12:18:05 -0500 Received: from foss.arm.com ([217.140.110.172]:43280 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730001AbfKTRSE (ORCPT ); Wed, 20 Nov 2019 12:18:04 -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 584DBDA7; Wed, 20 Nov 2019 09:18:03 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BF0F73F703; Wed, 20 Nov 2019 09:18:02 -0800 (PST) Date: Wed, 20 Nov 2019 17:18:01 +0000 From: Mark Brown To: Shengjiu Wang Cc: alsa-devel@alsa-project.org, broonie@kernel.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, Mark Brown , perex@perex.cz, tiwai@suse.com Subject: Applied "ASoC: soc-pcm: check symmetry before hw_params" to the asoc tree In-Reply-To: <1573555602-5403-1-git-send-email-shengjiu.wang@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: soc-pcm: check symmetry before hw_params 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 5cca59516de5df9de6bdecb328dd55fb5bcccb41 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Tue, 12 Nov 2019 18:46:42 +0800 Subject: [PATCH] ASoC: soc-pcm: check symmetry before hw_params This reverts commit 957ce0c6b8a1f (ASoC: soc-pcm: check symmetry after hw_params). That commit cause soc_pcm_params_symmetry can't take effect. cpu_dai->rate, cpu_dai->channels and cpu_dai->sample_bits are updated in the middle of soc_pcm_hw_params, so move soc_pcm_params_symmetry to the end of soc_pcm_hw_params is not a good solution, for judgement of symmetry in the function is always true. FIXME: According to the comments of that commit, I think the case described in the commit should disable symmetric_rates in Back-End, rather than changing the position of soc_pcm_params_symmetry. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1573555602-5403-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown --- sound/soc/soc-pcm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 2c4f50c44591..01eb8700c3de 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -861,6 +861,11 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, int i, ret = 0; mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); + + ret = soc_pcm_params_symmetry(substream, params); + if (ret) + goto out; + if (rtd->dai_link->ops->hw_params) { ret = rtd->dai_link->ops->hw_params(substream, params); if (ret < 0) { @@ -940,9 +945,6 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, } component = NULL; - ret = soc_pcm_params_symmetry(substream, params); - if (ret) - goto component_err; out: mutex_unlock(&rtd->card->pcm_mutex); return ret; -- 2.20.1