Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3199564lqp; Tue, 26 Mar 2024 02:30:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+bTvqF+4EV62Ro7c24uQYByDESbq1BjHyKkbupvVce4yWNodW0c6XTRZIhrDQkfjCii1j0hm5jDUp7hjsl0etm9lGclNng+UEmsHh3g== X-Google-Smtp-Source: AGHT+IEpJlSfEgEzfAugfgWNIc+QKAUNhty+GrUZYYhCV2owKiDFkB2+HwvJlCEFp+Ji/d0svbt6 X-Received: by 2002:a05:6830:1151:b0:6e4:b891:c9eb with SMTP id x17-20020a056830115100b006e4b891c9ebmr567005otq.30.1711445431562; Tue, 26 Mar 2024 02:30:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711445431; cv=pass; d=google.com; s=arc-20160816; b=NR53W+xzSsJd5AL9d6+k3R7f7ymEZph4xfqUKtL3uJlS+Zo+Lz0g2rF3w5du71wjkJ ThXFqd7l8urz80+vE9FB3hRqYf9BeUFgaCkZOjX6pLtZOIHzTLKpK5VRsQIo5rq2v/iW lV+UkVE829/RX/oe3dNtJC+LoePvjE6AxIquXduokGfPIXv5KnnaeC77QbBSBa6r/sXb Wj4EwmrGsvyJiqYG9MCVQGwDZZo28Xlh7Fs+2Ge6B9kYENC3rywjw3GuckdNufMrBiBU l9ebIFR2FeRhlcSMZ/ZHrSj43oPQZrtqSanC5GF911pki6d2+ipCmxPIcc3qGiLf8OGr LUJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=MzpkELDWnpf78V5M33YY0zUWygTa7I0I/bAEu3zxxzU=; fh=fx1UCnoOjlDS9fJIGLeEtBpaReEKi37RFOsAeWWzG6o=; b=yK1X8B2kZhchmn6muoW+6nYbejfls11WtQGFCZ3D0ZD1rTCrPe5scPzTlDVkW4UWrB 676Ej0iWB/iSvJUMfKGxdOF0yec0aw3yBC7TjbpaUJd/YKCgDg8GM2PJ6u7tQxSjS3kz XFejouCZFbE6c8EEyIMd/TrY2D9OBH70lXTl7Z1f52vvzEzTijBFtEYXNlOGZazJK9iI DIHLlFBGMD6xMGQ/Ykev9DkQ1m3ELD0mhS70yYtp9TRG+BZAnmxj/RtWu7Rk6ZVL5FFT tB1j4gSSB8ZixBLC1s5PqvHUtjpD53B3vh/TE2OX0eyVKld9BtaYfAsZFPKodhzq2ZXn 0lDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hWaHFP5g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-118663-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118663-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i13-20020a63e44d000000b005dc47dd5dd2si9490143pgk.791.2024.03.26.02.30.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 02:30:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118663-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hWaHFP5g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-118663-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118663-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id DF0C72E72F3 for ; Tue, 26 Mar 2024 09:29:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F29412C525; Tue, 26 Mar 2024 09:20:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hWaHFP5g" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EC0471B20; Tue, 26 Mar 2024 09:20:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711444843; cv=none; b=JFc0P4XOOMuwS69wop65cFoad6K7lYEZMDpW/bPSE5bJlJVszhEFgO5/zVrF8Jp9+A47DBfQAQtvE72SaDecg467NZPmv7jAxNKB5z+jOvfYSnok3wC51kyGABvIAnDL0+UAl3+nD67mfYH9UR/2S/MKxbhhyy3xImA4Nw43sOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711444843; c=relaxed/simple; bh=8w6Gxnkm6FXrOeCoZ4fa4npbHPlvL7OfG6RGXGY+akc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I/OiAyo737E6mOjfArYDY/DzePxMc6cC5QEdK4cxgKM4Y89QCU+D6aqjFgioN4UEVIBQaPZDlxLFOZFk49bLtu6JqKJ9K3Ml8WMcErN/phUQXYaeIIEyqEOMTY5oWuJY2jDgeZCoAvl8v90KWv3LBVvW3KqfzvVNEu1G2p+hdck= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hWaHFP5g; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 7EB90C4E66A; Tue, 26 Mar 2024 09:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711444842; bh=8w6Gxnkm6FXrOeCoZ4fa4npbHPlvL7OfG6RGXGY+akc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=hWaHFP5gngqcNaQ6D09lKTXa2bcyHIySl76Hb/hPaEkgz4j66Aq4hAfoSq3MwalFE JYCQMNyHy2umZcrrXOoED4aBWiXslxyuobXIK10e723UifNZHpIZnLe4nZJlXQyhN1 xY+8Yav1g0A5WKG2gvjObAr5rGNva1I0PMUiOxeZX14L7JD9QNFVQn20cO1mzcgPSg dWo5rLRvTGHIynI7g+dyH1rF+5zpaSMbrZ/d5qscooNMfBk/yLSZe7y3BC4n9u63BM XkclXfAT/IsWEUJ460MTrqsG9R4mX+5cl3dQ/j0oUKeZirAOV9m+9mmgZFcQQKOjN4 0/xFGlcrxjGvQ== 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 70C66CD1280; Tue, 26 Mar 2024 09:20:42 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Tue, 26 Mar 2024 12:18:55 +0300 Subject: [PATCH v9 28/38] ASoC: ep93xx: Drop legacy DMA support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240326-ep93xx-v9-28-156e2ae5dfc8@maquefel.me> References: <20240326-ep93xx-v9-0-156e2ae5dfc8@maquefel.me> In-Reply-To: <20240326-ep93xx-v9-0-156e2ae5dfc8@maquefel.me> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Alexander Sverdlin , Kuninori Morimoto , 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=1711444837; l=3001; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=Edo7deD4TfxQT1IZ681PPthd594zbg9RMygPGh53NHw=; b=SpnO2dxJSH/r2cuP243Y5fZfErXEwKFHqU5X30c6m7R2JLqhIkHTyXe+ADE/xoCAhXbML+3rpfEJ A4UOw2A5BK3S0Ix6fNewRv6wfTOzs0P/RXMicjcXbaC5AG4ErcVh 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: nikita.shubin@maquefel.me 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 -#include #include #include "ep93xx-pcm.h" @@ -80,19 +79,6 @@ struct ep93xx_i2s_info { struct snd_dmaengine_dai_dma_data dma_params_tx; }; -static struct ep93xx_dma_data ep93xx_i2s_dma_data[] = { - [SNDRV_PCM_STREAM_PLAYBACK] = { - .name = "i2s-pcm-out", - .port = EP93XX_DMA_I2S1, - .direction = DMA_MEM_TO_DEV, - }, - [SNDRV_PCM_STREAM_CAPTURE] = { - .name = "i2s-pcm-in", - .port = EP93XX_DMA_I2S1, - .direction = 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 *dai) { struct ep93xx_i2s_info *info = snd_soc_dai_get_drvdata(dai); - info->dma_params_tx.filter_data = - &ep93xx_i2s_dma_data[SNDRV_PCM_STREAM_PLAYBACK]; - info->dma_params_rx.filter_data = - &ep93xx_i2s_dma_data[SNDRV_PCM_STREAM_CAPTURE]; - snd_soc_dai_init_dma_data(dai, &info->dma_params_tx, &info->dma_params_rx); 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 -#include - #include "ep93xx-pcm.h" static const struct snd_pcm_hardware ep93xx_pcm_hardware = { @@ -35,30 +33,15 @@ static const struct snd_pcm_hardware ep93xx_pcm_hardware = { .fifo_size = 32, }; -static bool ep93xx_pcm_dma_filter(struct dma_chan *chan, void *filter_param) -{ - struct ep93xx_dma_data *data = filter_param; - - if (data->direction == ep93xx_dma_chan_direction(chan)) { - chan->private = data; - return true; - } - - return false; -} - static const struct snd_dmaengine_pcm_config ep93xx_dmaengine_pcm_config = { .pcm_hardware = &ep93xx_pcm_hardware, - .compat_filter_fn = ep93xx_pcm_dma_filter, .prealloc_buffer_size = 131072, }; 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); -- 2.41.0