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); From patchwork Thu Apr 21 12:54:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Codrin Ciubotariu X-Patchwork-Id: 12821594 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 3709BC433F5 for ; Thu, 21 Apr 2022 12:55:35 +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:References:In-Reply-To: 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: List-Owner; bh=ausVzRM7BLf2XTYfbLkPIbMxcoOqAFhfBGzjyHHH5Ek=; b=1wJgSLld+yqdsR YNppfcOsZNOLZZjHaStTypV798mdHj62X7vcpLil3mAuUMZmWDU/Kosk8b6UYLhRvWevZrWtKytHa CUiM641elTVS9JUgJhrIJnCQxMWFRHsL3FLTUloD5o0gWMY17+n3qpdodKdCk6HKn7rK9FwJv5oIE AzWbnJKiQ0oFhuSaEAL30hOqhm4Cuik1ha1pW+8kwLIcIyb5zWseGFBGaX7jfrmBTlmTn9YNRddO8 LvfjYTaw/O7yWjVK3Eqt7hyhfnVpt6Xc2ZUlFISh15SgFrMwg8ZkkgeSwYiyq3JYGpN5mZ1Ups0pn dr3OBZa2IcpwGToysi1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhWKW-00DSXo-1X; Thu, 21 Apr 2022 12:54:40 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhWKS-00DSWK-NJ for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 12:54:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1650545676; x=1682081676; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5fez7wr8uqc+IWPhOReqP+qP7BSjjeMLlqht5y+cQyI=; b=D9uR5GTdtLTTjM642CpcV3FNh7FmpwthfYIZjd2pK/LeHJXlTsVRTeCK n8pHbYxTNkp1a/qn/GZk0qUArCN5EBLPvZ8lKtXhoIuqqosd1ypl4xS6e KhFYa6Yb6aCb3hOaviJYrVGcw3HJaDHzWaoa8y/c/H6HMfeHp5hubAVKx utHf9IbIo9MChG5AQug7wvutccrit+kGFUY+62kH6i1FZK5m+dArxl7Hf Y9bgsa2BSPpRuDAG6A5CinrOUen3dS9u3EJ7xGaVlq8Mzk/cSWMjhBM2w SFT0AoAQTMReEpgy8dm7m+hqELd/YpD29yOuF1pnU0XSxNo4VkR+8nooy g==; X-IronPort-AV: E=Sophos;i="5.90,278,1643698800"; d="scan'208";a="156304300" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 21 Apr 2022 05:54:24 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) 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:24 -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:21 -0700 From: Codrin Ciubotariu To: , , CC: , , , , , Codrin Ciubotariu Subject: [PATCH 2/2] ASoC: atmel: mchp-pdmc: set prepare_slave_config Date: Thu, 21 Apr 2022 15:54:03 +0300 Message-ID: <20220421125403.2180824-2-codrin.ciubotariu@microchip.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220421125403.2180824-1-codrin.ciubotariu@microchip.com> References: <20220421125403.2180824-1-codrin.ciubotariu@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_055436_871364_F6165EB3 X-CRM114-Status: UNSURE ( 8.89 ) X-CRM114-Notice: Please train this message. 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 Since a pointer to struct snd_dmaengine_pcm_config is passed, snd_dmaengine_pcm_prepare_slave_config() is no longer called unless it's explicitly set in prepare_slave_config. Fixes: 50291652af52 ("ASoC: atmel: mchp-pdmc: add PDMC driver") Suggested-by: Sascha Hauer Signed-off-by: Codrin Ciubotariu --- sound/soc/atmel/mchp-pdmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c index 1a7802fbf23c1..a3856c73e2214 100644 --- a/sound/soc/atmel/mchp-pdmc.c +++ b/sound/soc/atmel/mchp-pdmc.c @@ -966,6 +966,7 @@ static int mchp_pdmc_process(struct snd_pcm_substream *substream, static struct snd_dmaengine_pcm_config mchp_pdmc_config = { .process = mchp_pdmc_process, + .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config, }; static int mchp_pdmc_probe(struct platform_device *pdev)