From nobody Tue Feb 10 20:48:32 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A51DEC4332F for ; Tue, 12 Dec 2023 08:24:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346338AbjLLIYL (ORCPT ); Tue, 12 Dec 2023 03:24:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346002AbjLLIWG (ORCPT ); Tue, 12 Dec 2023 03:22:06 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E491B109 for ; Tue, 12 Dec 2023 00:22:09 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPS id 0B7C2C32778; Tue, 12 Dec 2023 08:22:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702369326; bh=8w6Gxnkm6FXrOeCoZ4fa4npbHPlvL7OfG6RGXGY+akc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=JHNbzjmhJ4Dg0/bwaoHMGX+uQlPtlSGVTpQbRUuogPVkXCGzhyr7Z0jrbTPP7r2Nq hObnJN6lUUJ/QUQTSA0GFIzWPkoH+CfFv32/IIIBl5LjuDmcg1OWki4nWZaoKUtoyo gL89aAXLN/ge5pvfBiEOuxLbxr1lLsk3fDPX40L/dB/f78KDbId9v/XU0o9YQ4M/Bn K5+9pfO8/WS0MF8K2Ke5P7cStTXI87E7l1/KRddNH2BgzBMKO0QcJxVPjO4r06ZbLJ cYSxD3lcedaKR4XCunp2tkrZw2FCmCuVyvfdx9XpljIs/NFt6u8Meve5oB4nRuRyOX I3MCR1BxJ2W5w== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F01A5C4332F; Tue, 12 Dec 2023 08:22:05 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Tue, 12 Dec 2023 11:20:47 +0300 Subject: [PATCH v6 30/40] ASoC: ep93xx: Drop legacy DMA support MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231212-ep93xx-v6-30-c307b8ac9aa8@maquefel.me> References: <20231212-ep93xx-v6-0-c307b8ac9aa8@maquefel.me> In-Reply-To: <20231212-ep93xx-v6-0-c307b8ac9aa8@maquefel.me> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Alexander Sverdlin , Kuninori Morimoto , Nicolas Ferre , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Nikita Shubin Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-Mailer: b4 0.13-dev-e3e53 X-Developer-Signature: v=1; a=ed25519-sha256; t=1702369322; l=3001; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=Edo7deD4TfxQT1IZ681PPthd594zbg9RMygPGh53NHw=; =?utf-8?q?b=3DKgdD4UtIOUrV?= =?utf-8?q?67MW1aUWlY2ypKmoY0xr9pgeRpHbVgiq932/kDZGsDo1H+H4iSdxxU7ogMbk6I7P?= wbvBgvuTCMxEQ2q6levrfofeBWaSOdLBDTdRw9y5OWMQFbTzCLZy X-Developer-Key: i=nikita.shubin@maquefel.me; a=ed25519; pk=vqf5YIUJ7BJv3EJFaNNxWZgGuMgDH6rwufTLflwU9ac= X-Endpoint-Received: by B4 Relay for nikita.shubin@maquefel.me/20230718 with auth_id=65 X-Original-From: Nikita Shubin Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Sverdlin And rely on OF DMA. Signed-off-by: Alexander Sverdlin Signed-off-by: Nikita Shubin --- sound/soc/cirrus/ep93xx-i2s.c | 19 ------------------- sound/soc/cirrus/ep93xx-pcm.c | 19 +------------------ 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index 522de4b80293..9e83cdf8a943 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -24,7 +24,6 @@ #include #include =20 -#include #include =20 #include "ep93xx-pcm.h" @@ -80,19 +79,6 @@ struct ep93xx_i2s_info { struct snd_dmaengine_dai_dma_data dma_params_tx; }; =20 -static struct ep93xx_dma_data ep93xx_i2s_dma_data[] =3D { - [SNDRV_PCM_STREAM_PLAYBACK] =3D { - .name =3D "i2s-pcm-out", - .port =3D EP93XX_DMA_I2S1, - .direction =3D DMA_MEM_TO_DEV, - }, - [SNDRV_PCM_STREAM_CAPTURE] =3D { - .name =3D "i2s-pcm-in", - .port =3D EP93XX_DMA_I2S1, - .direction =3D DMA_DEV_TO_MEM, - }, -}; - static inline void ep93xx_i2s_write_reg(struct ep93xx_i2s_info *info, unsigned reg, unsigned val) { @@ -198,11 +184,6 @@ static int ep93xx_i2s_dai_probe(struct snd_soc_dai *da= i) { struct ep93xx_i2s_info *info =3D snd_soc_dai_get_drvdata(dai); =20 - info->dma_params_tx.filter_data =3D - &ep93xx_i2s_dma_data[SNDRV_PCM_STREAM_PLAYBACK]; - info->dma_params_rx.filter_data =3D - &ep93xx_i2s_dma_data[SNDRV_PCM_STREAM_CAPTURE]; - snd_soc_dai_init_dma_data(dai, &info->dma_params_tx, &info->dma_params_rx); =20 diff --git a/sound/soc/cirrus/ep93xx-pcm.c b/sound/soc/cirrus/ep93xx-pcm.c index fa72acd8d334..5ecb4671cbba 100644 --- a/sound/soc/cirrus/ep93xx-pcm.c +++ b/sound/soc/cirrus/ep93xx-pcm.c @@ -18,8 +18,6 @@ #include #include =20 -#include - #include "ep93xx-pcm.h" =20 static const struct snd_pcm_hardware ep93xx_pcm_hardware =3D { @@ -35,30 +33,15 @@ static const struct snd_pcm_hardware ep93xx_pcm_hardwar= e =3D { .fifo_size =3D 32, }; =20 -static bool ep93xx_pcm_dma_filter(struct dma_chan *chan, void *filter_para= m) -{ - struct ep93xx_dma_data *data =3D filter_param; - - if (data->direction =3D=3D ep93xx_dma_chan_direction(chan)) { - chan->private =3D data; - return true; - } - - return false; -} - static const struct snd_dmaengine_pcm_config ep93xx_dmaengine_pcm_config = =3D { .pcm_hardware =3D &ep93xx_pcm_hardware, - .compat_filter_fn =3D ep93xx_pcm_dma_filter, .prealloc_buffer_size =3D 131072, }; =20 int devm_ep93xx_pcm_platform_register(struct device *dev) { return devm_snd_dmaengine_pcm_register(dev, - &ep93xx_dmaengine_pcm_config, - SND_DMAENGINE_PCM_FLAG_NO_DT | - SND_DMAENGINE_PCM_FLAG_COMPAT); + &ep93xx_dmaengine_pcm_config, 0); } EXPORT_SYMBOL_GPL(devm_ep93xx_pcm_platform_register); =20 --=20 2.41.0