From patchwork Tue Oct 25 15:08:38 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: 9394767 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 9B1716077F for ; Tue, 25 Oct 2016 15:09:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EC9B29637 for ; Tue, 25 Oct 2016 15:09:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81D7029640; Tue, 25 Oct 2016 15:09:10 +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 D6AF429637 for ; Tue, 25 Oct 2016 15:09:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935884AbcJYPJD (ORCPT ); Tue, 25 Oct 2016 11:09:03 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:38221 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936330AbcJYPJA (ORCPT ); Tue, 25 Oct 2016 11:09:00 -0400 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OFL00Y05ZEN2190@mailout3.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 26 Oct 2016 00:08:57 +0900 (KST) X-AuditID: cbfee61b-f793d6d000005a2a-57-580f75891c43 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 33.10.23082.9857F085; Wed, 26 Oct 2016 00:08:57 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OFL00BR4ZEMB8A0@mmp1.samsung.com>; Wed, 26 Oct 2016 00:08:57 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Cc: krzk@kernel.org, lgirdwood@gmail.com, lars@metafoo.de, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH v2 1/4] ASoC: samsung: Remove unneeded initialization of chan_name Date: Tue, 25 Oct 2016 17:08:38 +0200 Message-id: <1477408121-24716-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFLMWRmVeSWpSXmKPExsVy+t9jAd3OUv4Ig627NC2uXDzEZDH14RM2 i/PnN7BbLJk8n9Xi25UOJosZ5/cxWRx+087qwO6x4XMTm8fOWXfZPTat6mTzWPLmEKtH35ZV jB6fN8kFsEW52WSkJqakFimk5iXnp2TmpdsqhYa46VooKeQl5qbaKkXo+oYEKSmUJeaUAnlG BmjAwTnAPVhJ3y7BLWPq/c1MBfelKj7s3s3cwPharIuRk0NCwETiw8VeZghbTOLCvfVsILaQ wFJGiRfbjboYuYDsX4wSqz62soAk2AQMJXqP9jGC2CJADbfndDKDFDELrGKU2LhkOitIQlgg ROL66UYwm0VAVWLRsnNgG3gF3CTO/77LCLFNTuLkscmsExi5FzAyADWnFiQXFCel5xrlpZbr FSfmFpfmpesl5+duYgSH6zPpHYyHd7kfYhTgYFTi4d2Rzh8hxJpYVlyZe4hRgoNZSYSXsQQo xJuSWFmVWpQfX1Sak1p8iNEU6ICJzFKiyfnAWMoriTc0MTcxNzawMLe0NDFSEudtnP0sXEgg PbEkNTs1tSC1CKaPiYNTqoHROlC5T/+t9tOdRqeevUtw/Dqh8eC/i4Hqp27xlwgz9VR/lgjk 3f32+s7uFutliZ0TXKesX8Yr/LNN54vr1neh1elm+k++3i7blWP10mSOaXSpzPII3vVF7N+v Z86MuSh3M4QzZ40gk9y+skA5med6sWlzp8YE7ToZVrzN+9SOrqDl186GZxYosRRnJBpqMRcV JwIAhwkWs20CAAA= X-MTR: 20000000000000000@CPGS 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 This patch updates the I2S drivers to always use chan_names[] field of struct snd_dmaengine_pcm_config for specifying DMA channel names, rather than using struct snd_dmaengine_dai_dma_data. This allows us to subsequently drop the SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag, now when the last use of that flag is removed. Signed-off-by: Sylwester Nawrocki --- Changes since v1: - the framework user changes moved to a separate (this) patch. sound/soc/samsung/dmaengine.c | 8 ++------ sound/soc/samsung/i2s.c | 3 --- sound/soc/samsung/s3c2412-i2s.c | 2 -- sound/soc/samsung/s3c24xx-i2s.c | 2 -- 4 files changed, 2 insertions(+), 13 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/sound/soc/samsung/dmaengine.c b/sound/soc/samsung/dmaengine.c index 9104c98..cda656e 100644 --- a/sound/soc/samsung/dmaengine.c +++ b/sound/soc/samsung/dmaengine.c @@ -37,12 +37,8 @@ int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter, pcm_conf->prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; pcm_conf->compat_filter_fn = filter; - if (dev->of_node) { - pcm_conf->chan_names[SNDRV_PCM_STREAM_PLAYBACK] = tx; - pcm_conf->chan_names[SNDRV_PCM_STREAM_CAPTURE] = rx; - } else { - flags |= SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME; - } + pcm_conf->chan_names[SNDRV_PCM_STREAM_PLAYBACK] = tx; + pcm_conf->chan_names[SNDRV_PCM_STREAM_CAPTURE] = rx; return devm_snd_dmaengine_pcm_register(dev, pcm_conf, flags); } diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 588aa01..e06aa31 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1305,8 +1305,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) } pri_dai->dma_playback.addr = regs_base + I2STXD; pri_dai->dma_capture.addr = regs_base + I2SRXD; - pri_dai->dma_playback.chan_name = "tx"; - pri_dai->dma_capture.chan_name = "rx"; pri_dai->dma_playback.addr_width = 4; pri_dai->dma_capture.addr_width = 4; pri_dai->quirks = quirks; @@ -1326,7 +1324,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) sec_dai->lock = &pri_dai->spinlock; sec_dai->variant_regs = pri_dai->variant_regs; sec_dai->dma_playback.addr = regs_base + I2STXDS; - sec_dai->dma_playback.chan_name = "tx-sec"; if (!np) { sec_dai->dma_playback.filter_data = i2s_pdata->dma_play_sec; diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 3e89fbc..40331a0 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -35,12 +35,10 @@ #include static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_out = { - .chan_name = "tx", .addr_width = 4, }; static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_in = { - .chan_name = "rx", .addr_width = 4, }; diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index c78a936..d59a47d 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -33,12 +33,10 @@ #include static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_out = { - .chan_name = "tx", .addr_width = 2, }; static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_in = { - .chan_name = "rx", .addr_width = 2, };