From patchwork Fri Oct 28 16:05:08 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: 9402231 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 1EEAF60588 for ; Fri, 28 Oct 2016 16:05:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11BFB2A888 for ; Fri, 28 Oct 2016 16:05:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05E3A2A88B; Fri, 28 Oct 2016 16:05:51 +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 6E0C22A888 for ; Fri, 28 Oct 2016 16:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756326AbcJ1QFu (ORCPT ); Fri, 28 Oct 2016 12:05:50 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:46032 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755847AbcJ1QFt (ORCPT ); Fri, 28 Oct 2016 12:05:49 -0400 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OFR015NIM1NCSC0@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Sat, 29 Oct 2016 01:05:47 +0900 (KST) X-AuditID: cbfee61b-f793d6d000005a2a-58-5813775b4a3b Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id A7.59.23082.B5773185; Sat, 29 Oct 2016 01:05:47 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OFR001KDM0MUKB0@mmp2.samsung.com>; Sat, 29 Oct 2016 01:05:47 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org, linux-samsung-soc@vger.kernel.org Cc: lars@metafoo.de, lgirdwood@gmail.com, alsa-devel@alsa-project.org, arnd@arndb.de, b.zolnierkie@samsung.com, Sylwester Nawrocki Subject: [PATCH 2/2] ASoC: Revert "samsung: Remove unneeded initialization of chan_name" Date: Fri, 28 Oct 2016 18:05:08 +0200 Message-id: <1477670708-471-2-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1477670708-471-1-git-send-email-s.nawrocki@samsung.com> References: <1477670708-471-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRmVeSWpSXmKPExsVy+t9jQd3ocuEIg0VLxSyuXDzEZPF30jF2 i40z1rNaTH34hM1iyeT5rBbfrnQwWcw4v4/J4vCbdlYHDo8Nn5vYPH7/msTosXPWXXaPTas6 2TyWvDnE6tG3ZRWjx+dNcgHsUW42GamJKalFCql5yfkpmXnptkqhIW66FkoKeYm5qbZKEbq+ IUFKCmWJOaVAnpEBGnBwDnAPVtK3S3DLOHakk63gh2TF2gtr2RoYJ4l1MXJwSAiYSDTfK+xi 5AQyxSQu3FvP1sXIxSEkMItRYsO0mVDOL0aJPSfnsoBUsQkYSvQe7WMEsUUELCWuXX7BDFLE LDCfUeLY5n+sIAlhgSiJtrYWNhCbRUBV4siuS2ANvAIuEutmb2aGWCcncfLYZFaQKzgFXCUO XwwCCQsBlZw/28I+gZF3ASPDKkaJ1ILkguKk9FyjvNRyveLE3OLSvHS95PzcTYzggH8mvYPx 8C73Q4wCHIxKPLwPIoUjhFgTy4orcw8xSnAwK4nwviwBCvGmJFZWpRblxxeV5qQWH2I0Bbpr IrOUaHI+MBrzSuINTcxNzI0NLMwtLU2MlMR5G2c/CxcSSE8sSc1OTS1ILYLpY+LglGpgFBGZ V3/7mLSglkL+nYyfE1Y4Poq/1vw+YfEKzxMv52zMfuHedH3K8cWOP5P2dZ5u+vye5XNkwr2G k7cr8icdP+K2WXTFLBsT1TPLL+tbpj38v/aHxNFF0//Onnbw2bsjyQYRHwJW1la+LxHojFAx PGz99uDhk/blAktYQy22vK6ueHwrK5jjarISS3FGoqEWc1FxIgDZ6SvEjgIAAA== 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 reverts commit cdaf9af1eaeb539e32bfd6da6310b41ad6c3ba23 which breaks I2S support on non-DT platforms since default "tx", "rx" DMA channel names for playback and capture streams or custom channel names in struct snd_dmaengine_pcm_config are supported in the ASoC dmaengine module only for DT case. Signed-off-by: Sylwester Nawrocki --- 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, 13 insertions(+), 2 deletions(-) diff --git a/sound/soc/samsung/dmaengine.c b/sound/soc/samsung/dmaengine.c index cda656e..9104c98 100644 --- a/sound/soc/samsung/dmaengine.c +++ b/sound/soc/samsung/dmaengine.c @@ -37,8 +37,12 @@ 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; - pcm_conf->chan_names[SNDRV_PCM_STREAM_PLAYBACK] = tx; - pcm_conf->chan_names[SNDRV_PCM_STREAM_CAPTURE] = rx; + 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; + } 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 7a9ee48..7e32cf4 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1304,6 +1304,8 @@ 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; @@ -1323,6 +1325,7 @@ 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 40331a0..3e89fbc 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -35,10 +35,12 @@ #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 d59a47d..c78a936 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -33,10 +33,12 @@ #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, };