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: 9263159 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 49E5760839 for ; Thu, 4 Aug 2016 09:31:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CE4728384 for ; Thu, 4 Aug 2016 09:31:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 313EB28391; Thu, 4 Aug 2016 09:31:39 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFAE028384 for ; Thu, 4 Aug 2016 09:31:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754336AbcHDJbh (ORCPT ); Thu, 4 Aug 2016 05:31:37 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:59617 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933223AbcHDJbe (ORCPT ); Thu, 4 Aug 2016 05:31:34 -0400 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 linux-samsung-soc@vger.kernel.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 Cc: alsa-devel@alsa-project.org, b.zolnierkie@samsung.com, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH 6/7] ASoC: samsung: Drop usage of of struct s3c_dma_params from pcm.c 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 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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; }