Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp202650rdb; Thu, 18 Jan 2024 00:30:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/htDThq57PO3bLSUF2UPm1YKVICReqEq0K+1e+5ZsWTldRhYF3hUXkxm40di+qLVjyKHF X-Received: by 2002:a05:622a:2296:b0:42a:1a87:9857 with SMTP id ay22-20020a05622a229600b0042a1a879857mr745662qtb.42.1705566629578; Thu, 18 Jan 2024 00:30:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705566629; cv=pass; d=google.com; s=arc-20160816; b=fZlnLQ+4E6kq8OUUW92mzVkaMH47qXjfRr8QyzvEZhFO7wptxwUSL6QnCj8141Hjmw /RASeuPSi7Lw3EYodxL514ROVTNnVlLy9ciGbA8XFQdp3MVaSaVBOpHtw2ZnhVGOnBKM E+CfQiz4ErAa6vf01u0fgQRmTTR7eRU5CAxnTRs4hBKAOxlKMTCeSZIIKg+XEG5cYznT tezl3BjO7QQkky/e8roBV6exWu7Pacys+CV8+vXuQOceQ49DOobHLWLtOWB1oHDfJw/5 3uwUFkOer6Ja3EX63pKWCa25Xx5vGuiOnwEUxMqWdPwEJZ782seBM0/qtiGdv1hvrIdb RlsA== 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=SI6LIOOZM7eJMOSF4oVndnHDGuOMJs3m2Ofat+smP34=; b=cG6EH3hb7i8maiHcOwHot59MjXRlA5WuaeZnjcwkGmz4pbGQ4oLBalXE9VvPpe34To i+9b45hdpehJ8UAk3ZoGpOIdR8AGbr5eYutzuflafIfLSDYHLsc4OMjVpyONRb1yd5of R7Fg7XKROhBpKAngNHuZurC8+ND3ybJChgXqE7BJHN+c/Va8N8wx06o6MvmHVNWeJPNp uzjZVKoM8RZ5DXV7KUZDoUH+Qtx1qtLtkFWu5dOmf/292Zqd3/v+LYH9yG5l23c5QXJy /assokDIZm72RDiZzby5DvTCZmjANTCYC66WIlzRwifrVV6+f4v0sX+3mgOYoGdYewU3 QlIw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oyMT+u03; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29877-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29877-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t6-20020a05622a148600b0042989ef40f9si13610649qtx.343.2024.01.18.00.30.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 00:30:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29877-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oyMT+u03; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29877-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29877-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 721971C23096 for ; Thu, 18 Jan 2024 08:30:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71C9A2E3E0; Thu, 18 Jan 2024 08:23:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oyMT+u03" 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 4365B2031B; Thu, 18 Jan 2024 08:23:00 +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=1705566180; cv=none; b=IxdnOeE0619jf+QLsuUQBjlJ2wl+Uj+6kztnvdF4SuNybSUqihRrwDno5nyVqUWd0kfzKdiDP7wMvvmIs7aSIr4kXeFLYb8P4lT0+Ln37wgzpsM3vg9scMyhbR8KZTi18BkthxI6tUEJJhumcBrDAezK+r0Q/eF1kV+DuplOq4w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705566180; c=relaxed/simple; bh=8w6Gxnkm6FXrOeCoZ4fa4npbHPlvL7OfG6RGXGY+akc=; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; b=pVR5IV6mmWlX47kkKvUa6VHF+3orgvqU5+axzMpMSlHETd6w2C4uk5r2pfQCbdbknyMmiyusBk2FFPRA1dhN5RI7fF8tnukvhwQ43e6YvpCvuewJXKJWL+R8E2msXpF/pyMiANsps/2f1OM43SPSCkjG1PWfgXAKV9DinSwToy0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oyMT+u03; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 15567C4AF78; Thu, 18 Jan 2024 08:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705566180; bh=8w6Gxnkm6FXrOeCoZ4fa4npbHPlvL7OfG6RGXGY+akc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=oyMT+u03HplN+dyxhr6xfR0dGUD/X2yPqjrUdkddUmfcKkzzpWd0maCP1gpmYLSgt FJgLNGKTDN7FgaUEWQSUPt0IZsXCJaDKsbzrR5kgbEqrbbJtXwHq4aKxLx71C3Nm51 7l+CrD7c2gQgVrjoPV5oW57fxBIvuZ4BzRAfHlRp+ZK759iwUfwlkOkiw3EXWY5lt8 2e65JfAiLxYRSoFP76JzFb/q3EJcs0hKGDlWoHlVjKRNoGlRmSb6cx5AgRNckB5RTJ m57d/mdz33CUfb7AhQ0QekZ0IGSETU541DPrL60UM6NgFoa3+8h6CqXDsrMUr0Ioq4 TgBqeBK85N7gA== 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 F07A1C47DD3; Thu, 18 Jan 2024 08:22:59 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Thu, 18 Jan 2024 11:21:12 +0300 Subject: [PATCH v7 29/39] 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: <20240118-ep93xx-v7-29-d953846ae771@maquefel.me> References: <20240118-ep93xx-v7-0-d953846ae771@maquefel.me> In-Reply-To: <20240118-ep93xx-v7-0-d953846ae771@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: Takashi Iwai , 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=1705566176; l=3001; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=Edo7deD4TfxQT1IZ681PPthd594zbg9RMygPGh53NHw=; =?utf-8?q?b=3DQ8qPe8aKrV6g?= =?utf-8?q?xeJ4STmNjRtdysGFNN9JNZr8R5MjjWKKN7JNqXyZRHsxZAIunK/fYpDigLdskKLX?= SgDEzatiAac/u+xmfxsfXvaffv3kdVs8/DrYpZ9uhToI8hN5LrLZ 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: 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