From patchwork Thu Aug 4 09:30:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 9264369 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 679C060839 for ; Thu, 4 Aug 2016 21:28:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59C3B28405 for ; Thu, 4 Aug 2016 21:28:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E39A28411; Thu, 4 Aug 2016 21:28:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8135128405 for ; Thu, 4 Aug 2016 21:28:22 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8ADA8266FF3; Thu, 4 Aug 2016 23:28:21 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D318F267002; Thu, 4 Aug 2016 13:38:25 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 753A8267001; Thu, 4 Aug 2016 13:38:24 +0200 (CEST) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id 5429726700C for ; Thu, 4 Aug 2016 11:31:04 +0200 (CEST) Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OBD00V68P3HE550@mailout3.samsung.com> for alsa-devel@alsa-project.org; Thu, 04 Aug 2016 18:30:59 +0900 (KST) X-AuditID: cbfee61a-f78ff6d000001462-1f-57a30b52ce23 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 7F.8C.05218.25B03A75; Thu, 4 Aug 2016 18:30:59 +0900 (KST) Received: from AMDC1344.digital.local ([106.116.147.32]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OBD004EAP35JM30@mmp2.samsung.com>; Thu, 04 Aug 2016 18:30:58 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 04 Aug 2016 11:30:28 +0200 Message-id: <1470303032-14582-4-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1470303032-14582-1-git-send-email-s.nawrocki@samsung.com> References: <1470303032-14582-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkluLIzCtJLcpLzFFi42I5/e+xoG4w9+Jwg80HWC2uXDzEZLFxxnpW i6kPn7BZzDi/j8ni8Jt2VgdWjw2fm9g8Nq3qZPPo27KK0ePzJrkAligum5TUnMyy1CJ9uwSu jIY9X9gKDktX9J3bzN7AeEa8i5GTQ0LARGLevqfsELaYxIV769m6GLk4hARmMUo8P7AVyvnF KNHzpYcJpIpNwFCi92gfI4gtAtRxe04nM0gRs0A3o8TXlgWsIAlhgRiJOxO7wBpYBFQlWtsv g9m8Am4SN08tYoVYJydx8thkMJtTwF1i3fNTbCC2EFBN48/bzBMYeRcwMqxilEgtSC4oTkrP NcxLLdcrTswtLs1L10vOz93ECA6gZ1I7GA/ucj/EKMDBqMTDe8F0UbgQa2JZcWXuIUYJDmYl Ed4GzsXhQrwpiZVVqUX58UWlOanFhxilOViUxHkf/18XJiSQnliSmp2aWpBaBJNl4uCUamBc Nc9e5OdcH5kbOz4vf+Hj/c1vmZSAiZl/3SvOJpmPHuccmf1Nu7UN1B+5SpTvUir591JmX/m5 DnGDKx+KA1P8et/LGG/9oLbrpYjqUQYxjreJoY0stz69OX6bM+3v0YU7GF68dVvMZtLknX53 0ZHnUeJOC9l2RcRNzT/ztfngo2YuL4mn6k+UWIozEg21mIuKEwGwwoPRHAIAAA== Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki , b.zolnierkie@samsung.com Subject: [alsa-devel] [PATCH 3/7] ASoC: samsung: Drop usage of struct s3c_dma_params from s3c2412-i2s.c X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper. Signed-off-by: Sylwester Nawrocki --- sound/soc/samsung/s3c-i2s-v2.c | 2 +- sound/soc/samsung/s3c-i2s-v2.h | 4 ++-- sound/soc/samsung/s3c2412-i2s.c | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c index bf8ae79..74a7f4b 100644 --- a/sound/soc/samsung/s3c-i2s-v2.c +++ b/sound/soc/samsung/s3c-i2s-v2.c @@ -302,7 +302,7 @@ static int s3c_i2sv2_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct s3c_i2sv2_info *i2s = to_info(dai); - struct s3c_dma_params *dma_data; + struct snd_dmaengine_dai_dma_data *dma_data; u32 iismod; pr_debug("Entered %s\n", __func__); diff --git a/sound/soc/samsung/s3c-i2s-v2.h b/sound/soc/samsung/s3c-i2s-v2.h index d068414..182d805 100644 --- a/sound/soc/samsung/s3c-i2s-v2.h +++ b/sound/soc/samsung/s3c-i2s-v2.h @@ -60,8 +60,8 @@ struct s3c_i2sv2_info { unsigned char master; - struct s3c_dma_params *dma_playback; - struct s3c_dma_params *dma_capture; + struct snd_dmaengine_dai_dma_data *dma_playback; + struct snd_dmaengine_dai_dma_data *dma_capture; u32 suspend_iismod; u32 suspend_iiscon; diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index d45dffb..3e89fbc 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -34,14 +34,14 @@ #include -static struct s3c_dma_params s3c2412_i2s_pcm_stereo_out = { - .ch_name = "tx", - .dma_size = 4, +static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_out = { + .chan_name = "tx", + .addr_width = 4, }; -static struct s3c_dma_params s3c2412_i2s_pcm_stereo_in = { - .ch_name = "rx", - .dma_size = 4, +static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_in = { + .chan_name = "rx", + .addr_width = 4, }; static struct s3c_i2sv2_info s3c2412_i2s; @@ -52,8 +52,8 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai) pr_debug("Entered %s\n", __func__); - samsung_asoc_init_dma_data(dai, &s3c2412_i2s_pcm_stereo_out, - &s3c2412_i2s_pcm_stereo_in); + snd_soc_dai_init_dma_data(dai, &s3c2412_i2s_pcm_stereo_out, + &s3c2412_i2s_pcm_stereo_in); ret = s3c_i2sv2_probe(dai, &s3c2412_i2s, S3C2410_PA_IIS); if (ret) @@ -163,10 +163,10 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev) if (IS_ERR(s3c2412_i2s.regs)) return PTR_ERR(s3c2412_i2s.regs); - s3c2412_i2s_pcm_stereo_out.dma_addr = res->start + S3C2412_IISTXD; - s3c2412_i2s_pcm_stereo_out.slave = pdata->dma_playback; - s3c2412_i2s_pcm_stereo_in.dma_addr = res->start + S3C2412_IISRXD; - s3c2412_i2s_pcm_stereo_in.slave = pdata->dma_capture; + s3c2412_i2s_pcm_stereo_out.addr = res->start + S3C2412_IISTXD; + s3c2412_i2s_pcm_stereo_out.filter_data = pdata->dma_playback; + s3c2412_i2s_pcm_stereo_in.addr = res->start + S3C2412_IISRXD; + s3c2412_i2s_pcm_stereo_in.filter_data = pdata->dma_capture; ret = s3c_i2sv2_register_component(&pdev->dev, -1, &s3c2412_i2s_component,