From patchwork Wed Jan 18 16:10:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 45368 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2426514wrn; Wed, 18 Jan 2023 08:17:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXsghaFIL4+hJYKSSBvGZ/c7oY7kRZIJa/+0wWQtaH6s3xW4nOsf8wrsqrPLJkIzfsXKPEFB X-Received: by 2002:a17:90a:df0d:b0:226:8b19:4b0f with SMTP id gp13-20020a17090adf0d00b002268b194b0fmr7661574pjb.24.1674058672741; Wed, 18 Jan 2023 08:17:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674058672; cv=none; d=google.com; s=arc-20160816; b=tprqLyZzMpsKFJZgdDkgOkZxAKQl92Qmx4n7OQgMC3rT7kiIdRKd25yFp3HPMYXENl OGyhSa7CFLZmw439yzljeHLCVzlul2E9gUACOaX3QxC8EBHGzoUG2CTICfp80L/LoOCF FWoEnc+A4P3qBOhlUg9k3s+3g2i7K8FhN+CSPNVEl82KAOu8FJuOmEZaKfB7OWIAomjH 450Egi1dGPW8CTfxCWsDpavWrEE6xIr7z/lPGNYRH/PVgIwAGmMuzjTQEul6v5LCMBMy 8rwbQ8b8jpN4fb/rY/EzF8RhKgu+sPfLJXZT1iikOR/vQXi+gqVb4VA6HUXXVBlOh9jF Tyow== 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=evsozFdnX80BA1Z/YwFbx/V9wZRbsLzqw6NG0Aq290w=; b=nACBiqpxLtbOTY4cgdzWVOs4GwpTGnqkhZGXURoVSnvcOCVJg/n1YjqSrL4BX4yQiK jAQYKGU0KILzuRgzuf6is6e3+NRDI3+EF/KHG32fLQBQfaJwUUqMS6CgvvD1dMm09oiq vyPpMyIF8eGkXIFmRAJs2WfCCy0VL4NbO2tLz2H/a+M4AWGYIkNOoHsLzD3K2qAVx09E lzJ1vRG+6+SxQYq8ZhHU8hgfUZ/OCahUZci5I0p7cMpIXmtmo7aF0GyNaUiihPfBlL+Z xT5+f8cz0F2X9nXEOxYIvju1vWvVj7cZg/ceQ23/evO0c+7xrzePI2PEg+nDmbNtersJ 6ATw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i3OjmvfJ; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id on12-20020a17090b1d0c00b002290c209ccdsi988805pjb.150.2023.01.18.08.17.39; Wed, 18 Jan 2023 08:17:52 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=i3OjmvfJ; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229910AbjARQQG (ORCPT + 99 others); Wed, 18 Jan 2023 11:16:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbjARQPu (ORCPT ); Wed, 18 Jan 2023 11:15:50 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 930DB58661; Wed, 18 Jan 2023 08:11:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B629D618C4; Wed, 18 Jan 2023 16:11:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52746C433F0; Wed, 18 Jan 2023 16:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674058276; bh=9lsf4Rm2C5XkHcvH4f3NT1A03Z7ddyEqH7Ndpj9WVgQ=; h=From:To:Cc:Subject:Date:From; b=i3OjmvfJjrkOXSvvqNgnEwsRYksBPCnCC9hmz2oWHToSKf12DPIRywVZxRy+j/S5z 3UpnDj96kUM//uubhRWA83wDFKzQ8D2oRtbnlrIzemF9jOsmWR0BGdp3k9ZzZsuhmg Yq8DpJzAYze99A9hkmYg1qhWdaOB6/SBEV8eByE5FbhiowKat4fvsgW4hFlPUss2ic /e3pvEr/xwE810fWpINZiNBGJSmd8RXe48GQrdqGjv4hg7SO8PX1n/Dt0N+tiwu1NK sScI5I2xKUlSFd5C5+zdqam1QkrXPaB/oIKMc1+o88EKQGORcT4N2IFL+ZNr5ZOPWR 3q34Q2PIOJklA== From: Arnd Bergmann To: Sylwester Nawrocki , Mark Brown Cc: Arnd Bergmann , Krzysztof Kozlowski , Alim Akhtar , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Charles Keepax , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 1/5] ASoC: samsung: remove DMA filter function and data Date: Wed, 18 Jan 2023 17:10:45 +0100 Message-Id: <20230118161110.521504-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755377747107057317?= X-GMAIL-MSGID: =?utf-8?q?1755377747107057317?= From: Arnd Bergmann This data is no longer passed by the platform code, so there is no point passing it down at all. Signed-off-by: Arnd Bergmann Acked-by: Krzysztof Kozlowski --- include/linux/platform_data/asoc-s3c.h | 6 ------ sound/soc/samsung/dma.h | 2 +- sound/soc/samsung/dmaengine.c | 3 +-- sound/soc/samsung/i2s.c | 21 +++------------------ sound/soc/samsung/pcm.c | 11 +---------- sound/soc/samsung/spdif.c | 9 +-------- 6 files changed, 7 insertions(+), 45 deletions(-) diff --git a/include/linux/platform_data/asoc-s3c.h b/include/linux/platform_data/asoc-s3c.h index f9c00f839e9f..84874433cf21 100644 --- a/include/linux/platform_data/asoc-s3c.h +++ b/include/linux/platform_data/asoc-s3c.h @@ -30,7 +30,6 @@ struct samsung_i2s_type { #define QUIRK_SUPPORTS_IDMA (1 << 5) /* Quirks of the I2S controller */ u32 quirks; - dma_addr_t idma_addr; }; /** @@ -39,10 +38,5 @@ struct samsung_i2s_type { */ struct s3c_audio_pdata { int (*cfg_gpio)(struct platform_device *); - dma_filter_fn dma_filter; - void *dma_playback; - void *dma_capture; - void *dma_play_sec; - void *dma_capture_mic; struct samsung_i2s_type type; }; diff --git a/sound/soc/samsung/dma.h b/sound/soc/samsung/dma.h index 7b5d4556e0fd..bd0faf84972e 100644 --- a/sound/soc/samsung/dma.h +++ b/sound/soc/samsung/dma.h @@ -12,7 +12,7 @@ * @tx, @rx arguments can be NULL if the DMA channel names are "tx", "rx", * otherwise actual DMA channel names must be passed to this function. */ -int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter, +int samsung_asoc_dma_platform_register(struct device *dev, const char *tx, const char *rx, struct device *dma_dev); #endif /* _SAMSUNG_DMA_H */ diff --git a/sound/soc/samsung/dmaengine.c b/sound/soc/samsung/dmaengine.c index 2802789a323e..900953ee3786 100644 --- a/sound/soc/samsung/dmaengine.c +++ b/sound/soc/samsung/dmaengine.c @@ -14,7 +14,7 @@ #include "dma.h" -int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter, +int samsung_asoc_dma_platform_register(struct device *dev, const char *tx, const char *rx, struct device *dma_dev) { @@ -25,7 +25,6 @@ int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter, return -ENOMEM; pcm_conf->prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; - pcm_conf->compat_filter_fn = filter; pcm_conf->dma_dev = dma_dev; pcm_conf->chan_names[SNDRV_PCM_STREAM_PLAYBACK] = tx; diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 9505200f3d11..052c263c126a 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -79,7 +79,6 @@ struct i2s_dai { struct snd_dmaengine_dai_dma_data dma_playback; struct snd_dmaengine_dai_dma_data dma_capture; struct snd_dmaengine_dai_dma_data idma_playback; - dma_filter_fn filter; struct samsung_i2s_priv *priv; }; @@ -1431,13 +1430,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) spin_lock_init(&priv->lock); spin_lock_init(&priv->pcm_lock); - if (!np) { - pri_dai->dma_playback.filter_data = i2s_pdata->dma_playback; - pri_dai->dma_capture.filter_data = i2s_pdata->dma_capture; - pri_dai->filter = i2s_pdata->dma_filter; - - idma_addr = i2s_pdata->type.idma_addr; - } else { + if (np) { if (of_property_read_u32(np, "samsung,idma-addr", &idma_addr)) { if (priv->quirks & QUIRK_SUPPORTS_IDMA) { @@ -1475,8 +1468,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) if (priv->quirks & QUIRK_PRI_6CHAN) pri_dai->drv->playback.channels_max = 6; - ret = samsung_asoc_dma_platform_register(&pdev->dev, pri_dai->filter, - "tx", "rx", NULL); + ret = samsung_asoc_dma_platform_register(&pdev->dev, "tx", "rx", NULL); if (ret < 0) goto err_disable_clk; @@ -1485,12 +1477,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) sec_dai->dma_playback.addr = regs_base + I2STXDS; sec_dai->dma_playback.chan_name = "tx-sec"; - - if (!np) { - sec_dai->dma_playback.filter_data = i2s_pdata->dma_play_sec; - sec_dai->filter = i2s_pdata->dma_filter; - } - sec_dai->dma_playback.addr_width = 4; sec_dai->idma_playback.addr = idma_addr; sec_dai->pri_dai = pri_dai; @@ -1502,8 +1488,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) goto err_disable_clk; ret = samsung_asoc_dma_platform_register(&priv->pdev_sec->dev, - sec_dai->filter, "tx-sec", NULL, - &pdev->dev); + "tx-sec", NULL, &pdev->dev); if (ret < 0) goto err_del_sec; diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index e859252ae5e6..2f3a99de6434 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -489,7 +489,6 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) struct s3c_pcm_info *pcm; struct resource *mem_res; struct s3c_audio_pdata *pcm_pdata; - dma_filter_fn filter; int ret; /* Check for valid device index */ @@ -542,18 +541,10 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) s3c_pcm_stereo_in[pdev->id].addr = mem_res->start + S3C_PCM_RXFIFO; s3c_pcm_stereo_out[pdev->id].addr = mem_res->start + S3C_PCM_TXFIFO; - filter = NULL; - if (pcm_pdata) { - s3c_pcm_stereo_in[pdev->id].filter_data = pcm_pdata->dma_capture; - s3c_pcm_stereo_out[pdev->id].filter_data = pcm_pdata->dma_playback; - filter = pcm_pdata->dma_filter; - } - pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id]; pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id]; - ret = samsung_asoc_dma_platform_register(&pdev->dev, filter, - NULL, NULL, NULL); + ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL, NULL, NULL); if (ret) { dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret); goto err_dis_pclk; diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index 7d815e237e5c..beabcadd7d1d 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c @@ -363,7 +363,6 @@ static int spdif_probe(struct platform_device *pdev) struct s3c_audio_pdata *spdif_pdata; struct resource *mem_res; struct samsung_spdif_info *spdif; - dma_filter_fn filter; int ret; spdif_pdata = pdev->dev.platform_data; @@ -424,15 +423,9 @@ static int spdif_probe(struct platform_device *pdev) spdif_stereo_out.addr_width = 2; spdif_stereo_out.addr = mem_res->start + DATA_OUTBUF; - filter = NULL; - if (spdif_pdata) { - spdif_stereo_out.filter_data = spdif_pdata->dma_playback; - filter = spdif_pdata->dma_filter; - } spdif->dma_playback = &spdif_stereo_out; - ret = samsung_asoc_dma_platform_register(&pdev->dev, filter, - NULL, NULL, NULL); + ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL, NULL, NULL); if (ret) { dev_err(&pdev->dev, "failed to register DMA: %d\n", ret); goto err4; From patchwork Wed Jan 18 16:10:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 45369 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2426798wrn; Wed, 18 Jan 2023 08:18:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXsyh4KGpqY8/uy2v19w4aPmfpvIWFButsef7o6KkfNXX0aAKHSJHp/X5+MuasJAEQnYVdc5 X-Received: by 2002:a17:902:d512:b0:192:fd1e:a968 with SMTP id b18-20020a170902d51200b00192fd1ea968mr11335575plg.46.1674058700371; Wed, 18 Jan 2023 08:18:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674058700; cv=none; d=google.com; s=arc-20160816; b=KkfWIJtRqXsTk38ybOZHeI9ZVbwjwky6jy0U2Lye6SrrHH0Fe3RCwrLdZ3dDy0J4QD XKUWefAlI7Ns01qLikDxc08Skn74ySMHhcM+DStgu+uSAqQ5sxXJjl1dC7AUGCRrKX6M K2jC0NsJq5F3Wb3dFDjGpyioich+Bp46Xhj0etzevehrRU/bfYzhl5JiCDU+OfwBgEFy m4ROw3U7PxLu0dHMtpJetCLPMs8cPK2JmXBZSifV+yB1Lii17W+zUkv0d7NQ+tv+uKzq XvSqeYZIqV6U4Fje4trjkZwToOa3sJzKIIK1CXyCYk5wACMUutF/4+FVMLhU3y8T61q7 uRVQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3F+CHeoiRc+Ei4DK3sEa6lMv9wRPbMkXFiK11quKHzI=; b=t39eq39Iw2tBAZSHu76OoFK0tdI1VtMZPP7AOuiFwB3z5qD7JLWffD7XpqCJIi/lwB r6xM4dbb2vvOYcfpFcAf8vxnO97h/k39WkKychPwh+Dey+0WxrxZFS8aGgUiW+9MCV1W VkZXEgfzIipdOT3UG6xtQlx38nwJSdBjm9/f+rz+kUkPxSXSVdsfLsAEWBb9CjCvYY38 JHxIMdft05hQuJWt8uVYk8F7AGZxK5APua7360tZrTmbyM6P/qTQ7y433kYzaZ+u8K1R ZtR0SK75cWJO3VCN1/oKHnLeHOhpCrqJuLL3kKdb9zbePDo6qKh5FVoAJmv1xoP6PxLz QBtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ivc0Sazk; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a170903124c00b0018996404dd9si38323111plh.267.2023.01.18.08.18.03; Wed, 18 Jan 2023 08:18:20 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=Ivc0Sazk; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbjARQRL (ORCPT + 99 others); Wed, 18 Jan 2023 11:17:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbjARQQj (ORCPT ); Wed, 18 Jan 2023 11:16:39 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 694375CE78 for ; Wed, 18 Jan 2023 08:12:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 75C5F618A9 for ; Wed, 18 Jan 2023 16:11:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 180ECC433D2; Wed, 18 Jan 2023 16:11:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674058309; bh=hfA2eXgm6COXrjgq0eXTI7FELNoNzfagIjCDGXpAipY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ivc0SazkaMpDaLRHVArm23f6+rwNgRkiIfG9MwhAW7qvfmEaAYeDraa6/XCaDxrJ1 s42Fqalv3DxyTCHjVmgR8W32HF/qP6/Dx61YFXpEaOP8tn2Gr1Fh7eHREZwxxm7K54 fZy5Z9xLEZA+VzFAFTeaIIvCY0qkmPpqf6N0sNFbxZhX6PWWIg3LNKLNnP1nLvsw+N Zd76G5DoooNgMXU4IQNxTLAIUJwHq/J4RYM3kl2VbBPz7kM5ZNGjaeLYwubohztVLT sjXcrSSe5mXmWxmBmUeeg9JSPgB99Eonvxw15xGm4MVLv9Lpi5P+Fa6h+OZ0JZQ6ac d0Gdcn5OqDrYw== From: Arnd Bergmann To: Lars-Peter Clausen , Jaroslav Kysela , Takashi Iwai Cc: Arnd Bergmann , Eugeniu Rosca , Andreas Pape , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] ASoC: pxa: remove snd_dmaengine_pcm_open_request_chan() Date: Wed, 18 Jan 2023 17:10:46 +0100 Message-Id: <20230118161110.521504-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118161110.521504-1-arnd@kernel.org> References: <20230118161110.521504-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755377776005182256?= X-GMAIL-MSGID: =?utf-8?q?1755377776005182256?= From: Arnd Bergmann The last caller was removed, so there is no longer a need for this function. Signed-off-by: Arnd Bergmann --- include/sound/dmaengine_pcm.h | 2 -- sound/core/pcm_dmaengine.c | 21 --------------------- 2 files changed, 23 deletions(-) diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index 2df54cf02cb3..a497d1f81cab 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h @@ -37,8 +37,6 @@ int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream, struct dma_chan *chan); int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream); -int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream, - dma_filter_fn filter_fn, void *filter_data); int snd_dmaengine_pcm_close_release_chan(struct snd_pcm_substream *substream); struct dma_chan *snd_dmaengine_pcm_request_channel(dma_filter_fn filter_fn, diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c index 494ec0c207fa..9f4120f020d8 100644 --- a/sound/core/pcm_dmaengine.c +++ b/sound/core/pcm_dmaengine.c @@ -328,27 +328,6 @@ int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream, } EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open); -/** - * snd_dmaengine_pcm_open_request_chan - Open a dmaengine based PCM substream and request channel - * @substream: PCM substream - * @filter_fn: Filter function used to request the DMA channel - * @filter_data: Data passed to the DMA filter function - * - * This function will request a DMA channel using the passed filter function and - * data. The function should usually be called from the pcm open callback. Note - * that this function will use private_data field of the substream's runtime. So - * it is not available to your pcm driver implementation. - * - * Return: 0 on success, a negative error code otherwise - */ -int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream, - dma_filter_fn filter_fn, void *filter_data) -{ - return snd_dmaengine_pcm_open(substream, - snd_dmaengine_pcm_request_channel(filter_fn, filter_data)); -} -EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan); - /** * snd_dmaengine_pcm_close - Close a dmaengine based PCM substream * @substream: PCM substream From patchwork Wed Jan 18 16:10:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 45370 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2426904wrn; Wed, 18 Jan 2023 08:18:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXtaBDuDqbIx/sNW0qtv3gSzVvKH9YAiQOYWTsKJ+rW/QR7UNIGtiSmcMu0nGwYZNwcxqI4y X-Received: by 2002:a17:90a:950c:b0:228:d353:9612 with SMTP id t12-20020a17090a950c00b00228d3539612mr7793372pjo.31.1674058710751; Wed, 18 Jan 2023 08:18:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674058710; cv=none; d=google.com; s=arc-20160816; b=izme6S2Io8YCqC9eKCwMK+GAiOzs47oDZEulAy7Ho8otSoSSqj5rUPc8bt+8FHQ070 Qw73RLjYlwwpCVhT0Cbspfwelibwfl+a6PUxt3tlJpLs0z8HrqmW19lWXh/FgCuFNe3L Cso5aHZqYzYJWi4kiSqH/zzWbBscsacRh6NAeX6qiLWKycAohydFcev7UxkwTKxrJcGB IkC7hLtmXAUHiVJHTemavDBu9JCztSakJMa3R2XEhCV97T5yswh9tT2jIqwZ+4kU7kPx oPrc5l6kWA+Zao5ia5v2JPQWowSXDdMDQqIlosSUG2XViVnvpnmRv+r8dJ51q6Ox9GAP ub0Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ENST7WC/xWKyi+Q671vTpXQAVeucOWoLEDTUB/tmr7I=; b=03q3xpbfvwYCYsleFsecVxLfIqt0A0oMUc26Gu2HSBrRxkQsGWlib2rJ7MtZS6QVn/ CHjrEF5rCrNv0Zz3xd3Luh8e88Mq1FVmYtUPLzVAkXx+1upbfyWk97AMRr0XW9kghXXg mESb8jfWVKW6qKAkABH148Jx0Uli+o378vjcLkWB32oKhKyP+dPhe0kJ07R7Nzt9AJpc Wml6GazIet/wzKvwSJCB1n/P9VmRzMwtakhcOj4wdH1D4REK/7pFnN9PRSKKqYwrl3oh hUCOKtq4FnuaLbhHFGD6BAbRNOMmMUJEbTVMsSMfgAMuNFdAmxosO6OPnmW7Bz1XW7/A gv2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=csPz9UFJ; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q78-20020a632a51000000b004ce5301edd9si7599253pgq.120.2023.01.18.08.18.15; Wed, 18 Jan 2023 08:18:30 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=csPz9UFJ; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229886AbjARQRh (ORCPT + 99 others); Wed, 18 Jan 2023 11:17:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230316AbjARQRL (ORCPT ); Wed, 18 Jan 2023 11:17:11 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13F095925F for ; Wed, 18 Jan 2023 08:12:28 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 180F9CE1ACF for ; Wed, 18 Jan 2023 16:12:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BD90C433D2; Wed, 18 Jan 2023 16:12:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674058337; bh=ZaB0jPSlW+7245jsSFJeMaTfSXc84tEsHJbnVHIlhqI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=csPz9UFJ1L7KvneFNN/r9YdtjUi0fXBd7mkaC+LXTkEIGr3YUUEprrdIM4JvliaHi xpp8Vd22z/ACB/bO1WN5247vMS/WUUv6eowg3u8xNpDwUygr72s5CsL7ngxPY5n9vp 1CvfEDWDEDO0RmOMmctjGlhzmA4FtMQkelqBPI/1wvNJCuDSl+JsD1oAq+Wy+YGJ5b Z5kMmO5h3+r0kMQEzIfwvxbSaDCcEcP0rhnmqKNoeoRg/t7hCOrL83WgRlB5brZMKo M5UmMafLXN0ScIZ3Akvm88kJwgp3X0BrHWdjTqh9a4aZZY/O/w8cXk4ZYXuOlY7n5u osVghm+IDOyKg== From: Arnd Bergmann To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Arnd Bergmann , Christophe JAILLET , Charles Keepax , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 3/5] ASoC: ux500: remove platform_data support Date: Wed, 18 Jan 2023 17:10:47 +0100 Message-Id: <20230118161110.521504-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118161110.521504-1-arnd@kernel.org> References: <20230118161110.521504-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755377786876361876?= X-GMAIL-MSGID: =?utf-8?q?1755377786876361876?= From: Arnd Bergmann The platform data definition for ux500 sound devices was removed six years ago after the DT conversion was completed, see commit 4b483ed0be8b ("ARM: ux500: cut some platform data"). Remove some leftover bits in the ASoC driver and just assume that it always gets probed using DT. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij --- include/linux/platform_data/asoc-ux500-msp.h | 20 ---------- sound/soc/ux500/mop500.c | 8 ++-- sound/soc/ux500/ux500_msp_dai.c | 33 +-------------- sound/soc/ux500/ux500_msp_i2s.c | 33 +++------------ sound/soc/ux500/ux500_msp_i2s.h | 5 +-- sound/soc/ux500/ux500_pcm.c | 42 ++------------------ 6 files changed, 15 insertions(+), 126 deletions(-) delete mode 100644 include/linux/platform_data/asoc-ux500-msp.h diff --git a/include/linux/platform_data/asoc-ux500-msp.h b/include/linux/platform_data/asoc-ux500-msp.h deleted file mode 100644 index b8d0f730dda8..000000000000 --- a/include/linux/platform_data/asoc-ux500-msp.h +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (C) ST-Ericsson SA 2010 - * - * Author: Rabin Vincent for ST-Ericsson - */ - -#ifndef __MSP_H -#define __MSP_H - -#include - -/* Platform data structure for a MSP I2S-device */ -struct msp_i2s_platform_data { - int id; - struct stedma40_chan_cfg *msp_i2s_dma_rx; - struct stedma40_chan_cfg *msp_i2s_dma_tx; -}; - -#endif diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index fdd55d772b8e..325e75e96136 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c @@ -109,11 +109,9 @@ static int mop500_probe(struct platform_device *pdev) mop500_card.dev = &pdev->dev; - if (np) { - ret = mop500_of_probe(pdev, np); - if (ret) - return ret; - } + ret = mop500_of_probe(pdev, np); + if (ret) + return ret; dev_dbg(&pdev->dev, "%s: Card %s: Set platform drvdata.\n", __func__, mop500_card.name); diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c index 9d99ea6d7f30..6e86efd06ec1 100644 --- a/sound/soc/ux500/ux500_msp_dai.c +++ b/sound/soc/ux500/ux500_msp_dai.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -682,26 +681,6 @@ static int ux500_msp_dai_of_probe(struct snd_soc_dai *dai) return 0; } -static int ux500_msp_dai_probe(struct snd_soc_dai *dai) -{ - struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(dai->dev); - struct msp_i2s_platform_data *pdata = dai->dev->platform_data; - int ret; - - if (!pdata) { - ret = ux500_msp_dai_of_probe(dai); - return ret; - } - - drvdata->msp->playback_dma_data.data_size = drvdata->slot_width; - drvdata->msp->capture_dma_data.data_size = drvdata->slot_width; - - snd_soc_dai_init_dma_data(dai, - &drvdata->msp->playback_dma_data, - &drvdata->msp->capture_dma_data); - return 0; -} - static const struct snd_soc_dai_ops ux500_msp_dai_ops[] = { { .set_sysclk = ux500_msp_dai_set_dai_sysclk, @@ -716,7 +695,7 @@ static const struct snd_soc_dai_ops ux500_msp_dai_ops[] = { }; static struct snd_soc_dai_driver ux500_msp_dai_drv = { - .probe = ux500_msp_dai_probe, + .probe = ux500_msp_dai_of_probe, .playback.channels_min = UX500_MSP_MIN_CHANNELS, .playback.channels_max = UX500_MSP_MAX_CHANNELS, .playback.rates = UX500_I2S_RATES, @@ -737,15 +716,8 @@ static const struct snd_soc_component_driver ux500_msp_component = { static int ux500_msp_drv_probe(struct platform_device *pdev) { struct ux500_msp_i2s_drvdata *drvdata; - struct msp_i2s_platform_data *pdata = pdev->dev.platform_data; - struct device_node *np = pdev->dev.of_node; int ret = 0; - if (!pdata && !np) { - dev_err(&pdev->dev, "No platform data or Device Tree found\n"); - return -ENODEV; - } - drvdata = devm_kzalloc(&pdev->dev, sizeof(struct ux500_msp_i2s_drvdata), GFP_KERNEL); @@ -787,8 +759,7 @@ static int ux500_msp_drv_probe(struct platform_device *pdev) return ret; } - ret = ux500_msp_i2s_init_msp(pdev, &drvdata->msp, - pdev->dev.platform_data); + ret = ux500_msp_i2s_init_msp(pdev, &drvdata->msp); if (!drvdata->msp) { dev_err(&pdev->dev, "%s: ERROR: Failed to init MSP-struct (%d)!", diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c index d113411a19f8..bfca5553381f 100644 --- a/sound/soc/ux500/ux500_msp_i2s.c +++ b/sound/soc/ux500/ux500_msp_i2s.c @@ -14,7 +14,6 @@ #include #include #include -#include #include @@ -640,18 +639,8 @@ int ux500_msp_i2s_close(struct ux500_msp *msp, unsigned int dir) } static int ux500_msp_i2s_of_init_msp(struct platform_device *pdev, - struct ux500_msp *msp, - struct msp_i2s_platform_data **platform_data) + struct ux500_msp *msp); { - struct msp_i2s_platform_data *pdata; - - *platform_data = devm_kzalloc(&pdev->dev, - sizeof(struct msp_i2s_platform_data), - GFP_KERNEL); - pdata = *platform_data; - if (!pdata) - return -ENOMEM; - msp->playback_dma_data.dma_cfg = devm_kzalloc(&pdev->dev, sizeof(struct stedma40_chan_cfg), GFP_KERNEL); @@ -668,11 +657,9 @@ static int ux500_msp_i2s_of_init_msp(struct platform_device *pdev, } int ux500_msp_i2s_init_msp(struct platform_device *pdev, - struct ux500_msp **msp_p, - struct msp_i2s_platform_data *platform_data) + struct ux500_msp **msp_p) { struct resource *res = NULL; - struct device_node *np = pdev->dev.of_node; struct ux500_msp *msp; int ret; @@ -681,19 +668,9 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev, if (!msp) return -ENOMEM; - if (!platform_data) { - if (np) { - ret = ux500_msp_i2s_of_init_msp(pdev, msp, - &platform_data); - if (ret) - return ret; - } else - return -EINVAL; - } else { - msp->playback_dma_data.dma_cfg = platform_data->msp_i2s_dma_tx; - msp->capture_dma_data.dma_cfg = platform_data->msp_i2s_dma_rx; - msp->id = platform_data->id; - } + ret = ux500_msp_i2s_of_init_msp(pdev, msp); + if (ret) + return ret; msp->dev = &pdev->dev; diff --git a/sound/soc/ux500/ux500_msp_i2s.h b/sound/soc/ux500/ux500_msp_i2s.h index d45b5e2831cc..6b353423b75a 100644 --- a/sound/soc/ux500/ux500_msp_i2s.h +++ b/sound/soc/ux500/ux500_msp_i2s.h @@ -11,7 +11,6 @@ #define UX500_MSP_I2S_H #include -#include #define MSP_INPUT_FREQ_APB 48000000 @@ -482,10 +481,8 @@ struct ux500_msp { unsigned int f_bitclk; }; -struct msp_i2s_platform_data; int ux500_msp_i2s_init_msp(struct platform_device *pdev, - struct ux500_msp **msp_p, - struct msp_i2s_platform_data *platform_data); + struct ux500_msp **msp_p); void ux500_msp_i2s_cleanup_msp(struct platform_device *pdev, struct ux500_msp *msp); int ux500_msp_i2s_open(struct ux500_msp *msp, struct ux500_msp_config *config); diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c index d3802e5ef196..ca87517d80c9 100644 --- a/sound/soc/ux500/ux500_pcm.c +++ b/sound/soc/ux500/ux500_pcm.c @@ -29,18 +29,6 @@ #define UX500_PLATFORM_PERIODS_MAX 48 #define UX500_PLATFORM_BUFFER_BYTES_MAX (2048 * PAGE_SIZE) -static const struct snd_pcm_hardware ux500_pcm_hw = { - .info = SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_RESUME | - SNDRV_PCM_INFO_PAUSE, - .buffer_bytes_max = UX500_PLATFORM_BUFFER_BYTES_MAX, - .period_bytes_min = UX500_PLATFORM_PERIODS_BYTES_MIN, - .period_bytes_max = UX500_PLATFORM_PERIODS_BYTES_MAX, - .periods_min = UX500_PLATFORM_PERIODS_MIN, - .periods_max = UX500_PLATFORM_PERIODS_MAX, -}; - static struct dma_chan *ux500_pcm_request_chan(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_substream *substream) { @@ -84,21 +72,12 @@ static int ux500_pcm_prepare_slave_config(struct snd_pcm_substream *substream, struct dma_slave_config *slave_config) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); - struct msp_i2s_platform_data *pdata = asoc_rtd_to_cpu(rtd, 0)->dev->platform_data; struct snd_dmaengine_dai_dma_data *snd_dma_params; - struct ux500_msp_dma_params *ste_dma_params; dma_addr_t dma_addr; int ret; - if (pdata) { - ste_dma_params = - snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); - dma_addr = ste_dma_params->tx_rx_addr; - } else { - snd_dma_params = - snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); - dma_addr = snd_dma_params->addr; - } + snd_dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); + dma_addr = snd_dma_params->addr; ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config); if (ret) @@ -118,13 +97,6 @@ static int ux500_pcm_prepare_slave_config(struct snd_pcm_substream *substream, return 0; } -static const struct snd_dmaengine_pcm_config ux500_dmaengine_pcm_config = { - .pcm_hardware = &ux500_pcm_hw, - .compat_request_channel = ux500_pcm_request_chan, - .prealloc_buffer_size = 128 * 1024, - .prepare_slave_config = ux500_pcm_prepare_slave_config, -}; - static const struct snd_dmaengine_pcm_config ux500_dmaengine_of_pcm_config = { .compat_request_channel = ux500_pcm_request_chan, .prepare_slave_config = ux500_pcm_prepare_slave_config, @@ -132,16 +104,10 @@ static const struct snd_dmaengine_pcm_config ux500_dmaengine_of_pcm_config = { int ux500_pcm_register_platform(struct platform_device *pdev) { - const struct snd_dmaengine_pcm_config *pcm_config; - struct device_node *np = pdev->dev.of_node; int ret; - if (np) - pcm_config = &ux500_dmaengine_of_pcm_config; - else - pcm_config = &ux500_dmaengine_pcm_config; - - ret = snd_dmaengine_pcm_register(&pdev->dev, pcm_config, + ret = snd_dmaengine_pcm_register(&pdev->dev, + &ux500_dmaengine_of_pcm_config, SND_DMAENGINE_PCM_FLAG_COMPAT); if (ret < 0) { dev_err(&pdev->dev, From patchwork Wed Jan 18 16:10:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 45371 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2427100wrn; Wed, 18 Jan 2023 08:18:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXtJXMoZF1IBhCQy5zmYjqIbg0tS8jwdAB5wjIeOd1GisDR5FMz1/zIRyuQH/jWbvMknWIiH X-Received: by 2002:a17:90a:6545:b0:229:9b0a:360e with SMTP id f5-20020a17090a654500b002299b0a360emr7909245pjs.12.1674058729944; Wed, 18 Jan 2023 08:18:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674058729; cv=none; d=google.com; s=arc-20160816; b=naXCpsMgcfBaD/7xPcgAqrcNcfr6M7gup0Fd+ntmXiZReQwX9m0Tigrh/8pCG+w7gE W/9rE1MWq75DV4cQGo/iWOTMCkWdqH6FivonWgV8BF1kRO7Pxx4b3cibm/3TXVVoMGVY IzhvhRIj+CF/fHSK0caU9alJZFuevVd53T/O6xW6uivdh8MhLPbRpLF2lXVai6N4pUg8 hlYuTDj37K7D607i2G+Atih3UFqVbL794XCankH+7nJ7qPSJi+O/AUjeENww/yQj7B6+ qIDyqyFtPjJUa8mC+iirBsdKSlRlMJuCPksv3Cl31ZMwAQfR++c5Tojc0mNyK3/vfEPf Gsgw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UxEpzvyyWOwhJcIavRneVjlxyEgmxhbhuO0Dw9TxlhQ=; b=JTctMJFUeBOLA5hzB9ZbGiBR1aEq+11k8Grm64+5cje6r/m4dXLD6TRUPNjNYfiL/B mJFhZ+Grv/mfniImDcG9jPOG5yrxDLCkfYNJ0KLDLD5X4NCn8ERD3+3wMHpggXVXbRHw nCUG5+Gid90HjGvNn9MtQyr17ZKPgEZQz0US2dvfse9jQixlHmdJgT/UF1D79P6VDmBF xiTnJfclzYTgjlog6fEYauVNXelVOf4zKYved8uiIAf1eKWt+auyfk9/kYeq+40t+V3L 3gYKGlGDmuHpTt1AKEN/MXqfuV5caVYpKkLcVGCGa6izakSFv7xoGJwU9ijfAQICB1Aa B3+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pHJYhgtV; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a17090a9f0800b00219a8d98afbsi2367021pjp.132.2023.01.18.08.18.35; Wed, 18 Jan 2023 08:18:49 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=pHJYhgtV; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229966AbjARQRo (ORCPT + 99 others); Wed, 18 Jan 2023 11:17:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229972AbjARQRO (ORCPT ); Wed, 18 Jan 2023 11:17:14 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8F655CFFC for ; Wed, 18 Jan 2023 08:12:32 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 7E602CE1BD5 for ; Wed, 18 Jan 2023 16:12:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6DA7C433EF; Wed, 18 Jan 2023 16:12:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674058347; bh=48FuYf73j5irAdfV5OvRijOa2+RnLc2iiO0dv0dASHs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pHJYhgtVQnVdtM3GXH1PlDVa63tAXRgp+hPGoN+O2xX7XSgRNjW10imB20sRpRP81 ZyC+8sw4Oh1XbZzjHJMa5fs3h3r/j5TuQlHqO1aK85whjbAB5OoI88FP6tyr4KNgKB fa1BOFWvzOv5wDNPohWXJWO/mFhvHj7vHdOSKD2B/Vw4qRxvEl4wWwBpTIBGKX25Ih 0cOuV5Bv4PAkAlf/Ymr7340gcFZsZD0QaM44fUR7BT7f7bUUXo5AsZ3rd6TRGYP689 bWqSoAHItZRc2sahS2zRxyEYsj+g59xwFASryHSFXKMiIp2R69MSVwUvO1RYb/fStF wMPnAPKeVRPKA== From: Arnd Bergmann To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Arnd Bergmann , Charles Keepax , Christophe JAILLET , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] ASoC: ux500: remove stedma40 references Date: Wed, 18 Jan 2023 17:10:48 +0100 Message-Id: <20230118161110.521504-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118161110.521504-1-arnd@kernel.org> References: <20230118161110.521504-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755377806677711067?= X-GMAIL-MSGID: =?utf-8?q?1755377806677711067?= From: Arnd Bergmann ux500_pcm_request_chan() is never called because the dma channels are already set up from DT. Remove this, along with the ux500_msp_dma_params structure. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij --- sound/soc/ux500/ux500_msp_dai.c | 4 +-- sound/soc/ux500/ux500_msp_i2s.c | 41 +------------------------------ sound/soc/ux500/ux500_msp_i2s.h | 9 +------ sound/soc/ux500/ux500_pcm.c | 43 +-------------------------------- 4 files changed, 5 insertions(+), 92 deletions(-) diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c index 6e86efd06ec1..6fb1a5c207bc 100644 --- a/sound/soc/ux500/ux500_msp_dai.c +++ b/sound/soc/ux500/ux500_msp_dai.c @@ -670,8 +670,8 @@ static int ux500_msp_dai_of_probe(struct snd_soc_dai *dai) if (!capture_dma_data) return -ENOMEM; - playback_dma_data->addr = drvdata->msp->playback_dma_data.tx_rx_addr; - capture_dma_data->addr = drvdata->msp->capture_dma_data.tx_rx_addr; + playback_dma_data->addr = drvdata->msp->tx_rx_addr; + capture_dma_data->addr = drvdata->msp->tx_rx_addr; playback_dma_data->maxburst = 4; capture_dma_data->maxburst = 4; diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c index bfca5553381f..fbfeefa418ca 100644 --- a/sound/soc/ux500/ux500_msp_i2s.c +++ b/sound/soc/ux500/ux500_msp_i2s.c @@ -360,20 +360,6 @@ static int enable_msp(struct ux500_msp *msp, struct ux500_msp_config *config) __func__, status); } - /* Make sure the correct DMA-directions are configured */ - if ((config->direction & MSP_DIR_RX) && - !msp->capture_dma_data.dma_cfg) { - dev_err(msp->dev, "%s: ERROR: MSP RX-mode is not configured!", - __func__); - return -EINVAL; - } - if ((config->direction == MSP_DIR_TX) && - !msp->playback_dma_data.dma_cfg) { - dev_err(msp->dev, "%s: ERROR: MSP TX-mode is not configured!", - __func__); - return -EINVAL; - } - reg_val_DMACR = readl(msp->registers + MSP_DMACR); if (config->direction & MSP_DIR_RX) reg_val_DMACR |= RX_DMA_ENABLE; @@ -638,40 +624,17 @@ int ux500_msp_i2s_close(struct ux500_msp *msp, unsigned int dir) } -static int ux500_msp_i2s_of_init_msp(struct platform_device *pdev, - struct ux500_msp *msp); -{ - msp->playback_dma_data.dma_cfg = devm_kzalloc(&pdev->dev, - sizeof(struct stedma40_chan_cfg), - GFP_KERNEL); - if (!msp->playback_dma_data.dma_cfg) - return -ENOMEM; - - msp->capture_dma_data.dma_cfg = devm_kzalloc(&pdev->dev, - sizeof(struct stedma40_chan_cfg), - GFP_KERNEL); - if (!msp->capture_dma_data.dma_cfg) - return -ENOMEM; - - return 0; -} - int ux500_msp_i2s_init_msp(struct platform_device *pdev, struct ux500_msp **msp_p) { struct resource *res = NULL; struct ux500_msp *msp; - int ret; *msp_p = devm_kzalloc(&pdev->dev, sizeof(struct ux500_msp), GFP_KERNEL); msp = *msp_p; if (!msp) return -ENOMEM; - ret = ux500_msp_i2s_of_init_msp(pdev, msp); - if (ret) - return ret; - msp->dev = &pdev->dev; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -681,9 +644,7 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev, return -ENOMEM; } - msp->playback_dma_data.tx_rx_addr = res->start + MSP_DR; - msp->capture_dma_data.tx_rx_addr = res->start + MSP_DR; - + msp->tx_rx_addr = res->start + MSP_DR; msp->registers = devm_ioremap(&pdev->dev, res->start, resource_size(res)); if (msp->registers == NULL) { diff --git a/sound/soc/ux500/ux500_msp_i2s.h b/sound/soc/ux500/ux500_msp_i2s.h index 6b353423b75a..69d4ebc409fc 100644 --- a/sound/soc/ux500/ux500_msp_i2s.h +++ b/sound/soc/ux500/ux500_msp_i2s.h @@ -462,18 +462,11 @@ struct ux500_msp_config { unsigned int iodelay; }; -struct ux500_msp_dma_params { - unsigned int data_size; - dma_addr_t tx_rx_addr; - struct stedma40_chan_cfg *dma_cfg; -}; - struct ux500_msp { int id; void __iomem *registers; struct device *dev; - struct ux500_msp_dma_params playback_dma_data; - struct ux500_msp_dma_params capture_dma_data; + dma_addr_t tx_rx_addr; enum msp_state msp_state; int def_elem_len; unsigned int dir_busy; diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c index ca87517d80c9..53b5649cfdda 100644 --- a/sound/soc/ux500/ux500_pcm.c +++ b/sound/soc/ux500/ux500_pcm.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -29,44 +28,6 @@ #define UX500_PLATFORM_PERIODS_MAX 48 #define UX500_PLATFORM_BUFFER_BYTES_MAX (2048 * PAGE_SIZE) -static struct dma_chan *ux500_pcm_request_chan(struct snd_soc_pcm_runtime *rtd, - struct snd_pcm_substream *substream) -{ - struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); - u16 per_data_width, mem_data_width; - struct stedma40_chan_cfg *dma_cfg; - struct ux500_msp_dma_params *dma_params; - - dma_params = snd_soc_dai_get_dma_data(dai, substream); - dma_cfg = dma_params->dma_cfg; - - mem_data_width = DMA_SLAVE_BUSWIDTH_2_BYTES; - - switch (dma_params->data_size) { - case 32: - per_data_width = DMA_SLAVE_BUSWIDTH_4_BYTES; - break; - case 16: - per_data_width = DMA_SLAVE_BUSWIDTH_2_BYTES; - break; - case 8: - per_data_width = DMA_SLAVE_BUSWIDTH_1_BYTE; - break; - default: - per_data_width = DMA_SLAVE_BUSWIDTH_4_BYTES; - } - - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - dma_cfg->src_info.data_width = mem_data_width; - dma_cfg->dst_info.data_width = per_data_width; - } else { - dma_cfg->src_info.data_width = per_data_width; - dma_cfg->dst_info.data_width = mem_data_width; - } - - return snd_dmaengine_pcm_request_channel(stedma40_filter, dma_cfg); -} - static int ux500_pcm_prepare_slave_config(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config) @@ -98,7 +59,6 @@ static int ux500_pcm_prepare_slave_config(struct snd_pcm_substream *substream, } static const struct snd_dmaengine_pcm_config ux500_dmaengine_of_pcm_config = { - .compat_request_channel = ux500_pcm_request_chan, .prepare_slave_config = ux500_pcm_prepare_slave_config, }; @@ -107,8 +67,7 @@ int ux500_pcm_register_platform(struct platform_device *pdev) int ret; ret = snd_dmaengine_pcm_register(&pdev->dev, - &ux500_dmaengine_of_pcm_config, - SND_DMAENGINE_PCM_FLAG_COMPAT); + &ux500_dmaengine_of_pcm_config, 0); if (ret < 0) { dev_err(&pdev->dev, "%s: ERROR: Failed to register platform '%s' (%d)!\n", From patchwork Wed Jan 18 16:10:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 45372 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2427353wrn; Wed, 18 Jan 2023 08:19:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXvDCz4Ov2HEt1FWHp0y4DtSl2Q71oe6fnm9g5nvPvGkvtKfaMY07szWkjutGK0YwQItrfnt X-Received: by 2002:a17:906:ccc3:b0:86d:6eaf:bf0 with SMTP id ot3-20020a170906ccc300b0086d6eaf0bf0mr7549466ejb.48.1674058760495; Wed, 18 Jan 2023 08:19:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674058760; cv=none; d=google.com; s=arc-20160816; b=wBfg+HFQQp+FrWh3h6b9TkH8B0F/t01X2qhu+cps6KaQKeCVYJmM7IuOXJx7ZwBKtU QUC27izQxWlSG6HrIEygiKXVdkL/SDR7ZKpbY+uPDS2pLF9dvcbsyfdRLXhxa63iAMQ2 vK+HaV3toNqIH4PPxO5EQ8IlpSTyfBPoHgT+urWIAkLGNLn7bvTBwO32q/Vh5KhPIl9u RAB/NpEcHLxagAO0L3yun5abaajqno7XksttxfdH1ES4FJQuIZK5CQAXMn1OrhkRZngd g/layrleD24FSXONWzKUcPN4Z1BqQN7zmU8yHuiZKKXr6oEFdlApvlsm9hu238JEcxsV eXRg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=82hbMZmH4HNWaMK80hGuJvlYZ0L8U3ik/zCzb0/Ec1Q=; b=reY+opJpSi7kuPwM3Vx2CkAnWXfYkuI+oGR2ojPcBnzNJWOCyrziekz0HHjmpbqPlK VhnjCoW2LHMRHB6CdAIAsR87Sd6JtxqbWKHOOVCXKO2LaDkNymCOPeUH8pLU+UflZthb XcvCXMf4QN8L6zqqHiD7t+qzeoLBhmFFPcVCFfjRki1gdGPAeWvZlfriUde8Sc2/tyv3 extM3C3XdfVIL/tTYndfzMQJBiite39tbw6ZBtRmI5fJFGvotZQ0QowmBI6khDoEB8Zm cDVrIiZ/Kcyt/QOngDWNiqEEQtTywKYIRWpBmI8E8Us2MEwaCgAahs5Gs4K0X0hc32st TwlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VJ5KtuAX; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb12-20020a1709071c8c00b008706dceb60fsi11923249ejc.106.2023.01.18.08.18.56; Wed, 18 Jan 2023 08:19:20 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=VJ5KtuAX; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230299AbjARQSB (ORCPT + 99 others); Wed, 18 Jan 2023 11:18:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229589AbjARQRa (ORCPT ); Wed, 18 Jan 2023 11:17:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88CB79EF2 for ; Wed, 18 Jan 2023 08:12:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B196EB81D7A for ; Wed, 18 Jan 2023 16:12:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 702BBC433D2; Wed, 18 Jan 2023 16:12:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674058365; bh=8cChsv74pYJOfcjtONuonGjh4UJndDRCDERVcmwltLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VJ5KtuAXOH316tSrgSNn6b8gq5MCYj0z0J+xThfFP72otWnHh0r1VmuOApvAXoCUr PG1a0KG4zAl6fL6MXUTy9rJseNw+H6F24mjOf9BaROeVSCRIZ0u7Ds8RkPN+vDTUyT hLVgDtHV91FGhg9LcpprKNIVDAAc9tvrak0cCtVY3GzdP7ED1RbEVREzIG1s/bmEuk GBzzeR2QxsxddC9iLeSD9YIEN7/n+rWo0nbCj+GKMVN/Ccky+Pq/cUI2MqlT+XKJW+ NNlyht4DtVDNa4UD2mRlpj1l4kgAkfxnITqqTkV5U7LV7J7NoruaTnsgWGm4iKhO3Z T/9cwCxSiavPQ== From: Arnd Bergmann To: Lars-Peter Clausen , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: Arnd Bergmann , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] ASoC: remove snd_dmaengine_pcm_config->compat_request_channel Date: Wed, 18 Jan 2023 17:10:49 +0100 Message-Id: <20230118161110.521504-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118161110.521504-1-arnd@kernel.org> References: <20230118161110.521504-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755377838694075341?= X-GMAIL-MSGID: =?utf-8?q?1755377838694075341?= From: Arnd Bergmann The last reference to this struct member is gone, so the caller can be removed as well. Signed-off-by: Arnd Bergmann --- include/sound/dmaengine_pcm.h | 13 ++----------- sound/soc/soc-generic-dmaengine-pcm.c | 3 --- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index a497d1f81cab..9965d59ff8f0 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h @@ -93,8 +93,8 @@ int snd_dmaengine_pcm_refine_runtime_hwparams( struct dma_chan *chan); /* - * Try to request the DMA channel using compat_request_channel or - * compat_filter_fn if it couldn't be requested through devicetree. + * Try to request the DMA channel using compat_filter_fn if it + * couldn't be requested through devicetree. */ #define SND_DMAENGINE_PCM_FLAG_COMPAT BIT(0) /* @@ -112,8 +112,6 @@ int snd_dmaengine_pcm_refine_runtime_hwparams( * struct snd_dmaengine_pcm_config - Configuration data for dmaengine based PCM * @prepare_slave_config: Callback used to fill in the DMA slave_config for a * PCM substream. Will be called from the PCM drivers hwparams callback. - * @compat_request_channel: Callback to request a DMA channel for platforms - * which do not use devicetree. * @process: Callback used to apply processing on samples transferred from/to * user space. * @compat_filter_fn: Will be used as the filter function when requesting a @@ -126,18 +124,11 @@ int snd_dmaengine_pcm_refine_runtime_hwparams( * @pcm_hardware: snd_pcm_hardware struct to be used for the PCM. * @prealloc_buffer_size: Size of the preallocated audio buffer. * - * Note: If both compat_request_channel and compat_filter_fn are set - * compat_request_channel will be used to request the channel and - * compat_filter_fn will be ignored. Otherwise the channel will be requested - * using dma_request_channel with compat_filter_fn as the filter function. */ struct snd_dmaengine_pcm_config { int (*prepare_slave_config)(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config); - struct dma_chan *(*compat_request_channel)( - struct snd_soc_pcm_runtime *rtd, - struct snd_pcm_substream *substream); int (*process)(struct snd_pcm_substream *substream, int channel, unsigned long hwoff, void *buf, unsigned long bytes); diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 3b99f619e37e..a3d92eb645f2 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -190,9 +190,6 @@ static struct dma_chan *dmaengine_pcm_compat_request_channel( if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) && pcm->chan[0]) return pcm->chan[0]; - if (pcm->config->compat_request_channel) - return pcm->config->compat_request_channel(rtd, substream); - return snd_dmaengine_pcm_request_channel(pcm->config->compat_filter_fn, dma_data->filter_data); }