From patchwork Thu Apr 21 12:54:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Codrin Ciubotariu X-Patchwork-Id: 12821593 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F0E13C433EF for ; Thu, 21 Apr 2022 12:55:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5N8cIaOdU7sRe5S1AdsmF18D5/txIwOFxucj1rqBSl8=; b=EIAqVJUxtUzRJ5 Yi2B3U6FU0zEcoT4ZHuvqgbG8E5Foz+Cik0h30NeyFIKVRwFIc5u9wFfRNKMeXKXbSN75UFVp8yE8 FlpJ/2o+xPbsmVH73CDgxYG7tkst8ptyuYmj6oF9WCFegQcLqMGFBJ84X41NG9bZ72OvX9MSM75Ih a+6uYGVc+U3Vwf1NlCuFq/qdIcCxIlNASw7d16WpvEsjFya2EYm+tu9quuP49nU5rXzd42DOKiKB9 /NwbWVrQOju8lfMJACNzZZici1MPy2zXyi6eRLIL1DV7UAoghBCaUqN/Q7Fd91/fU+1fUfEL/+u8h rlHzdXhnMTAkPSqZwiGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhWKI-00DSUu-EX; Thu, 21 Apr 2022 12:54:26 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhWKE-00DSUB-Lb for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 12:54:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1650545662; x=1682081662; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=pgtX4YON8Zrq5OpIcU6N0ns6NSZEzAs8X3R7e2dHKOA=; b=0ljkS0QD9w6AHsFJpC0LXOA3gBdgv8ySyT+HzUqWSBiLbTi+mSM2r4T0 MxJP7waissIHfM9gNAR1tRulzLKL0DkhhuPR7GH3FlPswccemZMpfoAeK W6E4IBTKvDlVjY1jkxi7nqCfZsyun03WV48+q3jStjPw80QWjseqxAcvb ya7wOP22vC8RSuLOuxYE6NWfLjZGZ9p3jg/buUIlCP6K0M0BHK7AkWCVp Qefv7wStdKR6DppDBVS6ZrjmWMUUC64YxTXG7HtC+xUuiciDrvkRjSNOQ 7xz0+Wm9UpNmFu55maYCxSe50w0T4T3gqF1nEMawtEWE9DhNOWOmwiDrK Q==; X-IronPort-AV: E=Sophos;i="5.90,278,1643698800"; d="scan'208";a="161255136" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 21 Apr 2022 05:54:21 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 21 Apr 2022 05:54:20 -0700 Received: from rob-ult-m19940.amer.actel.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 21 Apr 2022 05:54:17 -0700 From: Codrin Ciubotariu To: , , CC: , , , , , Codrin Ciubotariu Subject: [PATCH 1/2] Revert "ASoC: dmaengine: do not use a NULL prepare_slave_config() callback" Date: Thu, 21 Apr 2022 15:54:02 +0300 Message-ID: <20220421125403.2180824-1-codrin.ciubotariu@microchip.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_055422_800530_8378025C X-CRM114-Status: GOOD ( 11.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This reverts commit 9a1e13440a4f2e7566fd4c5eae6a53e6400e08a4. As pointed out by Sascha Hauer, this patch changes: if (pmc->config && !pcm->config->prepare_slave_config) to: if (pmc->config && !pcm->config->prepare_slave_config) snd_dmaengine_pcm_prepare_slave_config() This breaks the drivers that do not need a call to dmaengine_slave_config(). Drivers that still need to call snd_dmaengine_pcm_prepare_slave_config(), but have a NULL pcm->config->prepare_slave_config should use snd_dmaengine_pcm_prepare_slave_config() as their prepare_slave_config callback. Fixes: 9a1e13440a4f ("ASoC: dmaengine: do not use a NULL prepare_slave_config() callback") Reported-by: Sascha Hauer Signed-off-by: Codrin Ciubotariu --- sound/soc/soc-generic-dmaengine-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 2ab2ddc1294dd..285441d6aeed4 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -86,10 +86,10 @@ static int dmaengine_pcm_hw_params(struct snd_soc_component *component, memset(&slave_config, 0, sizeof(slave_config)); - if (pcm->config && pcm->config->prepare_slave_config) - prepare_slave_config = pcm->config->prepare_slave_config; - else + if (!pcm->config) prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; + else + prepare_slave_config = pcm->config->prepare_slave_config; if (prepare_slave_config) { int ret = prepare_slave_config(substream, params, &slave_config);