From patchwork Thu Aug 4 09:30:31 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: 9264375 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 DF6CF60839 for ; Thu, 4 Aug 2016 21:31:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D23F626E16 for ; Thu, 4 Aug 2016 21:31:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6D07283E7; Thu, 4 Aug 2016 21:31:06 +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 DD95626E16 for ; Thu, 4 Aug 2016 21:31:05 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id EA083267016; Thu, 4 Aug 2016 23:31:04 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8585B267023; Thu, 4 Aug 2016 13:39:53 +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 EB19826A570; Thu, 4 Aug 2016 13:39:51 +0200 (CEST) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id E821D267025 for ; Thu, 4 Aug 2016 11:31:14 +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:31:05 +0900 (KST) X-AuditID: cbfee61a-f78ff6d000001462-2a-57a30b59fafd Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 11.9C.05218.95B03A75; Thu, 4 Aug 2016 18:31:05 +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:31:05 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 04 Aug 2016 11:30:31 +0200 Message-id: <1470303032-14582-7-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+NgFmpjluLIzCtJLcpLzFFi42I5/e+xoG4k9+JwgykTLCyuXDzEZLFxxnpW i6kPn7BZzDi/j8ni8Jt2VgdWjw2fm9g8Nq3qZPPo27KK0ePzJrkAligum5TUnMyy1CJ9uwSu jNt7bjIVnBWsWPtJr4HxJF8XIyeHhICJxKKFz9ggbDGJC/fWg9lCArMYJfquxkDYvxgl1s7j AbHZBAwleo/2MYLYIkD1t+d0MncxcnEwC3QzSnxtWcAKkhAWCJfomLCTCcRmEVCVePJlD5jN K+AmcW3lCqhlchInj00Gq+cUcJdY9/wU1GI3icaft5knMPIuYGRYxSiRWpBcUJyUnmuYl1qu V5yYW1yal66XnJ+7iREcOs+kdjAe3OV+iFGAg1GJh/eC6aJwIdbEsuLK3EOMEhzMSiK8DZyL w4V4UxIrq1KL8uOLSnNSiw8xSnOwKInzPv6/LkxIID2xJDU7NbUgtQgmy8TBKdXAOLVWoPmy hbCqLRv/W59rZ5TCiv+WWrBpPbfI/X/qT8LsXU2ShyMCpthM59Vf9jxW2evpio2XXX049b6H O/RW3K14q34t3eJiWHRxYqtL2KMNB3lWKaf1f/vC+eaDpCW3DPvZa19zbznPTZJkP9hp3Pnu UeuK3/snBbz62bq48eouhcTb3h8uKLEUZyQaajEXFScCAOFOEd0ZAgAA Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki , b.zolnierkie@samsung.com Subject: [alsa-devel] [PATCH 6/7] ASoC: samsung: Drop usage of of struct s3c_dma_params from pcm.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/pcm.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index 490c1a8..43e367a 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -127,25 +127,25 @@ struct s3c_pcm_info { struct clk *pclk; struct clk *cclk; - 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; }; -static struct s3c_dma_params s3c_pcm_stereo_out[] = { +static struct snd_dmaengine_dai_dma_data s3c_pcm_stereo_out[] = { [0] = { - .dma_size = 4, + .addr_width = 4, }, [1] = { - .dma_size = 4, + .addr_width = 4, }, }; -static struct s3c_dma_params s3c_pcm_stereo_in[] = { +static struct snd_dmaengine_dai_dma_data s3c_pcm_stereo_in[] = { [0] = { - .dma_size = 4, + .addr_width = 4, }, [1] = { - .dma_size = 4, + .addr_width = 4, }, }; @@ -552,15 +552,13 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) } clk_prepare_enable(pcm->pclk); - s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start - + S3C_PCM_RXFIFO; - s3c_pcm_stereo_out[pdev->id].dma_addr = mem_res->start - + S3C_PCM_TXFIFO; + 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].slave = pcm_pdata->dma_capture; - s3c_pcm_stereo_out[pdev->id].slave = pcm_pdata->dma_playback; + 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; }