Message ID | 20221104132213.121847-1-rf@opensource.cirrus.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp400399wru; Fri, 4 Nov 2022 06:26:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Gc9HeO10+w1c97L5yn5Cq1BaGwverBhYr1aCqsjQEwEQtMjwiJPVvX7ArzmLMJTnhdczP X-Received: by 2002:a17:90b:1c8c:b0:203:89fb:ba79 with SMTP id oo12-20020a17090b1c8c00b0020389fbba79mr54029904pjb.92.1667568365409; Fri, 04 Nov 2022 06:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667568365; cv=none; d=google.com; s=arc-20160816; b=TLjcnPeDzmRcTosKwn/y5pXchvl3Y8AsOFWT3hOwktJ8ST+B4aNohcIx2G/x4MonUZ n21nc5Lz8B7GG/bgEAfcMAFxcKAKRhqSxo+FvkCm9P6VCJEV7wTcDi2uTNf10ixvylgT l8RmfAQe/eb5agb3uZg/8RyuQPMo1i9blCw5zpENgUB+0HG7CeOkdyDIYmYTfMb1Fz8s 2OCPNPeUvd9yQx81IGKC5Tluo+QGoANEky799W2KgVsNlZtYU9Crow6o9yMJqU9lo7GP 25xH8rAEqYH1t9EJBo0Iwzyp0p+5OjhQzqOhC9ZYvbAhRQw+uIPMF4RnY/PLdo4arQ7J aYfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4pgVcvB8mbH5TGlS6atFEpzhB/zYR1p6PQrBMN0cqpE=; b=j39NV+2yhpY79OalHdk05UlPoDH2AxveyFVHtH8i7Aqo0Ce5o90OEPuktB2R5yVY2z MRnE4sBzvHTduUFHA3qMIvvR3u3+ojH3Eq0jTFDx5EFiaHooW9i/xtv4kS1JlWys9Amo kiucv8LBBSB4XVBET+k4zJJHrCMuL6PHCnQwAfCR90WJjFfUplexcWK2g7c4qv0k29EC J49iYRbkhHKKrUQwgwK0Hw42dFzQumFjArP/D1QUvKVcwFk4XySNiBhGMf5rg3hPknEs /TYrJzwEe9BiKydldNjZhPk3RyBUMU9WKGUfIreocplb7reIWx6+AFSNlG5feBNfFrsp 3/3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=m7O9pLOW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p26-20020a056a000a1a00b00542c772d478si5536685pfh.247.2022.11.04.06.25.52; Fri, 04 Nov 2022 06:26:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=m7O9pLOW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231935AbiKDNWn (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 4 Nov 2022 09:22:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232013AbiKDNWd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Nov 2022 09:22:33 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E81A2EF35 for <linux-kernel@vger.kernel.org>; Fri, 4 Nov 2022 06:22:31 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2A47mkSU006593; Fri, 4 Nov 2022 08:22:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=4pgVcvB8mbH5TGlS6atFEpzhB/zYR1p6PQrBMN0cqpE=; b=m7O9pLOWTcFuu6yfVu0TBrpSPnpyV5nGCEPlWXY+A6eUxmkUKaq8P4oW9GTnlCU5PfPo 99wsOpMfcjIcoAQc/K4GQoio40pd36kZ02TTyQYKPQapZP+WAdQhgNlyjXU84hWaklJg lCTUuUMbmalrzTa1cbpjMd2fe3bIPAIVVGx6+eHgUBrPQ5RjYJT++odIQ0SS2z2jAp1V 9DgOGgShqkCldavHwxUF85puRRIzjJ7lyn7DfJV7Xd9Xg3Zt1lXOZbJh0oMu0kOzpX/C Gw/FiOw9vbjmm2Z+t5DMBwjgW8BeSv75ACYeizuLLJJlyl5/U3wpe1Z5yEXvuBC2Ldqj 3Q== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3kmpgcgt98-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Nov 2022 08:22:21 -0500 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.15; Fri, 4 Nov 2022 08:22:20 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.15 via Frontend Transport; Fri, 4 Nov 2022 08:22:20 -0500 Received: from debianA11184.ad.cirrus.com (unknown [198.61.65.97]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id CEFF946C; Fri, 4 Nov 2022 13:22:19 +0000 (UTC) From: Richard Fitzgerald <rf@opensource.cirrus.com> To: <broonie@kernel.org> CC: <bcousson@baylibre.com>, <fparent@baylibre.com>, <misael.lopez@ti.com>, <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>, Richard Fitzgerald <rf@opensource.cirrus.com> Subject: [PATCH] ASoC: soc-pcm: Don't zero TDM masks in __soc_pcm_open() Date: Fri, 4 Nov 2022 13:22:13 +0000 Message-ID: <20221104132213.121847-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: fWI2S9PPXl7eF3HV6NjbLqkcIhYbmdIQ X-Proofpoint-GUID: fWI2S9PPXl7eF3HV6NjbLqkcIhYbmdIQ X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748572166308750832?= X-GMAIL-MSGID: =?utf-8?q?1748572166308750832?= |
Series |
ASoC: soc-pcm: Don't zero TDM masks in __soc_pcm_open()
|
|
Commit Message
Richard Fitzgerald
Nov. 4, 2022, 1:22 p.m. UTC
The DAI tx_mask and rx_mask are set by snd_soc_dai_set_tdm_slot()
and used by later code that depends on the TDM settings. So
__soc_pcm_open() should not be obliterating those mask values.
The code in __soc_pcm_hw_params() uses these masks to calculate the
active channels so that only the AIF_IN/AIF_OUT widgets for the
active TDM slots are enabled. The zeroing of the masks in
__soc_pcm_open() disables this functionality so all AIF widgets
were enabled even for channels that are not assigned to a TDM slot.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 2e5894d73789 ("ASoC: pcm: Add support for DAI multicodec")
---
sound/soc/soc-pcm.c | 5 -----
1 file changed, 5 deletions(-)
Comments
On Fri, 4 Nov 2022 13:22:13 +0000, Richard Fitzgerald wrote: > The DAI tx_mask and rx_mask are set by snd_soc_dai_set_tdm_slot() > and used by later code that depends on the TDM settings. So > __soc_pcm_open() should not be obliterating those mask values. > > The code in __soc_pcm_hw_params() uses these masks to calculate the > active channels so that only the AIF_IN/AIF_OUT widgets for the > active TDM slots are enabled. The zeroing of the masks in > __soc_pcm_open() disables this functionality so all AIF widgets > were enabled even for channels that are not assigned to a TDM slot. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: soc-pcm: Don't zero TDM masks in __soc_pcm_open() commit: 39bd801d6908900e9ab0cdc2655150f95ddd4f1a 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
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index d8e4677f3002..493f003273d0 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -822,11 +822,6 @@ static int __soc_pcm_open(struct snd_soc_pcm_runtime *rtd, ret = snd_soc_dai_startup(dai, substream); if (ret < 0) goto err; - - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) - dai->tx_mask = 0; - else - dai->rx_mask = 0; } /* Dynamic PCM DAI links compat checks use dynamic capabilities */