From patchwork Wed Feb 13 18:42:00 2019 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: 10810759 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 902EB18EC for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C7332E096 for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 706402E091; Wed, 13 Feb 2019 19:01:26 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 3E88D2E06E for ; Wed, 13 Feb 2019 19:01:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 6B4E6267975; Wed, 13 Feb 2019 19:43:06 +0100 (CET) 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 878E7267946; Wed, 13 Feb 2019 19:43:02 +0100 (CET) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by alsa0.perex.cz (Postfix) with ESMTP id 8E93826791C for ; Wed, 13 Feb 2019 19:42:59 +0100 (CET) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190213184257epoutp020aeb8444b287818cd4cdde55c4e282cf~DAJ5nFyDK0221502215epoutp02F; Wed, 13 Feb 2019 18:42:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190213184257epoutp020aeb8444b287818cd4cdde55c4e282cf~DAJ5nFyDK0221502215epoutp02F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083377; bh=UyhfJTbo6SaxmfkXHyy33sPK1/ZKpe2+WV/TfxZKw30=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=cfMykpWYCUJgH2e2Sqlv/WJIIIDsuDupAqoyu4VXSjSAOy1CR0vO2W4BGjOWZyl8V trtls4l4xl1xNJyRuYW20zfpBck/zA18f+22f68SUuVZLleVYP6F1ofNkOySmq6zC/ Bkh/sNwKwnaemZgOCzNiNWwx9m9WSXRaw2hF2Qv0= Received: from epsmges2p2.samsung.com (unknown [182.195.42.70]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20190213184256epcas2p39a7cbcb53d8e4ce3168e5c385b09cd23~DAJ5MBF7s0253402534epcas2p3o; Wed, 13 Feb 2019 18:42:56 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 8B.5C.04136.035646C5; Thu, 14 Feb 2019 03:42:56 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20190213184256epcas2p34078238855e1f9c1730f42e70094b114~DAJ43s0rl0852908529epcas2p3O; Wed, 13 Feb 2019 18:42:56 +0000 (GMT) X-AuditID: b6c32a46-2a7ff70000001028-97-5c64653080fc Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 34.ED.03689.035646C5; Thu, 14 Feb 2019 03:42:56 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:42:55 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:00 +0100 Message-id: <20190213184212.5473-2-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWy7bCmqa5BakqMwcI+RYsrFw8xWWycsZ7V YurDJ2wW589vYLf4dqWDyeLyrjlsFjPO72OyWHvkLrvF4TftrBYXV3xhcuDy2PC5ic1j56y7 7B6bVnWyefRtWcXo8XmTXABrFJdNSmpOZllqkb5dAlfG9eUiBZszKy5dOs/WwPg6tIuRg0NC wETi+TulLkYuDiGBHYwSd49MYodwvjNKLL4/DcjhBCtq3PuWFcQWEtjAKPH1qAVE0S9GiS0N nSwgCTYBQ4neo32MILaIgJjE7TmdzCBFzAItTBJz5i5lBkkICyRI3L7UwgZiswioSjxe+BjM 5hWwktjZeowFYpu8xOoNB8DqOQWsJf6tfQ52koTAAjaJqdf2QRW5SBzvbWKGsKUlnq3ayAhh V0vs2t7NDNHQwSjRcmE7VJG1xOHjF8F+YBbgk+g4/JcdEgC8Eh1tQhAlHhIXnm+F+r+PUWLr +1vMExglFjAyrGIUSy0ozk1PLTYqMNIrTswtLs1L10vOz93ECI5BLbcdjEvO+RxiFOBgVOLh rRBKiRFiTSwrrsw9xCjBwawkwqsXBRTiTUmsrEotyo8vKs1JLT7EKM3BoiTO+1B6brSQQHpi SWp2ampBahFMlomDU6qB8dLuRjfZqtxTJ79pJSwVuPD4+ek3uddsOFIMtSyEi/mcHjV4zZt3 JfFNGJ+T22qro/M2f6sXmuwpqZj/ovxoZnzDLrMf+r+kP+/fWzdvU6jKPX2eeyLi1803VZ82 VJrgIeHkWiRsGH09+debhnsXFitHCFyqUYnLMlljcpvFXL13Q8Z9+WvGSizFGYmGWsxFxYkA I96ZQb0CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNLMWRmVeSWpSXmKPExsVy+t9jQV2D1JQYgyl/OC2uXDzEZLFxxnpW i6kPn7BZnD+/gd3i25UOJovLu+awWcw4v4/JYu2Ru+wWh9+0s1pcXPGFyYHLY8PnJjaPnbPu sntsWtXJ5tG3ZRWjx+dNcgGsUVw2Kak5mWWpRfp2CVwZ15eLFGzOrLh06TxbA+Pr0C5GTg4J AROJxr1vWbsYuTiEBNYxShz6tJIdwvnFKNHZ95gdpIpNwFCi92gfI4gtIiAmcXtOJzNIEbNA E5PErtsXwYqEBRIkdq9fA1bEIqAq8XjhYzYQm1fASmJn6zEWiHXyEqs3HGAGsTkFrCX+rX0O 1isEVDPxwyXmCYw8CxgZVjFKphYU56bnFhsVGOWllusVJ+YWl+al6yXn525iBAbZtsNa/TsY Hy+JP8QowMGoxMNbIZQSI8SaWFZcmXuIUYKDWUmEVy8KKMSbklhZlVqUH19UmpNafIhRmoNF SZyXP/9YpJBAemJJanZqakFqEUyWiYNTqoFx5zHW5UfCDnkXMcbrJAW67a3e9WrR4SKbA1NS SwNely0M3dJVtj1hiefu7Ad7Ttxbmh0c/UDi8ifflRpXT3W8T3n09MNWmS17uTelPBFbeD9i QVry87R40ZsiU4wrhCo2LfontW+iY0i02NEK194kh2s879WC5c5W3Vhsn2a0Qe3BlMbEUql/ SizFGYmGWsxFxYkAlPBPlS4CAAA= X-CMS-MailID: 20190213184256epcas2p34078238855e1f9c1730f42e70094b114 CMS-TYPE: 102P X-CMS-RootMailID: 20190213184256epcas2p34078238855e1f9c1730f42e70094b114 References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 01/13] ASoC: samsung: i2s: Move SFR pointer to common driver data structure 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 The SFR region is common for both DAIs so move related data structure field from struct i2s_dai to the common driver data structure. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/i2s.c | 106 ++++++++++++++++++++++------------------ 1 file changed, 59 insertions(+), 47 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 72f0cb7abb30..3f8955608a94 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -60,8 +60,7 @@ struct samsung_i2s_dai_data { struct i2s_dai { /* Platform device for this DAI */ struct platform_device *pdev; - /* Memory mapped SFR region */ - void __iomem *addr; + /* Frame Clock */ unsigned frmclk; /* @@ -100,6 +99,9 @@ struct samsung_i2s_priv { struct platform_device *pdev; struct platform_device *pdev_sec; + /* Memory mapped SFR region */ + void __iomem *addr; + /* Spinlock protecting access to the device's registers */ spinlock_t spinlock; @@ -143,7 +145,9 @@ static inline bool is_secondary(struct i2s_dai *i2s) /* If operating in SoC-Slave mode */ static inline bool is_slave(struct i2s_dai *i2s) { - u32 mod = readl(i2s->addr + I2SMOD); + struct samsung_i2s_priv *priv = i2s->priv; + + u32 mod = readl(priv->addr + I2SMOD); return (mod & (1 << i2s->variant_regs->mss_off)) ? true : false; } @@ -155,7 +159,7 @@ static inline bool tx_active(struct i2s_dai *i2s) if (!i2s) return false; - active = readl(i2s->addr + I2SCON); + active = readl(i2s->priv->addr + I2SCON); if (is_secondary(i2s)) active &= CON_TXSDMA_ACTIVE; @@ -193,7 +197,7 @@ static inline bool rx_active(struct i2s_dai *i2s) if (!i2s) return false; - active = readl(i2s->addr + I2SCON) & CON_RXDMA_ACTIVE; + active = readl(i2s->priv->addr + I2SCON) & CON_RXDMA_ACTIVE; return active ? true : false; } @@ -256,8 +260,10 @@ static inline bool is_manager(struct i2s_dai *i2s) /* Read RCLK of I2S (in multiples of LRCLK) */ static inline unsigned get_rfs(struct i2s_dai *i2s) { + struct samsung_i2s_priv *priv = i2s->priv; u32 rfs; - rfs = readl(i2s->addr + I2SMOD) >> i2s->variant_regs->rfs_off; + + rfs = readl(priv->addr + I2SMOD) >> i2s->variant_regs->rfs_off; rfs &= i2s->variant_regs->rfs_mask; switch (rfs) { @@ -275,7 +281,8 @@ static inline unsigned get_rfs(struct i2s_dai *i2s) /* Write RCLK of I2S (in multiples of LRCLK) */ static inline void set_rfs(struct i2s_dai *i2s, unsigned rfs) { - u32 mod = readl(i2s->addr + I2SMOD); + struct samsung_i2s_priv *priv = i2s->priv; + u32 mod = readl(priv->addr + I2SMOD); int rfs_shift = i2s->variant_regs->rfs_off; mod &= ~(i2s->variant_regs->rfs_mask << rfs_shift); @@ -307,14 +314,16 @@ static inline void set_rfs(struct i2s_dai *i2s, unsigned rfs) break; } - writel(mod, i2s->addr + I2SMOD); + writel(mod, priv->addr + I2SMOD); } /* Read Bit-Clock of I2S (in multiples of LRCLK) */ static inline unsigned get_bfs(struct i2s_dai *i2s) { + struct samsung_i2s_priv *priv = i2s->priv; u32 bfs; - bfs = readl(i2s->addr + I2SMOD) >> i2s->variant_regs->bfs_off; + + bfs = readl(priv->addr + I2SMOD) >> i2s->variant_regs->bfs_off; bfs &= i2s->variant_regs->bfs_mask; switch (bfs) { @@ -333,7 +342,8 @@ static inline unsigned get_bfs(struct i2s_dai *i2s) /* Write Bit-Clock of I2S (in multiples of LRCLK) */ static inline void set_bfs(struct i2s_dai *i2s, unsigned bfs) { - u32 mod = readl(i2s->addr + I2SMOD); + struct samsung_i2s_priv *priv = i2s->priv; + u32 mod = readl(priv->addr + I2SMOD); int tdm = i2s->quirks & QUIRK_SUPPORTS_TDM; int bfs_shift = i2s->variant_regs->bfs_off; @@ -378,13 +388,13 @@ static inline void set_bfs(struct i2s_dai *i2s, unsigned bfs) return; } - writel(mod, i2s->addr + I2SMOD); + writel(mod, priv->addr + I2SMOD); } /* Sample-Size */ static inline int get_blc(struct i2s_dai *i2s) { - int blc = readl(i2s->addr + I2SMOD); + int blc = readl(i2s->priv->addr + I2SMOD); blc = (blc >> 13) & 0x3; @@ -398,7 +408,8 @@ static inline int get_blc(struct i2s_dai *i2s) /* TX Channel Control */ static void i2s_txctrl(struct i2s_dai *i2s, int on) { - void __iomem *addr = i2s->addr; + struct samsung_i2s_priv *priv = i2s->priv; + void __iomem *addr = priv->addr; int txr_off = i2s->variant_regs->txr_off; u32 con = readl(addr + I2SCON); u32 mod = readl(addr + I2SMOD) & ~(3 << txr_off); @@ -448,7 +459,8 @@ static void i2s_txctrl(struct i2s_dai *i2s, int on) /* RX Channel Control */ static void i2s_rxctrl(struct i2s_dai *i2s, int on) { - void __iomem *addr = i2s->addr; + struct samsung_i2s_priv *priv = i2s->priv; + void __iomem *addr = priv->addr; int txr_off = i2s->variant_regs->txr_off; u32 con = readl(addr + I2SCON); u32 mod = readl(addr + I2SMOD) & ~(3 << txr_off); @@ -485,9 +497,9 @@ static inline void i2s_fifo(struct i2s_dai *i2s, u32 flush) return; if (is_secondary(i2s)) - fic = i2s->addr + I2SFICS; + fic = i2s->priv->addr + I2SFICS; else - fic = i2s->addr + I2SFIC; + fic = i2s->priv->addr + I2SFIC; /* Flush the FIFO */ writel(readl(fic) | flush, fic); @@ -516,7 +528,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int rfs, pm_runtime_get_sync(dai->dev); spin_lock_irqsave(i2s->lock, flags); - mod = readl(i2s->addr + I2SMOD); + mod = readl(priv->addr + I2SMOD); spin_unlock_irqrestore(i2s->lock, flags); switch (clk_id) { @@ -613,9 +625,9 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int rfs, } spin_lock_irqsave(i2s->lock, flags); - mod = readl(i2s->addr + I2SMOD); + mod = readl(priv->addr + I2SMOD); mod = (mod & ~mask) | val; - writel(mod, i2s->addr + I2SMOD); + writel(mod, priv->addr + I2SMOD); spin_unlock_irqrestore(i2s->lock, flags); done: pm_runtime_put(dai->dev); @@ -698,7 +710,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) pm_runtime_get_sync(dai->dev); spin_lock_irqsave(i2s->lock, flags); - mod = readl(i2s->addr + I2SMOD); + mod = readl(priv->addr + I2SMOD); /* * Don't change the I2S mode if any controller is active on this * channel. @@ -714,7 +726,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) mod &= ~(sdf_mask | lrp_rlow | mod_slave); mod |= tmp; - writel(mod, i2s->addr + I2SMOD); + writel(mod, priv->addr + I2SMOD); spin_unlock_irqrestore(i2s->lock, flags); pm_runtime_put(dai->dev); @@ -801,9 +813,9 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, } spin_lock_irqsave(i2s->lock, flags); - mod = readl(i2s->addr + I2SMOD); + mod = readl(priv->addr + I2SMOD); mod = (mod & ~mask) | val; - writel(mod, i2s->addr + I2SMOD); + writel(mod, priv->addr + I2SMOD); spin_unlock_irqrestore(i2s->lock, flags); snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture); @@ -837,7 +849,7 @@ static int i2s_startup(struct snd_pcm_substream *substream, i2s->mode |= DAI_MANAGER; if (!any_active(i2s) && (i2s->quirks & QUIRK_NEED_RSTCLR)) - writel(CON_RSTCLR, i2s->addr + I2SCON); + writel(CON_RSTCLR, i2s->priv->addr + I2SCON); spin_unlock_irqrestore(&lock, flags); @@ -920,7 +932,7 @@ static int config_setup(struct i2s_dai *i2s) if (!(i2s->quirks & QUIRK_NO_MUXPSR)) { psr = priv->rclk_srcrate / i2s->frmclk / rfs; - writel(((psr - 1) << 8) | PSR_PSREN, i2s->addr + I2SPSR); + writel(((psr - 1) << 8) | PSR_PSREN, priv->addr + I2SPSR); dev_dbg(&i2s->pdev->dev, "RCLK_SRC=%luHz PSR=%u, RCLK=%dfs, BCLK=%dfs\n", priv->rclk_srcrate, psr, rfs, bfs); @@ -1008,8 +1020,9 @@ static int i2s_set_clkdiv(struct snd_soc_dai *dai, static snd_pcm_sframes_t i2s_delay(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { + struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); struct i2s_dai *i2s = to_info(dai); - u32 reg = readl(i2s->addr + I2SFIC); + u32 reg = readl(priv->addr + I2SFIC); snd_pcm_sframes_t delay; const struct samsung_i2s_variant_regs *i2s_regs = i2s->variant_regs; @@ -1018,7 +1031,7 @@ i2s_delay(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) delay = FIC_RXCOUNT(reg); else if (is_secondary(i2s)) - delay = FICS_TXCOUNT(readl(i2s->addr + I2SFICS)); + delay = FICS_TXCOUNT(readl(priv->addr + I2SFICS)); else delay = (reg >> i2s_regs->ftx0cnt_off) & 0x7f; @@ -1042,6 +1055,7 @@ static int i2s_resume(struct snd_soc_dai *dai) static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) { + struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); struct i2s_dai *i2s = to_info(dai); struct i2s_dai *other = get_other_dai(i2s); unsigned long flags; @@ -1056,10 +1070,10 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) &i2s->dma_capture); if (i2s->quirks & QUIRK_NEED_RSTCLR) - writel(CON_RSTCLR, i2s->addr + I2SCON); + writel(CON_RSTCLR, priv->addr + I2SCON); if (i2s->quirks & QUIRK_SUPPORTS_IDMA) - idma_reg_addr_init(i2s->addr, + idma_reg_addr_init(priv->addr, i2s->sec_dai->idma_playback.addr); } @@ -1086,6 +1100,7 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) static int samsung_i2s_dai_remove(struct snd_soc_dai *dai) { + struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); struct i2s_dai *i2s = to_info(dai); unsigned long flags; @@ -1094,7 +1109,7 @@ static int samsung_i2s_dai_remove(struct snd_soc_dai *dai) if (!is_secondary(i2s)) { if (i2s->quirks & QUIRK_NEED_RSTCLR) { spin_lock_irqsave(i2s->lock, flags); - writel(0, i2s->addr + I2SCON); + writel(0, priv->addr + I2SCON); spin_unlock_irqrestore(i2s->lock, flags); } } @@ -1205,11 +1220,10 @@ static int i2s_alloc_dais(struct samsung_i2s_priv *priv, static int i2s_runtime_suspend(struct device *dev) { struct samsung_i2s_priv *priv = dev_get_drvdata(dev); - struct i2s_dai *i2s = samsung_i2s_get_pri_dai(dev); - priv->suspend_i2smod = readl(i2s->addr + I2SMOD); - priv->suspend_i2scon = readl(i2s->addr + I2SCON); - priv->suspend_i2spsr = readl(i2s->addr + I2SPSR); + priv->suspend_i2smod = readl(priv->addr + I2SMOD); + priv->suspend_i2scon = readl(priv->addr + I2SCON); + priv->suspend_i2spsr = readl(priv->addr + I2SPSR); if (priv->op_clk) clk_disable_unprepare(priv->op_clk); @@ -1221,7 +1235,6 @@ static int i2s_runtime_suspend(struct device *dev) static int i2s_runtime_resume(struct device *dev) { struct samsung_i2s_priv *priv = dev_get_drvdata(dev); - struct i2s_dai *i2s = samsung_i2s_get_pri_dai(dev); int ret; ret = clk_prepare_enable(priv->clk); @@ -1236,9 +1249,9 @@ static int i2s_runtime_resume(struct device *dev) } } - writel(priv->suspend_i2scon, i2s->addr + I2SCON); - writel(priv->suspend_i2smod, i2s->addr + I2SMOD); - writel(priv->suspend_i2spsr, i2s->addr + I2SPSR); + writel(priv->suspend_i2scon, priv->addr + I2SCON); + writel(priv->suspend_i2smod, priv->addr + I2SMOD); + writel(priv->suspend_i2spsr, priv->addr + I2SPSR); return 0; } @@ -1296,21 +1309,21 @@ static int i2s_register_clock_provider(struct samsung_i2s_priv *priv) if (!(i2s->quirks & QUIRK_NO_MUXPSR)) { /* Activate the prescaler */ - u32 val = readl(i2s->addr + I2SPSR); - writel(val | PSR_PSREN, i2s->addr + I2SPSR); + u32 val = readl(priv->addr + I2SPSR); + writel(val | PSR_PSREN, priv->addr + I2SPSR); priv->clk_table[CLK_I2S_RCLK_SRC] = clk_register_mux(dev, i2s_clk_name[CLK_I2S_RCLK_SRC], p_names, ARRAY_SIZE(p_names), CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT, - i2s->addr + I2SMOD, reg_info->rclksrc_off, + priv->addr + I2SMOD, reg_info->rclksrc_off, 1, 0, i2s->lock); priv->clk_table[CLK_I2S_RCLK_PSR] = clk_register_divider(dev, i2s_clk_name[CLK_I2S_RCLK_PSR], i2s_clk_name[CLK_I2S_RCLK_SRC], CLK_SET_RATE_PARENT, - i2s->addr + I2SPSR, 8, 6, 0, i2s->lock); + priv->addr + I2SPSR, 8, 6, 0, i2s->lock); p_names[0] = i2s_clk_name[CLK_I2S_RCLK_PSR]; priv->clk_data.clk_num = 2; @@ -1319,7 +1332,7 @@ static int i2s_register_clock_provider(struct samsung_i2s_priv *priv) priv->clk_table[CLK_I2S_CDCLK] = clk_register_gate(dev, i2s_clk_name[CLK_I2S_CDCLK], p_names[0], CLK_SET_RATE_PARENT, - i2s->addr + I2SMOD, reg_info->cdclkcon_off, + priv->addr + I2SMOD, reg_info->cdclkcon_off, CLK_GATE_SET_TO_DISABLE, i2s->lock); priv->clk_data.clk_num += 1; @@ -1423,9 +1436,9 @@ static int samsung_i2s_probe(struct platform_device *pdev) } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pri_dai->addr = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(pri_dai->addr)) - return PTR_ERR(pri_dai->addr); + priv->addr = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(priv->addr)) + return PTR_ERR(priv->addr); regs_base = res->start; @@ -1472,7 +1485,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) } sec_dai->dma_playback.addr_width = 4; - sec_dai->addr = pri_dai->addr; sec_dai->quirks = quirks; sec_dai->idma_playback.addr = idma_addr; sec_dai->pri_dai = pri_dai; From patchwork Wed Feb 13 18:42:01 2019 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: 10810767 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9F044A0A for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4DB32E07C for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A32C92E06F; Wed, 13 Feb 2019 19:01:26 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 92A9E2E090 for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4191626799C; Wed, 13 Feb 2019 19:43:10 +0100 (CET) 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 15497267978; Wed, 13 Feb 2019 19:43:06 +0100 (CET) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by alsa0.perex.cz (Postfix) with ESMTP id 8839D267917 for ; Wed, 13 Feb 2019 19:43:03 +0100 (CET) Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20190213184300epoutp047429f37fa5d56e01de6e70bba4bfd503~DAJ8wgH3u0657306573epoutp04C; Wed, 13 Feb 2019 18:43:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20190213184300epoutp047429f37fa5d56e01de6e70bba4bfd503~DAJ8wgH3u0657306573epoutp04C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083380; bh=g26M3vvo7rFQlqLQajT+REpGD/4KuQLx8Lv9IuQdqVM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=UilMyFYCX5ktdhBDiPn4qPLdwQP9IG2bosvDBiw2GNcPwgPkKVcMupGMLJZuk6H4P q2cn/2vh/CcG68CyufI+lPF/dRSBFbaPbP72C1C8ygs9cFIGgzgKuRm5/GPx02L9qf ZKaE2YKG+RkS4fcK+cDduMJ3DcV6rNryr6CNiHnw= Received: from epsmges1p2.samsung.com (unknown [182.195.42.54]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190213184300epcas1p42d88a0cd562d972e3af724164743f1c0~DAJ8iEccA0825008250epcas1p4R; Wed, 13 Feb 2019 18:43:00 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 93.B1.04173.435646C5; Thu, 14 Feb 2019 03:43:00 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20190213184259epcas1p16fa2f1a7f049d88ad627c823a117fc36~DAJ8HGkMi0131701317epcas1p1j; Wed, 13 Feb 2019 18:42:59 +0000 (GMT) X-AuditID: b6c32a36-5c1ff7000000104d-0c-5c646534132f Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F4.CE.04015.335646C5; Thu, 14 Feb 2019 03:42:59 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:42:59 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:01 +0100 Message-id: <20190213184212.5473-3-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJIsWRmVeSWpSXmKPExsWy7bCmvq5JakqMwacj7BZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6MlV/OMBZst6po/7eOpYFxvkEXIyeH hICJRHfvI+YuRi4OIYEdjBJ7l29lgnC+M0psbzrI2MXIAVbVO1MTIr6BUWLf6xY2COcXo8SD +a9YQEaxCRhK9B7tYwSxRQTEJG7P6QQbyyzQwiQxZ+5SZpCEsECixKmuHlYQm0VAVeL84j9g DbwCVhJ3VhxmhbhJXmL1hgNg9ZwC1hL/1j5nh4gvYZO40h8IcZGLxKJZ4RCmtMSlo7YQFdUS u7Z3g62VEOhglGi5sJ0ZImEtcfj4RbDxzAJ8Eu++gpwA0ssr0dEmBFHiIbHw2092iL/6GCU2 r7rIOoFRYgEjwypGsdSC4tz01GLDAiO94sTc4tK8dL3k/NxNjOAI1DLbwbjonM8hRgEORiUe 3gqhlBgh1sSy4srcQ4wSHMxKIrx6UUAh3pTEyqrUovz4otKc1OJDjNIcLErivOsdnGOEBNIT S1KzU1MLUotgskwcnFINjCF3b6S85zYp8TW0TLz2LreuNfJluf2r9XyijstYzryRnnlNZpdB 5Z8V61XXzbTRMLnK7Rd3qWXr1/+JJT7zz8Y913m/ya/ihf7/yNvsN516OF/NNedP6vQ0976x WTjhb4oow/HnB2Y/VYsv+jZxrl2p3gre6zy7zAQXzyv5uypzrYGQYb6piBJLcUaioRZzUXEi AAdFqD68AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNLMWRmVeSWpSXmKPExsVy+t9jQV3j1JQYg1uXNC2uXDzEZLFxxnpW i6kPn7BZnD+/gd3i25UOJovLu+awWcw4v4/JYu2Ru+wWh9+0s1pcXPGFyYHLY8PnJjaPnbPu sntsWtXJ5tG3ZRWjx+dNcgGsUVw2Kak5mWWpRfp2CVwZK7+cYSzYblXR/m8dSwPjfIMuRg4O CQETid6Zml2MXBxCAusYJb7uOMgI4fxilJhy+w5bFyMnB5uAoUTv0T5GEFtEQEzi9pxOZpAi ZoEmJoldty+ygySEBRIlTnX1sILYLAKqEucX/wFr4BWwkriz4jBYXEJAXmL1hgPMIDangLXE v7XPwXqFgGomfrjEPIGRZwEjwypGydSC4tz03GKjAsO81HK94sTc4tK8dL3k/NxNjMAg23ZY q28H4/0l8YcYBTgYlXh4FQRSYoRYE8uKK3MPMUpwMCuJ8OpFAYV4UxIrq1KL8uOLSnNSiw8x SnOwKInz3s47FikkkJ5YkpqdmlqQWgSTZeLglGpgXNu1yPzDUgell24zZwoJv6urLpeNWGVz tu7D+uc/zTu14oMeci0ztEoWqXpU8pXd3THounE1//t18/bc4fjxfNaD0wsK5jl/tGWwjS2I Yl302LDiOL/U+8cXond9LJR90lMkKxHZ4J+/2bDozKYbZ5nEArfZbOrvttlyOWDadrOJ5g/e x3NvV2Ipzkg01GIuKk4EAAHirqUuAgAA X-CMS-MailID: 20190213184259epcas1p16fa2f1a7f049d88ad627c823a117fc36 CMS-TYPE: 101P X-CMS-RootMailID: 20190213184259epcas1p16fa2f1a7f049d88ad627c823a117fc36 References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 02/13] ASoC: samsung: i2s: Drop spinlock pointer from i2s_dai data structure 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 As we now have the 'priv' pointer in most of the places we can use priv->lock directly, dropping extra indirection in the SFR region spinlock access. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/i2s.c | 51 +++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 3f8955608a94..cf8615e23879 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -87,8 +87,6 @@ struct i2s_dai { u32 quirks; const struct samsung_i2s_variant_regs *variant_regs; - spinlock_t *lock; - struct samsung_i2s_priv *priv; }; @@ -103,7 +101,7 @@ struct samsung_i2s_priv { void __iomem *addr; /* Spinlock protecting access to the device's registers */ - spinlock_t spinlock; + spinlock_t lock; /* CPU DAIs and their corresponding drivers */ struct i2s_dai *dai; @@ -527,9 +525,9 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int rfs, pm_runtime_get_sync(dai->dev); - spin_lock_irqsave(i2s->lock, flags); + spin_lock_irqsave(&priv->lock, flags); mod = readl(priv->addr + I2SMOD); - spin_unlock_irqrestore(i2s->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); switch (clk_id) { case SAMSUNG_I2S_OPCLK: @@ -624,11 +622,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int rfs, goto err; } - spin_lock_irqsave(i2s->lock, flags); + spin_lock_irqsave(&priv->lock, flags); mod = readl(priv->addr + I2SMOD); mod = (mod & ~mask) | val; writel(mod, priv->addr + I2SMOD); - spin_unlock_irqrestore(i2s->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); done: pm_runtime_put(dai->dev); @@ -709,7 +707,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) } pm_runtime_get_sync(dai->dev); - spin_lock_irqsave(i2s->lock, flags); + spin_lock_irqsave(&priv->lock, flags); mod = readl(priv->addr + I2SMOD); /* * Don't change the I2S mode if any controller is active on this @@ -717,7 +715,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) */ if (any_active(i2s) && ((mod & (sdf_mask | lrp_rlow | mod_slave)) != tmp)) { - spin_unlock_irqrestore(i2s->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); pm_runtime_put(dai->dev); dev_err(&i2s->pdev->dev, "%s:%d Other DAI busy\n", __func__, __LINE__); @@ -727,7 +725,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) mod &= ~(sdf_mask | lrp_rlow | mod_slave); mod |= tmp; writel(mod, priv->addr + I2SMOD); - spin_unlock_irqrestore(i2s->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); pm_runtime_put(dai->dev); return 0; @@ -812,11 +810,11 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - spin_lock_irqsave(i2s->lock, flags); + spin_lock_irqsave(&priv->lock, flags); mod = readl(priv->addr + I2SMOD); mod = (mod & ~mask) | val; writel(mod, priv->addr + I2SMOD); - spin_unlock_irqrestore(i2s->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture); @@ -944,6 +942,7 @@ static int config_setup(struct i2s_dai *i2s) static int i2s_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { + struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); struct snd_soc_pcm_runtime *rtd = substream->private_data; struct i2s_dai *i2s = to_info(rtd->cpu_dai); @@ -954,10 +953,10 @@ static int i2s_trigger(struct snd_pcm_substream *substream, case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: pm_runtime_get_sync(dai->dev); - spin_lock_irqsave(i2s->lock, flags); + spin_lock_irqsave(&priv->lock, flags); if (config_setup(i2s)) { - spin_unlock_irqrestore(i2s->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); return -EINVAL; } @@ -966,12 +965,12 @@ static int i2s_trigger(struct snd_pcm_substream *substream, else i2s_txctrl(i2s, 1); - spin_unlock_irqrestore(i2s->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); break; case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - spin_lock_irqsave(i2s->lock, flags); + spin_lock_irqsave(&priv->lock, flags); if (capture) { i2s_rxctrl(i2s, 0); @@ -981,7 +980,7 @@ static int i2s_trigger(struct snd_pcm_substream *substream, i2s_fifo(i2s, FIC_TXFLUSH); } - spin_unlock_irqrestore(i2s->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); pm_runtime_put(dai->dev); break; } @@ -1081,13 +1080,13 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) i2s->rfs = 0; i2s->bfs = 0; - spin_lock_irqsave(i2s->lock, flags); + spin_lock_irqsave(&priv->lock, flags); i2s_txctrl(i2s, 0); i2s_rxctrl(i2s, 0); i2s_fifo(i2s, FIC_TXFLUSH); i2s_fifo(other, FIC_TXFLUSH); i2s_fifo(i2s, FIC_RXFLUSH); - spin_unlock_irqrestore(i2s->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); /* Gate CDCLK by default */ if (!is_opened(other)) @@ -1108,9 +1107,9 @@ static int samsung_i2s_dai_remove(struct snd_soc_dai *dai) if (!is_secondary(i2s)) { if (i2s->quirks & QUIRK_NEED_RSTCLR) { - spin_lock_irqsave(i2s->lock, flags); + spin_lock_irqsave(&priv->lock, flags); writel(0, priv->addr + I2SCON); - spin_unlock_irqrestore(i2s->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); } } @@ -1317,13 +1316,13 @@ static int i2s_register_clock_provider(struct samsung_i2s_priv *priv) ARRAY_SIZE(p_names), CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT, priv->addr + I2SMOD, reg_info->rclksrc_off, - 1, 0, i2s->lock); + 1, 0, &priv->lock); priv->clk_table[CLK_I2S_RCLK_PSR] = clk_register_divider(dev, i2s_clk_name[CLK_I2S_RCLK_PSR], i2s_clk_name[CLK_I2S_RCLK_SRC], CLK_SET_RATE_PARENT, - priv->addr + I2SPSR, 8, 6, 0, i2s->lock); + priv->addr + I2SPSR, 8, 6, 0, &priv->lock); p_names[0] = i2s_clk_name[CLK_I2S_RCLK_PSR]; priv->clk_data.clk_num = 2; @@ -1333,7 +1332,7 @@ static int i2s_register_clock_provider(struct samsung_i2s_priv *priv) i2s_clk_name[CLK_I2S_CDCLK], p_names[0], CLK_SET_RATE_PARENT, priv->addr + I2SMOD, reg_info->cdclkcon_off, - CLK_GATE_SET_TO_DISABLE, i2s->lock); + CLK_GATE_SET_TO_DISABLE, &priv->lock); priv->clk_data.clk_num += 1; priv->clk_data.clks = priv->clk_table; @@ -1411,8 +1410,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) pri_dai = &priv->dai[SAMSUNG_I2S_ID_PRIMARY - 1]; - spin_lock_init(&priv->spinlock); - pri_dai->lock = &priv->spinlock; + spin_lock_init(&priv->lock); if (!np) { if (i2s_pdata == NULL) { @@ -1474,7 +1472,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) if (quirks & QUIRK_SEC_DAI) { sec_dai = &priv->dai[SAMSUNG_I2S_ID_SECONDARY - 1]; - sec_dai->lock = &priv->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"; From patchwork Wed Feb 13 18:42:02 2019 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: 10810771 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4CC54B54 for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B92512E066 for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B62712E08E; Wed, 13 Feb 2019 19:01:26 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 68D762E07D for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 3ED682679BE; Wed, 13 Feb 2019 19:43:14 +0100 (CET) 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 BE8B6267990; Wed, 13 Feb 2019 19:43:08 +0100 (CET) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by alsa0.perex.cz (Postfix) with ESMTP id 1CF0E26797E for ; Wed, 13 Feb 2019 19:43:05 +0100 (CET) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20190213184304epoutp048cf42929d68b2eab6115060a77513c5a~DAKAerebh2865528655epoutp04k; Wed, 13 Feb 2019 18:43:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20190213184304epoutp048cf42929d68b2eab6115060a77513c5a~DAKAerebh2865528655epoutp04k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083384; bh=ksBuew1Xn57azxYCc3VjsmJS9DByah38YvNWRM7BLGs=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=NPj0M9VBEzJghpQhQQe2FhyikutSg/sbzC2g9cJSp+veRHJG+WpPNYA2fNMU4Lwms GsNPWjB3kgp/e6VGofTuaSisk7OhIb5SRld/+cRBmTNHOqa2K1+0QekeW4fvC+VGky rJDfv/wIEsuCSISQLb5qK0H3szfMbFQtMzUFGEhk= Received: from epsmges2p1.samsung.com (unknown [182.195.42.69]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20190213184303epcas2p41ae12fc436d481c58bef136f68cce2cc~DAJ-zpBMM1561415614epcas2p4f; Wed, 13 Feb 2019 18:43:03 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id F4.52.04138.735646C5; Thu, 14 Feb 2019 03:43:03 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190213184303epcas2p2d72076c025cac4b25bd7b4e77a71595c~DAJ-a_fo51965019650epcas2p2U; Wed, 13 Feb 2019 18:43:03 +0000 (GMT) X-AuditID: b6c32a45-5f3ff7000000102a-a8-5c6465371b4f Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 25.ED.03689.735646C5; Thu, 14 Feb 2019 03:43:03 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:43:03 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:02 +0100 Message-id: <20190213184212.5473-4-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNIsWRmVeSWpSXmKPExsWy7bCmqa55akqMwdp56hZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6MDx/WshS8NKtYuvgeewPjJN0uRk4O CQETiVWz57F2MXJxCAnsYJTY1LsUyvnOKPFi4VS2LkYOsKp509Qh4hsYJY6/OsAE4fxilPjY 8J8RZBSbgKFE79E+MFtEQEzi9pxOZpAiZoEWJok5c5cygySEBVIkJk84wAZiswioSnyd9gXM 5hWwkrh3dAcbxE3yEqs3HACr5xSwlvi39jk7yCAJgSVsEtM+32KEKHKRWDTpIlSDtMSzVRuh 4tUSu7Z3M0M0dDBKtFzYzgyRsJY4fPwiK4jNLMAn0XH4LzvEb7wSHW1CEKaHxLdDoRCf9TFK HJ3TxzaBUWIBI8MqRrHUguLc9NRiowJDveLE3OLSvHS95PzcTYzgKNRy3cE445zPIUYBDkYl Ht4KoZQYIdbEsuLK3EOMEhzMSiK8elFAId6UxMqq1KL8+KLSnNTiQ4zSHCxK4ryPpOdGCwmk J5akZqemFqQWwWSZODilGhhnFVsYGb3rlZhx7LmBm05hzKkZKxK23ii/9Ne465mK3MlN0+Rj D503nFTxlOu9r6y6vl96l3KMRkeJi02CmbVNQVE0n/eB+vuP+LdfmK4md3u2kGGXrUNbiZQJ a8iKg5PfbV7fvL1d7ozXxx2Jve2btzD/LSl7dsfwyjl/1d+vGp5uZje48E2JpTgj0VCLuag4 EQBqhugAvgIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNLMWRmVeSWpSXmKPExsVy+t9jQV3z1JQYg19HeS2uXDzEZLFxxnpW i6kPn7BZnD+/gd3i25UOJovLu+awWcw4v4/JYu2Ru+wWh9+0s1pcXPGFyYHLY8PnJjaPnbPu sntsWtXJ5tG3ZRWjx+dNcgGsUVw2Kak5mWWpRfp2CVwZHz6sZSl4aVaxdPE99gbGSbpdjBwc EgImEvOmqXcxcnEICaxjlPhx7isjhPOLUeJMQxt7FyMnB5uAoUTv0T5GEFtEQEzi9pxOZpAi ZoEmJoldty+CFQkLpEhMnnCADcRmEVCV+DrtC5jNK2Alce/oDjBbQkBeYvWGA8wgNqeAtcS/ tc/BeoWAaiZ+uMQ8gZFnASPDKkbJ1ILi3PTcYqMCo7zUcr3ixNzi0rx0veT83E2MwCDbdlir fwfj4yXxhxgFOBiVeHgrhFJihFgTy4orcw8xSnAwK4nw6kUBhXhTEiurUovy44tKc1KLDzFK c7AoifPy5x+LFBJITyxJzU5NLUgtgskycXBKNTBKJk+5qbgrg8nHc1EE66zb/6/2hvapsX6X UFi5U+nkmoprxzLfyYsJvFgguPyvTPF2M59pvy9p7WZvmCbu/qeh8Nh2tqlHudt2rNBTqcwp P9QcfTrKalacln6ufe+WRO0cz1+8qk5Cj3+lvjU7trHm6gHH6Y6hL06bSvvY655Lk/S4eWvL tFdKLMUZiYZazEXFiQAPkpnHLgIAAA== X-CMS-MailID: 20190213184303epcas2p2d72076c025cac4b25bd7b4e77a71595c CMS-TYPE: 102P X-CMS-RootMailID: 20190213184303epcas2p2d72076c025cac4b25bd7b4e77a71595c References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 03/13] ASoC: samsung: i2s: Move IP variant data to common driver data structure 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 The IP variant data is another thing common for both DAIs, move it to the driver's common data structure. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/i2s.c | 42 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index cf8615e23879..0c4c4de8c7e9 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -85,7 +85,6 @@ struct i2s_dai { struct snd_dmaengine_dai_dma_data idma_playback; dma_filter_fn filter; u32 quirks; - const struct samsung_i2s_variant_regs *variant_regs; struct samsung_i2s_priv *priv; }; @@ -122,6 +121,8 @@ struct samsung_i2s_priv { u32 suspend_i2scon; u32 suspend_i2spsr; + const struct samsung_i2s_variant_regs *variant_regs; + /* The clock provider's data */ struct clk *clk_table[3]; struct clk_onecell_data clk_data; @@ -146,7 +147,7 @@ static inline bool is_slave(struct i2s_dai *i2s) struct samsung_i2s_priv *priv = i2s->priv; u32 mod = readl(priv->addr + I2SMOD); - return (mod & (1 << i2s->variant_regs->mss_off)) ? true : false; + return (mod & (1 << priv->variant_regs->mss_off)) ? true : false; } /* If this interface of the controller is transmitting data */ @@ -261,8 +262,8 @@ static inline unsigned get_rfs(struct i2s_dai *i2s) struct samsung_i2s_priv *priv = i2s->priv; u32 rfs; - rfs = readl(priv->addr + I2SMOD) >> i2s->variant_regs->rfs_off; - rfs &= i2s->variant_regs->rfs_mask; + rfs = readl(priv->addr + I2SMOD) >> priv->variant_regs->rfs_off; + rfs &= priv->variant_regs->rfs_mask; switch (rfs) { case 7: return 192; @@ -281,9 +282,9 @@ static inline void set_rfs(struct i2s_dai *i2s, unsigned rfs) { struct samsung_i2s_priv *priv = i2s->priv; u32 mod = readl(priv->addr + I2SMOD); - int rfs_shift = i2s->variant_regs->rfs_off; + int rfs_shift = priv->variant_regs->rfs_off; - mod &= ~(i2s->variant_regs->rfs_mask << rfs_shift); + mod &= ~(priv->variant_regs->rfs_mask << rfs_shift); switch (rfs) { case 192: @@ -321,8 +322,8 @@ static inline unsigned get_bfs(struct i2s_dai *i2s) struct samsung_i2s_priv *priv = i2s->priv; u32 bfs; - bfs = readl(priv->addr + I2SMOD) >> i2s->variant_regs->bfs_off; - bfs &= i2s->variant_regs->bfs_mask; + bfs = readl(priv->addr + I2SMOD) >> priv->variant_regs->bfs_off; + bfs &= priv->variant_regs->bfs_mask; switch (bfs) { case 8: return 256; @@ -343,7 +344,7 @@ static inline void set_bfs(struct i2s_dai *i2s, unsigned bfs) struct samsung_i2s_priv *priv = i2s->priv; u32 mod = readl(priv->addr + I2SMOD); int tdm = i2s->quirks & QUIRK_SUPPORTS_TDM; - int bfs_shift = i2s->variant_regs->bfs_off; + int bfs_shift = priv->variant_regs->bfs_off; /* Non-TDM I2S controllers do not support BCLK > 48 * FS */ if (!tdm && bfs > 48) { @@ -351,7 +352,7 @@ static inline void set_bfs(struct i2s_dai *i2s, unsigned bfs) return; } - mod &= ~(i2s->variant_regs->bfs_mask << bfs_shift); + mod &= ~(priv->variant_regs->bfs_mask << bfs_shift); switch (bfs) { case 48: @@ -408,7 +409,7 @@ static void i2s_txctrl(struct i2s_dai *i2s, int on) { struct samsung_i2s_priv *priv = i2s->priv; void __iomem *addr = priv->addr; - int txr_off = i2s->variant_regs->txr_off; + int txr_off = priv->variant_regs->txr_off; u32 con = readl(addr + I2SCON); u32 mod = readl(addr + I2SMOD) & ~(3 << txr_off); @@ -459,7 +460,7 @@ static void i2s_rxctrl(struct i2s_dai *i2s, int on) { struct samsung_i2s_priv *priv = i2s->priv; void __iomem *addr = priv->addr; - int txr_off = i2s->variant_regs->txr_off; + int txr_off = priv->variant_regs->txr_off; u32 con = readl(addr + I2SCON); u32 mod = readl(addr + I2SMOD) & ~(3 << txr_off); @@ -516,7 +517,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int rfs, struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); struct i2s_dai *i2s = to_info(dai); struct i2s_dai *other = get_other_dai(i2s); - const struct samsung_i2s_variant_regs *i2s_regs = i2s->variant_regs; + const struct samsung_i2s_variant_regs *i2s_regs = priv->variant_regs; unsigned int cdcon_mask = 1 << i2s_regs->cdclkcon_off; unsigned int rsrc_mask = 1 << i2s_regs->rclksrc_off; u32 mod, mask, val = 0; @@ -644,9 +645,9 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) u32 mod, tmp = 0; unsigned long flags; - lrp_shift = i2s->variant_regs->lrp_off; - sdf_shift = i2s->variant_regs->sdf_off; - mod_slave = 1 << i2s->variant_regs->mss_off; + lrp_shift = priv->variant_regs->lrp_off; + sdf_shift = priv->variant_regs->sdf_off; + mod_slave = 1 << priv->variant_regs->mss_off; sdf_mask = MOD_SDF_MASK << sdf_shift; lrp_rlow = MOD_LR_RLOW << lrp_shift; @@ -1023,7 +1024,6 @@ i2s_delay(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) struct i2s_dai *i2s = to_info(dai); u32 reg = readl(priv->addr + I2SFIC); snd_pcm_sframes_t delay; - const struct samsung_i2s_variant_regs *i2s_regs = i2s->variant_regs; WARN_ON(!pm_runtime_active(dai->dev)); @@ -1032,7 +1032,7 @@ i2s_delay(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) else if (is_secondary(i2s)) delay = FICS_TXCOUNT(readl(priv->addr + I2SFICS)); else - delay = (reg >> i2s_regs->ftx0cnt_off) & 0x7f; + delay = (reg >> priv->variant_regs->ftx0cnt_off) & 0x7f; return delay; } @@ -1281,7 +1281,7 @@ static int i2s_register_clock_provider(struct samsung_i2s_priv *priv) const char *p_names[2] = { NULL }; struct device *dev = &priv->pdev->dev; struct i2s_dai *i2s = samsung_i2s_get_pri_dai(dev); - const struct samsung_i2s_variant_regs *reg_info = i2s->variant_regs; + const struct samsung_i2s_variant_regs *reg_info = priv->variant_regs; const char *i2s_clk_name[ARRAY_SIZE(i2s_clk_desc)]; struct clk *rclksrc; int ret, i; @@ -1400,6 +1400,8 @@ static int samsung_i2s_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; + priv->variant_regs = i2s_dai_data->i2s_variant_regs; + quirks = np ? i2s_dai_data->quirks : i2s_pdata->type.quirks; num_dais = (quirks & QUIRK_SEC_DAI) ? 2 : 1; priv->pdev = pdev; @@ -1458,7 +1460,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) pri_dai->dma_playback.addr_width = 4; pri_dai->dma_capture.addr_width = 4; pri_dai->quirks = quirks; - pri_dai->variant_regs = i2s_dai_data->i2s_variant_regs; pri_dai->priv = priv; if (quirks & QUIRK_PRI_6CHAN) @@ -1472,7 +1473,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) if (quirks & QUIRK_SEC_DAI) { sec_dai = &priv->dai[SAMSUNG_I2S_ID_SECONDARY - 1]; - sec_dai->variant_regs = pri_dai->variant_regs; sec_dai->dma_playback.addr = regs_base + I2STXDS; sec_dai->dma_playback.chan_name = "tx-sec"; From patchwork Wed Feb 13 18:42:03 2019 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: 10810761 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AD8051A2B for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 993E62E08E for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86EA12E06E; Wed, 13 Feb 2019 19:01:26 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 7B73A2E089 for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BCD6626798F; Wed, 13 Feb 2019 19:43:15 +0100 (CET) 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 AEB5326798A; Wed, 13 Feb 2019 19:43:11 +0100 (CET) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by alsa0.perex.cz (Postfix) with ESMTP id 9DFE62679AF for ; Wed, 13 Feb 2019 19:43:09 +0100 (CET) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190213184307epoutp0253ddfca272ef498e81bedab457e4d39c~DAKDVfEAj0217602176epoutp02U; Wed, 13 Feb 2019 18:43:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190213184307epoutp0253ddfca272ef498e81bedab457e4d39c~DAKDVfEAj0217602176epoutp02U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083387; bh=cdxa69xtYLHciSEnv9sUjq5OE7F/lZIZBuYcOBsw/Hw=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=toZJ4u0VhBuQiBp/IQbyYaoPSKJ7nzM6zYxa8T9pv0BshLnzF82VyPRKu6vNfzbT7 PizN8G58FopXaC1bLKNJfSQIU2aazsdmxCs4d1iLrzov/VY5cfL6dh8bV18Mx2YPxK CsDSv8pgfO+Mc8Efo4mW9GkJTKupmGUlIaAuoYeE= Received: from epsmges1p3.samsung.com (unknown [182.195.42.55]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190213184307epcas1p3ecb73f3a314061f5fcf6bde4d0f552be~DAKDHt8uO0391703917epcas1p3O; Wed, 13 Feb 2019 18:43:07 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 35.DB.04069.B35646C5; Thu, 14 Feb 2019 03:43:07 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190213184306epcas1p4ff854f370c8ea8371430e26c3bfeac19~DAKCqUaYU2228522285epcas1p4X; Wed, 13 Feb 2019 18:43:06 +0000 (GMT) X-AuditID: b6c32a37-989ff70000000fe5-00-5c64653b04fe Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 26.CE.04015.A35646C5; Thu, 14 Feb 2019 03:43:06 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:43:06 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:03 +0100 Message-id: <20190213184212.5473-5-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWy7bCmrq51akqMwZGLXBZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6M2U3CBW26FXdnXWJtYPyj0sXIySEh YCJxYFkTaxcjF4eQwA5GiRUHJrJAON8ZJZbOaGKEqZoz5xhUYgOjRPeGfkYI5xejxIyb39lA qtgEDCV6j/aBdYgIiEncntPJDFLELNDCJDFn7lJmkISwQIJEy/IvTCA2i4CqxNmGv0A2Bwev gJXE7e+KENvkJVZvOABWzilgLfFv7XN2kDkSAkvYJFb03mWHKHKRuNm2gBmkV0JAWuLSUVuI cLXEru3dzBD1HYwSLRe2M0MkrCUOH7/ICmIzC/BJvPvawwrRyyvR0SYEUeIhMXv9MyaIx/oY JSYcXcQygVFiASPDKkax1ILi3PTUYsMCY73ixNzi0rx0veT83E2M4BjUMt/BuOGczyFGAQ5G JR7eCqGUGCHWxLLiytxDjBIczEoivHpRQCHelMTKqtSi/Pii0pzU4kOM0hwsSuK86x2cY4QE 0hNLUrNTUwtSi2CyTBycUg2MPZPtgkuv8fe4RJo7/dyc9bzrEdesc/8/XuaP/nezkW/x/4pD K293bXn4NNN26707jxlKjK7Mti9YfmLjfLdXG5/0ndgXUrX609+jcqce2y7e3+t6KvB+avmc Bi5zSc6iWWWHTzc++pt0aXuT2NnmqofuCXxl7i2LuE673mqduHRagFTcP+n4o0osxRmJhlrM RcWJAE75H7K9AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJLMWRmVeSWpSXmKPExsVy+t9jQV2r1JQYg/aDehZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6M2U3CBW26FXdnXWJtYPyj0sXIySEh YCIxZ84xli5GLg4hgXWMEsf6VzCDJIQEfjFKrH7FAWKzCRhK9B7tYwSxRQTEJG7P6WQGaWAW aGKS2HX7IjtIQlggQeLbu3msIDaLgKrE2Ya/TF2MHBy8AlYSt78rQiyTl1i94QDYfE4Ba4l/ a5+zQ+yykpj44RLzBEaeBYwMqxglUwuKc9Nzi40KDPNSy/WKE3OLS/PS9ZLzczcxAgNs22Gt vh2M95fEH2IU4GBU4uFVEEiJEWJNLCuuzD3EKMHBrCTCqxcFFOJNSaysSi3Kjy8qzUktPsQo zcGiJM57O+9YpJBAemJJanZqakFqEUyWiYNTqoFRdlqg5akbKh0XQiMm1/2b7Zmuf52NLbnq vGRxiY7Kg2N5bbzHq3duXHdA1GL/84hHs+89/Jy2b3r+jDfPs8U9976Jenzombz78p1Hiydv ZF7VkfXl6Sy/498z4tXP5n7yjL/zeStDYKGy+ra0qYunXYidU1Ybx2T+u7TGWHdapaGy1OOq pv07lViKMxINtZiLihMBS81NFSwCAAA= X-CMS-MailID: 20190213184306epcas1p4ff854f370c8ea8371430e26c3bfeac19 CMS-TYPE: 101P X-CMS-RootMailID: 20190213184306epcas1p4ff854f370c8ea8371430e26c3bfeac19 References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 04/13] ASoC: samsung: i2s: Move quirks data to common driver data structure 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 The quirk flags are common for the primary and the secondary DAI so move respective field from struct i2s_dai to common driver data structure. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/i2s.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 0c4c4de8c7e9..8f0af4b0f25a 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -84,7 +84,6 @@ struct i2s_dai { struct snd_dmaengine_dai_dma_data dma_capture; struct snd_dmaengine_dai_dma_data idma_playback; dma_filter_fn filter; - u32 quirks; struct samsung_i2s_priv *priv; }; @@ -122,19 +121,13 @@ struct samsung_i2s_priv { u32 suspend_i2spsr; const struct samsung_i2s_variant_regs *variant_regs; + u32 quirks; /* The clock provider's data */ struct clk *clk_table[3]; struct clk_onecell_data clk_data; }; -struct i2s_dai *samsung_i2s_get_pri_dai(struct device *dev) -{ - struct samsung_i2s_priv *priv = dev_get_drvdata(dev); - - return &priv->dai[SAMSUNG_I2S_ID_PRIMARY - 1]; -} - /* Returns true if this is the 'overlay' stereo DAI */ static inline bool is_secondary(struct i2s_dai *i2s) { @@ -343,7 +336,7 @@ static inline void set_bfs(struct i2s_dai *i2s, unsigned bfs) { struct samsung_i2s_priv *priv = i2s->priv; u32 mod = readl(priv->addr + I2SMOD); - int tdm = i2s->quirks & QUIRK_SUPPORTS_TDM; + int tdm = priv->quirks & QUIRK_SUPPORTS_TDM; int bfs_shift = priv->variant_regs->bfs_off; /* Non-TDM I2S controllers do not support BCLK > 48 * FS */ @@ -563,7 +556,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int rfs, case SAMSUNG_I2S_RCLKSRC_1: /* clock corrsponding to IISMOD[10] := 1 */ mask = 1 << i2s_regs->rclksrc_off; - if ((i2s->quirks & QUIRK_NO_MUXPSR) + if ((priv->quirks & QUIRK_NO_MUXPSR) || (clk_id == SAMSUNG_I2S_RCLKSRC_0)) clk_id = 0; else @@ -832,6 +825,7 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, static int i2s_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { + struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); struct i2s_dai *i2s = to_info(dai); struct i2s_dai *other = get_other_dai(i2s); unsigned long flags; @@ -847,7 +841,7 @@ static int i2s_startup(struct snd_pcm_substream *substream, else i2s->mode |= DAI_MANAGER; - if (!any_active(i2s) && (i2s->quirks & QUIRK_NEED_RSTCLR)) + if (!any_active(i2s) && (priv->quirks & QUIRK_NEED_RSTCLR)) writel(CON_RSTCLR, i2s->priv->addr + I2SCON); spin_unlock_irqrestore(&lock, flags); @@ -929,7 +923,7 @@ static int config_setup(struct i2s_dai *i2s) if (is_slave(i2s)) return 0; - if (!(i2s->quirks & QUIRK_NO_MUXPSR)) { + if (!(priv->quirks & QUIRK_NO_MUXPSR)) { psr = priv->rclk_srcrate / i2s->frmclk / rfs; writel(((psr - 1) << 8) | PSR_PSREN, priv->addr + I2SPSR); dev_dbg(&i2s->pdev->dev, @@ -1068,10 +1062,10 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture); - if (i2s->quirks & QUIRK_NEED_RSTCLR) + if (priv->quirks & QUIRK_NEED_RSTCLR) writel(CON_RSTCLR, priv->addr + I2SCON); - if (i2s->quirks & QUIRK_SUPPORTS_IDMA) + if (priv->quirks & QUIRK_SUPPORTS_IDMA) idma_reg_addr_init(priv->addr, i2s->sec_dai->idma_playback.addr); } @@ -1106,7 +1100,7 @@ static int samsung_i2s_dai_remove(struct snd_soc_dai *dai) pm_runtime_get_sync(dai->dev); if (!is_secondary(i2s)) { - if (i2s->quirks & QUIRK_NEED_RSTCLR) { + if (priv->quirks & QUIRK_NEED_RSTCLR) { spin_lock_irqsave(&priv->lock, flags); writel(0, priv->addr + I2SCON); spin_unlock_irqrestore(&priv->lock, flags); @@ -1280,7 +1274,6 @@ static int i2s_register_clock_provider(struct samsung_i2s_priv *priv) const char *clk_name[2] = { "i2s_opclk0", "i2s_opclk1" }; const char *p_names[2] = { NULL }; struct device *dev = &priv->pdev->dev; - struct i2s_dai *i2s = samsung_i2s_get_pri_dai(dev); const struct samsung_i2s_variant_regs *reg_info = priv->variant_regs; const char *i2s_clk_name[ARRAY_SIZE(i2s_clk_desc)]; struct clk *rclksrc; @@ -1306,7 +1299,7 @@ static int i2s_register_clock_provider(struct samsung_i2s_priv *priv) return -ENOMEM; } - if (!(i2s->quirks & QUIRK_NO_MUXPSR)) { + if (!(priv->quirks & QUIRK_NO_MUXPSR)) { /* Activate the prescaler */ u32 val = readl(priv->addr + I2SPSR); writel(val | PSR_PSREN, priv->addr + I2SPSR); @@ -1400,11 +1393,11 @@ static int samsung_i2s_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - priv->variant_regs = i2s_dai_data->i2s_variant_regs; - quirks = np ? i2s_dai_data->quirks : i2s_pdata->type.quirks; num_dais = (quirks & QUIRK_SEC_DAI) ? 2 : 1; priv->pdev = pdev; + priv->variant_regs = i2s_dai_data->i2s_variant_regs; + priv->quirks = quirks; ret = i2s_alloc_dais(priv, i2s_dai_data, num_dais); if (ret < 0) @@ -1459,7 +1452,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) 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; pri_dai->priv = priv; if (quirks & QUIRK_PRI_6CHAN) @@ -1482,7 +1474,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) } sec_dai->dma_playback.addr_width = 4; - sec_dai->quirks = quirks; sec_dai->idma_playback.addr = idma_addr; sec_dai->pri_dai = pri_dai; sec_dai->priv = priv; From patchwork Wed Feb 13 18:42:04 2019 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: 10810753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B92FB746 for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D4DA2E091 for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C8722E066; Wed, 13 Feb 2019 19:01:25 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 3D5C72E066 for ; Wed, 13 Feb 2019 19:01:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 3F4A22679DF; Wed, 13 Feb 2019 19:43:26 +0100 (CET) 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 EC67A2679CF; Wed, 13 Feb 2019 19:43:24 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id F006F2679D9 for ; Wed, 13 Feb 2019 19:43:15 +0100 (CET) Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190213184312epoutp03b28fa698e7afdcfc740c291105935d67~DAKIZZAQP1818718187epoutp031; Wed, 13 Feb 2019 18:43:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190213184312epoutp03b28fa698e7afdcfc740c291105935d67~DAKIZZAQP1818718187epoutp031 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083393; bh=RiH3ahhVKOH75JYNzV0klrcfLZmbHDaDh+RWeur8M9c=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=KWXay685eyDIBsrBNDrxb/P1kjKYSHhvMLjAThJixLdkm9yon179KeqJQR+ji3rT5 bNYrliNH7zY9lk0kmmeaDE1zWMQRNRIuDPeliMaKkv2qVdNJagjRV8B5ePMCiMiqDL hA0c/v9px+5eYimETKaAxtPJxBkzKQ/7qC/I3GFE= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20190213184311epcas2p379b5719941923faabb38978d93ca9637~DAKHKjAl60253402534epcas2p3t; Wed, 13 Feb 2019 18:43:11 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 56.3E.04093.F35646C5; Thu, 14 Feb 2019 03:43:11 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190213184310epcas2p239500afce801a9828da360fef41bb886~DAKF_I07x2251322513epcas2p2c; Wed, 13 Feb 2019 18:43:10 +0000 (GMT) X-AuditID: b6c32a48-173ff70000000ffd-4a-5c64653fd209 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id B6.ED.03689.E35646C5; Thu, 14 Feb 2019 03:43:10 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:43:10 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:04 +0100 Message-id: <20190213184212.5473-6-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWy7bCmma59akqMQfMbBYsrFw8xWWycsZ7V YurDJ2wW589vYLf4dqWDyeLyrjlsFjPO72OyWHvkLrvF4TftrBYXV3xhcuDy2PC5ic1j56y7 7B6bVnWyefRtWcXo8XmTXABrFJdNSmpOZllqkb5dAlfGih1HWAtmilas6L7K2sB4VLCLkZND QsBEovHORbYuRi4OIYEdjBLrn+xghHC+M0rc/NfKBFN1YecLqMQGRonz66cwQTi/GCXaryxg BqliEzCU6D3axwhiiwiISdye08kMUsQs0MIkMWfuUiCHg0NYwEvicpsPSA2LgKrE1rlPwDbw ClhJzF+0ghFim7zE6g0HwGZyClhL/Fv7nB1kjoTAEjaJCde7oE5ykTj99wQ7hC0t8WzVRqjm aold27uZIRo6GCVaLmxnhkhYSxw+fpEVxGYW4JPoOPyXHeQgCQFeiY42IQjTQ2L9d2+QCiGB PkaJaa+YJjBKLGBkWMUollpQnJueWmxUYKJXnJhbXJqXrpecn7uJERyDWh47GA+c8znEKMDB qMTDWyGUEiPEmlhWXJl7iFGCg1lJhFcvCijEm5JYWZValB9fVJqTWnyIUZqDRUmc96H03Ggh gfTEktTs1NSC1CKYLBMHp1QDI0OaX/DyQyaPsy7vu3Wu+EfxmeNHUu8y+vc2lZrmOwlP/W2x XHSjz4Q/L83db957xctkm1QWYLpugTL35Bd/Az0D4v3+8htfvqURIlrGK36irm7xXm2pXafs 53945+k1SfLI55BmnwAe66MvXE5f5n3QyNrjlfUh59yVlJL6HQv5vsu+iWl/pMRSnJFoqMVc VJwIAFvOwxu9AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNLMWRmVeSWpSXmKPExsVy+t9jQV271JQYgy8bhCyuXDzEZLFxxnpW i6kPn7BZnD+/gd3i25UOJovLu+awWcw4v4/JYu2Ru+wWh9+0s1pcXPGFyYHLY8PnJjaPnbPu sntsWtXJ5tG3ZRWjx+dNcgGsUVw2Kak5mWWpRfp2CVwZK3YcYS2YKVqxovsqawPjUcEuRk4O CQETiQs7XzB2MXJxCAmsY5RYfGMvK4Tzi1Hiwquz7CBVbAKGEr1H+xhBbBEBMYnbczqZQYqY BZqYJHbdvghUxMEhLOAlcbnNB6SGRUBVYuvcJ0wgNq+AlcT8RSsYIbbJS6zecIAZxOYUsJb4 t/Y52HwhoJqJHy4xT2DkWcDIsIpRMrWgODc9t9iowCgvtVyvODG3uDQvXS85P3cTIzDIth3W 6t/B+HhJ/CFGAQ5GJR7eCqGUGCHWxLLiytxDjBIczEoivHpRQCHelMTKqtSi/Pii0pzU4kOM 0hwsSuK8/PnHIoUE0hNLUrNTUwtSi2CyTBycUg2Ms4W+LBKpOsHuVLw4N/+10+uvd+7632vZ MuXpkg28q+5fYmTb9m0J58kPnQ4qYdzZWT4ub5b0TxSYUZDoPu/8Z5dez6m+xzl/bFeYsdd+ iaLNT17Zx/yvegKX5h5Kq6g2YvwSIWSunzgtcM9E5WMnEy/sSnO41uTbm79oW/iK3Vtbw3Rv hr1crsRSnJFoqMVcVJwIAKz9OTguAgAA X-CMS-MailID: 20190213184310epcas2p239500afce801a9828da360fef41bb886 CMS-TYPE: 102P X-CMS-RootMailID: 20190213184310epcas2p239500afce801a9828da360fef41bb886 References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 05/13] ASoC: samsung: i2s: Get rid of a static spinlock 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 This patch makes the spinlock serializing access to the primary/secondary PCM a per I2S controller lock, rather than a global one. There is no need to have a global lock across multiple I2S controllers in the SoC. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/i2s.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 8f0af4b0f25a..692a752b194c 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -88,9 +88,6 @@ struct i2s_dai { struct samsung_i2s_priv *priv; }; -/* Lock for cross i/f checks */ -static DEFINE_SPINLOCK(lock); - struct samsung_i2s_priv { struct platform_device *pdev; struct platform_device *pdev_sec; @@ -101,6 +98,9 @@ struct samsung_i2s_priv { /* Spinlock protecting access to the device's registers */ spinlock_t lock; + /* Lock for cross i/f checks */ + spinlock_t pcm_lock; + /* CPU DAIs and their corresponding drivers */ struct i2s_dai *dai; struct snd_soc_dai_driver *dai_drv; @@ -832,7 +832,7 @@ static int i2s_startup(struct snd_pcm_substream *substream, pm_runtime_get_sync(dai->dev); - spin_lock_irqsave(&lock, flags); + spin_lock_irqsave(&priv->pcm_lock, flags); i2s->mode |= DAI_OPENED; @@ -844,7 +844,7 @@ static int i2s_startup(struct snd_pcm_substream *substream, if (!any_active(i2s) && (priv->quirks & QUIRK_NEED_RSTCLR)) writel(CON_RSTCLR, i2s->priv->addr + I2SCON); - spin_unlock_irqrestore(&lock, flags); + spin_unlock_irqrestore(&priv->pcm_lock, flags); return 0; } @@ -852,11 +852,12 @@ static int i2s_startup(struct snd_pcm_substream *substream, static void i2s_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { + struct samsung_i2s_priv *priv = snd_soc_dai_get_drvdata(dai); struct i2s_dai *i2s = to_info(dai); struct i2s_dai *other = get_other_dai(i2s); unsigned long flags; - spin_lock_irqsave(&lock, flags); + spin_lock_irqsave(&priv->pcm_lock, flags); i2s->mode &= ~DAI_OPENED; i2s->mode &= ~DAI_MANAGER; @@ -868,7 +869,7 @@ static void i2s_shutdown(struct snd_pcm_substream *substream, i2s->rfs = 0; i2s->bfs = 0; - spin_unlock_irqrestore(&lock, flags); + spin_unlock_irqrestore(&priv->pcm_lock, flags); pm_runtime_put(dai->dev); } @@ -1406,6 +1407,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) pri_dai = &priv->dai[SAMSUNG_I2S_ID_PRIMARY - 1]; spin_lock_init(&priv->lock); + spin_lock_init(&priv->pcm_lock); if (!np) { if (i2s_pdata == NULL) { From patchwork Wed Feb 13 18:42:05 2019 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: 10810769 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0BBF922 for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD5982E06E for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB83D2E089; Wed, 13 Feb 2019 19:01:26 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 70C8D2E086 for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1BEED2679D0; Wed, 13 Feb 2019 19:43:33 +0100 (CET) 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 4B4072679FA; Wed, 13 Feb 2019 19:43:30 +0100 (CET) Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by alsa0.perex.cz (Postfix) with ESMTP id C018626798A for ; Wed, 13 Feb 2019 19:43:18 +0100 (CET) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20190213184315epoutp01cc8b4fc074676b220b75700c19d56cf2~DAKKrUJ8a2255422554epoutp01h; Wed, 13 Feb 2019 18:43:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20190213184315epoutp01cc8b4fc074676b220b75700c19d56cf2~DAKKrUJ8a2255422554epoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083395; bh=B1AtEhhTMy3xB0W+/1ELKHiXPJz4MxJed1jVqQtyFL0=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=l2AIA5RhVVft4CumFLt6KYcbBm8AeG69tZSNugAy+3rsQLzxNvHw7JRbft5xnr9vK 103TnaA0q0heV44N+fULpQE+y9PjGHQC7Wqaq0ac35tTfgaXYmfmrXcTvr5BWnUQkV fo9qCGTMyAkzoG/z2kKPRuKbrg/o3LkLB9tqq3PE= Received: from epsmges1p1.samsung.com (unknown [182.195.42.53]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190213184314epcas1p30f4d6a3119af32022f3868495c0a1afa~DAKJpglIh2300523005epcas1p3F; Wed, 13 Feb 2019 18:43:14 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 9F.10.04074.245646C5; Thu, 14 Feb 2019 03:43:14 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190213184313epcas1p4d40c267289cd3ff64879a224b91da6d0~DAKJVlakk0477004770epcas1p48; Wed, 13 Feb 2019 18:43:13 +0000 (GMT) X-AuditID: b6c32a35-297ff70000000fea-f6-5c64654233e6 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id B7.CE.04015.145646C5; Thu, 14 Feb 2019 03:43:13 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:43:13 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:05 +0100 Message-id: <20190213184212.5473-7-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNIsWRmVeSWpSXmKPExsWy7bCmga5TakqMwaMT/BZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6MpR8a2Qq+mVUsnneKrYGxW7eLkZND QsBEYtLRdWwgtpDADkaJgweUuxi5gOzvQPbrc2wwRWc232OESGxglLj+fgcLhPOLUeL26+8s IFVsAoYSvUf7GEFsEQExidtzOplBipgFWpgk5sxdygySEBYIkeifvwOsgUVAVWLr6b1gcV4B K4lf+y8wQqyTl1i94QBYnFPAWuLf2ufsIIMkBBawSXSvv8EOUeQi8WXiUqAGDiBbWuLSUVuI cLXEru3dzBD1HYwSLRe2M0MkrCUOH7/ICmIzC/BJvPvawwrRyyvR0SYEUeIhMeP6CyaIz/oY JV58eMA6gVFiASPDKkax1ILi3PTUYsMCQ73ixNzi0rx0veT83E2M4CjUMt3BOOWczyFGAQ5G JR7eCqGUGCHWxLLiytxDjBIczEoivHpRQCHelMTKqtSi/Pii0pzU4kOM0hwsSuK86x2cY4QE 0hNLUrNTUwtSi2CyTBycUg2M7D8smo7Jb/d0mxn41OtQt66CS9UihR0OnTsvx213P8TnGMj7 7/baRfJTQ3aUPpzQljg7esOu8Bydz6s+5d9U35BTnVN3zOTV9I6p5r+Yrx+xeNsgMefJuhqe d9H2cXcrju1v4WtM478e9sFON3mVjsg7360MG+SulvwTDRTcp9Y59TrDCsZ1SizFGYmGWsxF xYkAip1tEb4CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDLMWRmVeSWpSXmKPExsVy+t9jQV3H1JQYg6XNJhZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6MpR8a2Qq+mVUsnneKrYGxW7eLkZND QsBE4szme4xdjFwcQgLrGCW+fXzJBOH8YpR4uLiREaSKTcBQovdoH5gtIiAmcXtOJzNIEbNA E5PErtsX2UESwgIhElf2P2EDsVkEVCW2nt7LDGLzClhJ/Np/gRFinbzE6g0HwOKcAtYS/9Y+ B+sVAqqZ+OES8wRGngWMDKsYJVMLinPTc4uNCgzzUsv1ihNzi0vz0vWS83M3MQLDbNthrb4d jPeXxB9iFOBgVOLhVRBIiRFiTSwrrsw9xCjBwawkwqsXBRTiTUmsrEotyo8vKs1JLT7EKM3B oiTOezvvWKSQQHpiSWp2ampBahFMlomDU6qBcbYak9u5TVGvAy/7Gx5ZV9s/45YV66ysXWcl nobsfXVIMrTg8PccBq61s1ZyPbRovFHQcqd737Gs/x7Mixa/qvq/8bml4lsWbqeb1+aqJe3k 0Bc4Pzf3D+/r+udHGvgva0UwlQYovJNPfnBq0RePBLUZ/6r2hT9daCoWtOvry4TrUulRia6i YUosxRmJhlrMRcWJANqo454vAgAA X-CMS-MailID: 20190213184313epcas1p4d40c267289cd3ff64879a224b91da6d0 CMS-TYPE: 101P X-CMS-RootMailID: 20190213184313epcas1p4d40c267289cd3ff64879a224b91da6d0 References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 06/13] ASoC: samsung: odroid: Add support for secondary CPU DAI 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 This patch adds DPCM links in order to support the secondary I2S interface. For the secondary PCM interface to be actually available one more entry should be added to the sound-dai property in sound/cpu node in DT. The changes in driver are done in a way so we are backwards compatible with existing DTS/DTB, i.e. if the cpu sound-dai property contains only one entry only one PCM will be registered. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/odroid.c | 131 +++++++++++++++++++++++++++---------- 1 file changed, 95 insertions(+), 36 deletions(-) diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index e7b371b07230..18bb3bfe0300 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -17,21 +18,24 @@ struct odroid_priv { struct snd_soc_card card; - struct snd_soc_dai_link dai_link; - struct clk *clk_i2s_bus; struct clk *sclk_i2s; }; -static int odroid_card_startup(struct snd_pcm_substream *substream) +static int odroid_card_fe_startup(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; snd_pcm_hw_constraint_single(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, 2); + return 0; } -static int odroid_card_hw_params(struct snd_pcm_substream *substream, +static const struct snd_soc_ops odroid_card_fe_ops = { + .startup = odroid_card_fe_startup, +}; + +static int odroid_card_be_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = substream->private_data; @@ -86,19 +90,55 @@ static int odroid_card_hw_params(struct snd_pcm_substream *substream, return 0; } -static const struct snd_soc_ops odroid_card_ops = { - .startup = odroid_card_startup, - .hw_params = odroid_card_hw_params, +static const struct snd_soc_ops odroid_card_be_ops = { + .hw_params = odroid_card_be_hw_params, +}; + +static struct snd_soc_dai_link odroid_card_dais[] = { + { + /* Primary FE <-> BE link */ + .codec_name = "snd-soc-dummy", + .codec_dai_name = "snd-soc-dummy-dai", + .ops = &odroid_card_fe_ops, + .name = "Primary", + .stream_name = "Primary", + .platform_name = "3830000.i2s", + .dynamic = 1, + .dpcm_playback = 1, + }, { + /* BE <-> CODECs link */ + .name = "I2S Mixer", + .cpu_name = "snd-soc-dummy", + .cpu_dai_name = "snd-soc-dummy-dai", + .platform_name = "snd-soc-dummy", + .ops = &odroid_card_be_ops, + .no_pcm = 1, + .dpcm_playback = 1, + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | + SND_SOC_DAIFMT_CBS_CFS, + }, { + /* Secondary FE <-> BE link */ + .playback_only = 1, + .codec_name = "snd-soc-dummy", + .codec_dai_name = "snd-soc-dummy-dai", + .ops = &odroid_card_fe_ops, + .name = "Secondary", + .stream_name = "Secondary", + .platform_name = "samsung-i2s-sec", + .dynamic = 1, + .dpcm_playback = 1, + } }; static int odroid_audio_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *cpu, *codec; + struct device_node *cpu, *cpu_dai, *codec; struct odroid_priv *priv; - struct snd_soc_dai_link *link; struct snd_soc_card *card; - int ret; + struct snd_soc_dai_link *link, *codec_link; + int num_pcms, ret, i; + struct of_phandle_args args = {}; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -130,45 +170,67 @@ static int odroid_audio_probe(struct platform_device *pdev) return ret; } - link = &priv->dai_link; - - link->ops = &odroid_card_ops; - link->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | - SND_SOC_DAIFMT_CBS_CFS; - - card->dai_link = &priv->dai_link; - card->num_links = 1; + card->dai_link = odroid_card_dais; + card->num_links = ARRAY_SIZE(odroid_card_dais); cpu = of_get_child_by_name(dev->of_node, "cpu"); codec = of_get_child_by_name(dev->of_node, "codec"); + link = card->dai_link; + codec_link = &card->dai_link[1]; - link->cpu_of_node = of_parse_phandle(cpu, "sound-dai", 0); - if (!link->cpu_of_node) { - dev_err(dev, "Failed parsing cpu/sound-dai property\n"); - return -EINVAL; + /* + * For backwards compatibility create the secondary CPU DAI link only + * if there are 2 CPU DAI entries in the cpu sound-dai property in DT. + */ + num_pcms = of_count_phandle_with_args(cpu, "sound-dai", + "#sound-dai-cells"); + if (num_pcms == 1) + card->num_links--; + + for (i = 0; i < num_pcms; i++, link += 2) { + ret = of_parse_phandle_with_args(cpu, "sound-dai", + "#sound-dai-cells", i, &args); + if (ret < 0) + return ret; + + if (!args.np) { + dev_err(dev, "sound-dai property parse error: %d\n", ret); + return -EINVAL; + } + + ret = snd_soc_get_dai_name(&args, &link->cpu_dai_name); + of_node_put(args.np); + + if (ret < 0) + return ret; } - ret = snd_soc_of_get_dai_link_codecs(dev, codec, link); + cpu_dai = of_parse_phandle(cpu, "sound-dai", 0); + of_node_put(cpu); + of_node_put(codec); + + ret = snd_soc_of_get_dai_link_codecs(dev, codec, codec_link); if (ret < 0) goto err_put_codec_n; - link->platform_of_node = link->cpu_of_node; - - link->name = "Primary"; - link->stream_name = link->name; - + /* Set capture capability only for boards with the MAX98090 CODEC */ + if (codec_link->num_codecs > 1) { + card->dai_link[0].dpcm_capture = 1; + card->dai_link[1].dpcm_capture = 1; + } - priv->sclk_i2s = of_clk_get_by_name(link->cpu_of_node, "i2s_opclk1"); + priv->sclk_i2s = of_clk_get_by_name(cpu_dai, "i2s_opclk1"); if (IS_ERR(priv->sclk_i2s)) { ret = PTR_ERR(priv->sclk_i2s); - goto err_put_i2s_n; + goto err_put_codec_n; } - priv->clk_i2s_bus = of_clk_get_by_name(link->cpu_of_node, "iis"); + priv->clk_i2s_bus = of_clk_get_by_name(cpu_dai, "iis"); if (IS_ERR(priv->clk_i2s_bus)) { ret = PTR_ERR(priv->clk_i2s_bus); goto err_put_sclk; } + of_node_put(cpu_dai); ret = devm_snd_soc_register_card(dev, card); if (ret < 0) { @@ -182,10 +244,8 @@ static int odroid_audio_probe(struct platform_device *pdev) clk_put(priv->clk_i2s_bus); err_put_sclk: clk_put(priv->sclk_i2s); -err_put_i2s_n: - of_node_put(link->cpu_of_node); err_put_codec_n: - snd_soc_of_put_dai_link_codecs(link); + snd_soc_of_put_dai_link_codecs(codec_link); return ret; } @@ -193,8 +253,7 @@ static int odroid_audio_remove(struct platform_device *pdev) { struct odroid_priv *priv = platform_get_drvdata(pdev); - of_node_put(priv->dai_link.cpu_of_node); - snd_soc_of_put_dai_link_codecs(&priv->dai_link); + snd_soc_of_put_dai_link_codecs(&priv->card.dai_link[1]); clk_put(priv->sclk_i2s); clk_put(priv->clk_i2s_bus); From patchwork Wed Feb 13 18:42:06 2019 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: 10810763 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A05A918A6 for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E8B02E06F for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CB792E0AE; Wed, 13 Feb 2019 19:01:26 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 A54912E09B for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C1B57267A00; Wed, 13 Feb 2019 19:43:34 +0100 (CET) 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 34F172679E8; Wed, 13 Feb 2019 19:43:31 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id 2151E2679BC for ; Wed, 13 Feb 2019 19:43:20 +0100 (CET) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190213184319epoutp03e32581960008499db7d3156a3a43ccc1~DAKOngTjn1822418224epoutp031; Wed, 13 Feb 2019 18:43:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190213184319epoutp03e32581960008499db7d3156a3a43ccc1~DAKOngTjn1822418224epoutp031 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083399; bh=J6H+Vy/rMx02aXMq9DQh06tQn/cC6LHTpLKn919N9e0=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=be5bjhEjwiLLyKmxmbcQ+SPGrboJ9Nft/ilR7DLJmj0wJHvWpRukC7iEN8fku16Gv FlH/UhPmyMjm1/eaA3w6/D/SFIrLSOcGDOfVdL9jgYKBjFlQWYU/FpcWOQHo6/ue1/ EiSX+O+nc7rboMlvDF85jAodxeOtoU4I4MaESDD8= Received: from epsmges2p2.samsung.com (unknown [182.195.42.70]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20190213184318epcas2p3dcd3e96f45bd21a9d1bb51b035d09ba9~DAKNl25KJ2560825608epcas2p3Y; Wed, 13 Feb 2019 18:43:18 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 01.6C.04136.645646C5; Thu, 14 Feb 2019 03:43:18 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20190213184317epcas2p17fc18ee2ac4b92a7d1690c56e36739d6~DAKMlbSRR1584015840epcas2p1f; Wed, 13 Feb 2019 18:43:17 +0000 (GMT) X-AuditID: b6c32a46-2a7ff70000001028-bd-5c646546a269 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 67.ED.03689.545646C5; Thu, 14 Feb 2019 03:43:17 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:43:17 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:06 +0100 Message-id: <20190213184212.5473-8-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLIsWRmVeSWpSXmKPExsWy7bCmqa5bakqMwYK9MhZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6MXcdmsRS0ylRcONrB2MC4T7yLkZND QsBEov/NBqYuRi4OIYEdjBI7Th5mhXC+M0qsW/eVGabq4qI2qMQGRom396awQDi/GCUeXuhk A6liEzCU6D3axwhiiwiISdye08kMUsQs0MIkMWfuUrBRwgJxEk8OvQKzWQRUJT4vuQpm8wpY SRzpfgW1Tl5i9YYDYDangLXEv7XP2UEGSQgsYJN4Mn8NG0SRi8Tm3bPZIWxpiWerNjJC2NUS u7Z3M0M0dDBKtFzYDjXVWuLw8YusIDazAJ9Ex+G/QM0cQHFeiY42IYgSD4n3h85C/dnHKNHd tJRxAqPEAkaGVYxiqQXFuempxUYFRnrFibnFpXnpesn5uZsYwZGo5baDcck5n0OMAhyMSjy8 FUIpMUKsiWXFlbmHGCU4mJVEePWigEK8KYmVValF+fFFpTmpxYcYpTlYlMR5H0rPjRYSSE8s Sc1OTS1ILYLJMnFwSjUw9sUmN52qOchjGbFM3s1AV5O9y2cNn2hhlo50WcOFJTO4A///uLM1 KfSvm5bRcmvRomtKR6fGmNasNbKaOstkdgrDCR8r/y3qK9zXJLy4teR18SL1tXGZTv4GX+ed u7Sj4Jdo+MR/1hZ3fQ+tCpip8qK/9XRjkFK9+V73o9d2MrPk6m4q/tekxFKckWioxVxUnAgA BPMis8ACAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDLMWRmVeSWpSXmKPExsVy+t9jQV3X1JQYg0nXxCyuXDzEZLFxxnpW i6kPn7BZnD+/gd3i25UOJovLu+awWcw4v4/JYu2Ru+wWh9+0s1pcXPGFyYHLY8PnJjaPnbPu sntsWtXJ5tG3ZRWjx+dNcgGsUVw2Kak5mWWpRfp2CVwZu47NYilolam4cLSDsYFxn3gXIyeH hICJxMVFbaxdjFwcQgLrGCUar19lg3B+MUpsv3SWBaSKTcBQovdoHyOILSIgJnF7TiczSBGz QBOTxK7bF9lBEsICcRJPDr1iBrFZBFQlPi+5CmbzClhJHOmGiEsIyEus3nAAzOYUsJb4t/Y5 WK8QUM3ED5eYJzDyLGBkWMUomVpQnJueW2xUYJSXWq5XnJhbXJqXrpecn7uJERhm2w5r9e9g fLwk/hCjAAejEg9vhVBKjBBrYllxZe4hRgkOZiURXr0ooBBvSmJlVWpRfnxRaU5q8SFGaQ4W JXFe/vxjkUIC6YklqdmpqQWpRTBZJg5OqQbGI7xKvZEnjW6mSyRmi5yaJh31nMFWru+MOYN3 NtsC/5fZzLcE6x9Pe5JlGf/01sW3e4X5BEUUEx1Fehi2TAvtjfPWb1r+nT/K8n2S2EqVI3xX xHiUgy/NlOLi7hL7lB1+d8+bI5s/XZe/qJoavII7Mdrh1dFLs1dOvnPKb1WPVBrPVdl5Sw2V WIozEg21mIuKEwGbUFgZLwIAAA== X-CMS-MailID: 20190213184317epcas2p17fc18ee2ac4b92a7d1690c56e36739d6 CMS-TYPE: 102P X-CMS-RootMailID: 20190213184317epcas2p17fc18ee2ac4b92a7d1690c56e36739d6 References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 07/13] ASoC: samsung: Specify DMA channel names through custom DMA config 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 This is a part of conversion of Samsung platforms to use the custom DMA config for specifying DMA channel names, in addition to passing custom DMA device for the secondary CPU DAI's "PCM" component for some variants of the I2S controller. We also don't set the SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME any more as setting it wouldn't allow to specify DMA channels through the custom DMA config. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/dmaengine.c | 12 ++++-------- sound/soc/samsung/i2s.c | 2 +- sound/soc/samsung/s3c2412-i2s.c | 2 +- sound/soc/samsung/s3c24xx-i2s.c | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/sound/soc/samsung/dmaengine.c b/sound/soc/samsung/dmaengine.c index 84601fa9aa46..302871974cb3 100644 --- a/sound/soc/samsung/dmaengine.c +++ b/sound/soc/samsung/dmaengine.c @@ -28,7 +28,6 @@ int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter, const char *tx, const char *rx, struct device *dma_dev) { - unsigned int flags = SND_DMAENGINE_PCM_FLAG_COMPAT; struct snd_dmaengine_pcm_config *pcm_conf; pcm_conf = devm_kzalloc(dev, sizeof(*pcm_conf), GFP_KERNEL); @@ -39,14 +38,11 @@ int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter, pcm_conf->compat_filter_fn = filter; pcm_conf->dma_dev = dma_dev; - 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); + return devm_snd_dmaengine_pcm_register(dev, pcm_conf, + SND_DMAENGINE_PCM_FLAG_COMPAT); } EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_register); diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 692a752b194c..6ab99e38e6dd 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1460,7 +1460,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) pri_dai->drv->playback.channels_max = 6; ret = samsung_asoc_dma_platform_register(&pdev->dev, pri_dai->filter, - NULL, NULL, NULL); + "tx", "rx", NULL); if (ret < 0) goto err_disable_clk; diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 67dfa27ae321..c08638b0e458 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -177,7 +177,7 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev) ret = samsung_asoc_dma_platform_register(&pdev->dev, pdata->dma_filter, - NULL, NULL, NULL); + "tx", "rx", NULL); if (ret) { pr_err("failed to register the DMA: %d\n", ret); return ret; diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index ba0f2b94f8d4..a8026b640c95 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -446,7 +446,7 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev) s3c24xx_i2s_pcm_stereo_in.addr = res->start + S3C2410_IISFIFO; ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL, - NULL, NULL, NULL); + "tx", "rx", NULL); if (ret) { dev_err(&pdev->dev, "Failed to register the DMA: %d\n", ret); return ret; From patchwork Wed Feb 13 18:42:07 2019 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: 10810755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE63F922 for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D80502E066 for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC57A2E091; Wed, 13 Feb 2019 19:01:25 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 43E8C2E06F for ; Wed, 13 Feb 2019 19:01:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5B0632679C6; Wed, 13 Feb 2019 19:43:39 +0100 (CET) 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 EFB3C267A0E; Wed, 13 Feb 2019 19:43:36 +0100 (CET) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by alsa0.perex.cz (Postfix) with ESMTP id 165322679D4 for ; Wed, 13 Feb 2019 19:43:24 +0100 (CET) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190213184323epoutp0261692bcb82039bcf119d1fbc9b267417~DAKRwwHET0221502215epoutp02G; Wed, 13 Feb 2019 18:43:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190213184323epoutp0261692bcb82039bcf119d1fbc9b267417~DAKRwwHET0221502215epoutp02G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083403; bh=4r9BDhjJdgjV+qJedBadvh8+VBJ5DIXEhHxwe0CLdFI=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=Tnmn7q1fOMCaO1m+IdwndYcdVVFrqv7M14HKMRY+jahzYLS7sxqfBlN05iJHAAEwM enGBYiscBikYsQGX3zH1AuPygLlM4nSY/dJhwwduDkNoOtWakjWzpAn6KKFV+5ZC+F m89IrDMgZ7kUavv9md6wgcDEdmXVolQmRXkZjUCc= Received: from epsmges2p2.samsung.com (unknown [182.195.42.70]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20190213184322epcas2p133f934a95bfcfab269d7217d0cf46631~DAKQ8Q2OV1584015840epcas2p1g; Wed, 13 Feb 2019 18:43:22 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id B1.6C.04136.A45646C5; Thu, 14 Feb 2019 03:43:22 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190213184320epcas2p2d54cbd017c6c666239a4d6f8d78cf620~DAKP2G_HO2268322683epcas2p2i; Wed, 13 Feb 2019 18:43:20 +0000 (GMT) X-AuditID: b6c32a46-2bfff70000001028-c2-5c64654a583e Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 18.ED.03689.845646C5; Thu, 14 Feb 2019 03:43:20 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:43:20 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:07 +0100 Message-id: <20190213184212.5473-9-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWy7bCmma5XakqMwdy1rBZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6Mrv9BBWuEKlZO6mNuYNzM38XIySEh YCLRNX0HcxcjF4eQwA5GiVfXrrJBON8ZJea3XmCCqVp88hUjiC0ksIFR4vSSRAj7F6PE0eMS IDabgKFE79E+sBoRATGJ23M6waYyC7QwScyZu5QZJCEsECRx+9krVhCbRUBVomHlHbAFvAJW EpNPzGKBWCYvsXrDAbB6TgFriX9rn7ODDJIQWMAmsWD/LHaIIheJOdd3skLY0hLPVm1khLCr JXZt72aGaOhglGi5sJ0ZImEtcfj4RbAGZgE+iY7Df4EGcQDFeSU62oQgSjwkJs0/xgLxfh+j ROejXqYJjBILGBlWMYqlFhTnpqcWGxUY6RUn5haX5qXrJefnbmIEx6CW2w7GJed8DjEKcDAq 8fBWCKXECLEmlhVX5h5ilOBgVhLh1YsCCvGmJFZWpRblxxeV5qQWH2KU5mBREud9KD03Wkgg PbEkNTs1tSC1CCbLxMEp1cA46XeloK6P1/OEVG+BIDMzU57ipYE3nSe4rjrnpHvVaUt/3n1u n2LvU0rsV7Ntjy7tWKG/5YBiybNM4Ynn3a4aeakx+5840HLQXK4/ZfdDVd+Fx5cvFnvO/OlM +K3DMaWcp7dfy9mqMW1P7wT3P0uPH1WoesR3obcy/N41tkPL06d+s049LJqqxFKckWioxVxU nAgABGg5sL0CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFLMWRmVeSWpSXmKPExsVy+t9jQV2P1JQYg71N5hZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6Mrv9BBWuEKlZO6mNuYNzM38XIySEh YCKx+OQrxi5GLg4hgXWMEpPPrmEBSQgJ/GKUmP00HMRmEzCU6D3axwhiiwiISdye08kM0sAs 0MQksev2RXaQhLBAgET76YlMIDaLgKpEw8o7YDavgJXE5BOzWCC2yUus3nCAGcTmFLCW+Lf2 OTvEMiuJiR8uMU9g5FnAyLCKUTK1oDg3PbfYqMAoL7Vcrzgxt7g0L10vOT93EyMwxLYd1urf wfh4SfwhRgEORiUe3gqhlBgh1sSy4srcQ4wSHMxKIrx6UUAh3pTEyqrUovz4otKc1OJDjNIc LErivPz5xyKFBNITS1KzU1MLUotgskwcnFINjBq8R+5d9HkcJWOeUnUm/ybDBf7AD+WVi1OS OH2NNgrcvbmWaapybG6o2Rnuh0ECLWZCyX02Vk3zPknmrDTdOLFB0Mdy1p7gp1wXF8gu9ff+ c1yCcd6nZWv3a9m9LBaauO2qtU31TdeKqy3+Fu1l1kt2m1yS+SizdvN9FbnHd1SMe++snvA+ SomlOCPRUIu5qDgRAJno4gctAgAA X-CMS-MailID: 20190213184320epcas2p2d54cbd017c6c666239a4d6f8d78cf620 CMS-TYPE: 102P X-CMS-RootMailID: 20190213184320epcas2p2d54cbd017c6c666239a4d6f8d78cf620 References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 08/13] ASoC: samsung: Drop DAI DMA data chan_name assignments 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 There is now no need to pass DMA channel names through the DAI DMA data, custom DMA config of the PCM is now used for this purpose. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/i2s.c | 4 ---- sound/soc/samsung/s3c2412-i2s.c | 2 -- sound/soc/samsung/s3c24xx-i2s.c | 2 -- 3 files changed, 8 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 6ab99e38e6dd..16e6868376f6 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1450,8 +1450,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->priv = priv; @@ -1466,9 +1464,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) if (quirks & QUIRK_SEC_DAI) { sec_dai = &priv->dai[SAMSUNG_I2S_ID_SECONDARY - 1]; - 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 c08638b0e458..a00e35147e50 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 a8026b640c95..600b3b4cdb5b 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -31,12 +31,10 @@ #include "s3c24xx-i2s.h" 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, }; From patchwork Wed Feb 13 18:42:08 2019 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: 10810765 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A93CE746 for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 983DB2E066 for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 832D62E09B; Wed, 13 Feb 2019 19:01:26 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 8F6562E08E for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CA1E92679DD; Wed, 13 Feb 2019 19:43:43 +0100 (CET) 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 0B7FC2679B3; Wed, 13 Feb 2019 19:43:42 +0100 (CET) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by alsa0.perex.cz (Postfix) with ESMTP id 9AA102679F2 for ; Wed, 13 Feb 2019 19:43:28 +0100 (CET) Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190213184327epoutp02ad4e79567203418c79b92fbb830f53bf~DAKVzyzMo0221402214epoutp02C; Wed, 13 Feb 2019 18:43:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190213184327epoutp02ad4e79567203418c79b92fbb830f53bf~DAKVzyzMo0221402214epoutp02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083407; bh=hE+X8z3qdk71D0LxrGPVgTUUa5zoHoXIy316WRLsK/k=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=f+qpv7ojGD9y1CFmBb2lDlSYWLzdxNF0ArwBMwUCMO8L7GFpzWguoaFzHSpwD2ejO j8oqtxoMHOGkTqUo0Pw/Djy82jvO5CkF5OfGh9rYJDBd7UeHCsUbM5tfSK+1o7yZ7t xwkIuqYcBdCIMY6KrI4wxsNEY1I9r5cL6hilbdbY= Received: from epsmges1p1.samsung.com (unknown [182.195.42.53]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20190213184326epcas1p21f62fb468c2b495a376e68ba00a526f5~DAKUojtNE2581225812epcas1p2E; Wed, 13 Feb 2019 18:43:26 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 41.20.04074.D45646C5; Thu, 14 Feb 2019 03:43:25 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190213184324epcas1p4d5d9d8896938f7a5230372381627340e~DAKTZY9ID0477004770epcas1p4E; Wed, 13 Feb 2019 18:43:24 +0000 (GMT) X-AuditID: b6c32a35-27fff70000000fea-09-5c64654dc30b Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 88.CE.04015.C45646C5; Thu, 14 Feb 2019 03:43:24 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:43:24 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:08 +0100 Message-id: <20190213184212.5473-10-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWy7bCmnq5vakqMwdtX5hZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6M1d/+MRU8k664+3ILWwPjVPEuRk4O CQETiWOnXrB3MXJxCAnsYJS4cXsGlPOdUWLx5xfMMFVXTy5ghEhsYJTY9G0ylPOLUeLJ0zdM IFVsAoYSvUf7GEFsEQExidtzOplBipgFWpgk5sxdCjZKWCBLYuHUA6wgNouAqsTOBfdZQGxe AWuJjqf/WSHWyUus3nAArJ4TKP5v7XN2iPgSNon3i7QgbBeJl+/uAC3mALKlJS4dtYUIV0vs 2t4NtldCoINRouXCdqgXrCUOH78INp9ZgE/i3dceVoheXomONiGIEg+JS0u/ga0SEuhjlPi+ MHYCo8QCRoZVjGKpBcW56anFhgWGesWJucWleel6yfm5mxjBMahluoNxyjmfQ4wCHIxKPLwV QikxQqyJZcWVuYcYJTiYlUR49aKAQrwpiZVVqUX58UWlOanFhxilOViUxHnXOzjHCAmkJ5ak ZqemFqQWwWSZODilGhhVb+RkJneE9fhIXVZNEEvtlxPuUnnetOCzko+vXIbPPTH2BDY1F559 WvsktE249i265Ofe0/r+ZDzjtM9GO1lXZ1Rwrp3fd8jz8m69fgYP1/drQlTkLBZME9KSmBPn HVb9bpvKqUCZLzOWXn7b9Tsy0njN89sVp6PuqeWbnIx8vErLsKZnixJLcUaioRZzUXEiAIaV ja69AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNLMWRmVeSWpSXmKPExsVy+t9jQV2f1JQYg+lftSyuXDzEZLFxxnpW i6kPn7BZnD+/gd3i25UOJovLu+awWcw4v4/JYu2Ru+wWh9+0s1pcXPGFyYHLY8PnJjaPnbPu sntsWtXJ5tG3ZRWjx+dNcgGsUVw2Kak5mWWpRfp2CVwZq7/9Yyp4Jl1x9+UWtgbGqeJdjJwc EgImEldPLmDsYuTiEBJYxyixeOdKZpCEkMAvRonGJaIgNpuAoUTv0T5GEFtEQEzi9pxOZpAG ZoEmJoldty+ygySEBbIkFk49wApiswioSuxccJ8FxOYVsJboePqfFWKbvMTqDQfAFnACxf+t fc4OscxKYuKHS8wTGHkWMDKsYpRMLSjOTc8tNiowzEst1ytOzC0uzUvXS87P3cQIDLJth7X6 djDeXxJ/iFGAg1GJh1dBICVGiDWxrLgy9xCjBAezkgivXhRQiDclsbIqtSg/vqg0J7X4EKM0 B4uSOO/tvGORQgLpiSWp2ampBalFMFkmDk6pBkaH6ZKXK523+TDeXfEl/vrzMBEfHv7u8L+G sXv0n17eX7H/E4/g0b/CbrsY69fs/n+2untVLttKVb4l98+WdUe+6e2uy1n/TEh3+V3lpqgJ R17azy1cG6j2jXn6wc1RBwoex+bv0DBbd9U8QWDy6tJg5yiWnIJOb67Ew6tVyuw/q6xefC3h XZ8SS3FGoqEWc1FxIgCkJtIMLgIAAA== X-CMS-MailID: 20190213184324epcas1p4d5d9d8896938f7a5230372381627340e CMS-TYPE: 101P X-CMS-RootMailID: 20190213184324epcas1p4d5d9d8896938f7a5230372381627340e References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 09/13] ASoC: dmaengine: Remove unused SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag 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 There is now no users of this flag so remove it together with related data structure field. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- include/sound/dmaengine_pcm.h | 6 ------ sound/soc/soc-generic-dmaengine-pcm.c | 21 ++++----------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index 2c4cfaa135a6..764c787928a4 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h @@ -63,7 +63,6 @@ struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream) * @slave_id: Slave requester id for the DMA channel. * @filter_data: Custom DMA channel filter data, this will usually be used when * requesting the DMA channel. - * @chan_name: Custom channel name to use when requesting DMA channel. * @fifo_size: FIFO size of the DAI controller in bytes * @flags: PCM_DAI flags, only SND_DMAENGINE_PCM_DAI_FLAG_PACK for now */ @@ -73,7 +72,6 @@ struct snd_dmaengine_dai_dma_data { u32 maxburst; unsigned int slave_id; void *filter_data; - const char *chan_name; unsigned int fifo_size; unsigned int flags; }; @@ -99,10 +97,6 @@ void snd_dmaengine_pcm_set_config_from_dai_data( * playback. */ #define SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX BIT(3) -/* - * The PCM streams have custom channel names specified. - */ -#define SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME BIT(4) /** * struct snd_dmaengine_pcm_config - Configuration data for dmaengine based PCM diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 1b44e363c50c..f1ab6285a085 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -265,7 +265,6 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd) struct dmaengine_pcm *pcm = soc_component_to_pcm(component); const struct snd_dmaengine_pcm_config *config = pcm->config; struct device *dev = component->dev; - struct snd_dmaengine_dai_dma_data *dma_data; struct snd_pcm_substream *substream; size_t prealloc_buffer_size; size_t max_buffer_size; @@ -285,19 +284,9 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd) if (!substream) continue; - dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); - - if (!pcm->chan[i] && - ((pcm->flags & SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME) || - (config && config->chan_names[i]))) { - const char *chan_name = dma_data->chan_name; - - if (config && config->chan_names[i]) - chan_name = config->chan_names[i]; - + if (!pcm->chan[i] && config && config->chan_names[i]) pcm->chan[i] = dma_request_slave_channel(dev, - chan_name); - } + config->chan_names[i]); if (!pcm->chan[i] && (pcm->flags & SND_DMAENGINE_PCM_FLAG_COMPAT)) { pcm->chan[i] = dmaengine_pcm_compat_request_channel(rtd, @@ -420,10 +409,8 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm, const char *name; struct dma_chan *chan; - if ((pcm->flags & (SND_DMAENGINE_PCM_FLAG_NO_DT | - SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME)) || - (!dev->of_node && !(config && config->dma_dev && - config->dma_dev->of_node))) + if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || (!dev->of_node && + !(config && config->dma_dev && config->dma_dev->of_node))) return 0; if (config && config->dma_dev) { From patchwork Wed Feb 13 18:42:10 2019 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: 10810757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B883188E for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 239EC2E066 for ; Wed, 13 Feb 2019 19:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17A432E06F; Wed, 13 Feb 2019 19:01:26 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 67ED92E07C for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 3C1CA267A08; Wed, 13 Feb 2019 19:43:58 +0100 (CET) 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 6CECB2679CF; Wed, 13 Feb 2019 19:43:56 +0100 (CET) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by alsa0.perex.cz (Postfix) with ESMTP id B9517267A08 for ; Wed, 13 Feb 2019 19:43:34 +0100 (CET) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190213184332epoutp02dc682acb2c1781825d18d832e4db1aff~DAKanzKIL0217602176epoutp02W; Wed, 13 Feb 2019 18:43:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190213184332epoutp02dc682acb2c1781825d18d832e4db1aff~DAKanzKIL0217602176epoutp02W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083412; bh=IfSSyIr9CaOn8GHvv9qjZ4tl/nS8IqPtKE/s5FiFoO8=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=FxMI4+H7jAmcf9RYUzs+jl6pZ0Q14DZ97g6aoQdvKWLMwgWq8Hr1EGbHCSeFu1gk7 3CTpXxY035F+GKDxAmGH8jUtOneP+WQt5/34reYOgmpXaT5Nfu0apPv6rrx8WmRuIi xUM5i2UJTz8IKwRFq0ZZrDHaUNL86vPdXbNQDhgo= Received: from epsmges1p2.samsung.com (unknown [182.195.42.54]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190213184332epcas1p3701958fe44241947184a2ad26bf0dc41~DAKaOTDAO0824508245epcas1p3W; Wed, 13 Feb 2019 18:43:32 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 78.B1.04173.355646C5; Thu, 14 Feb 2019 03:43:32 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20190213184331epcas1p1651b43c8fe68d537a4f39ddfa91a38b1~DAKaAjF7q0131801318epcas1p1T; Wed, 13 Feb 2019 18:43:31 +0000 (GMT) X-AuditID: b6c32a36-5c1ff7000000104d-48-5c64655332d8 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 59.CE.04015.355646C5; Thu, 14 Feb 2019 03:43:31 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:43:31 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:10 +0100 Message-id: <20190213184212.5473-12-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJIsWRmVeSWpSXmKPExsWy7bCmvm5IakqMwadIiysXDzFZbJyxntVi 6sMnbBbnz29gt/h2pYPJ4vKuOWwWM87vY7JYe+Quu8XhN+2sFhdXfGFy4PLY8LmJzWPnrLvs HptWdbJ59G1ZxejxeZNcAGsUl01Kak5mWWqRvl0CV0bPlZ1sBTvZKyavWsHUwLiUrYuRk0NC wERiy7MtrF2MXBxCAjsYJb4tu8QC4XxnlHj5cjkLTFXL7ulsEIkNjBKXZreAJYQEfjFKnP4c BGKzCRhK9B7tYwSxRQTEJG7P6WQGaWAWaGGSmDN3KTNIQlggUWJr004mEJtFQFWi+8oTdhCb V8BaYuWaRnaIbfISqzccAKvnBIr/W/ucHWSQhMACNon1zXOAmjmAHBeJP+8jIUxpiUtHbSFa qyV2be9mhijvYJRoubCdGSJhLXH4+EVWEJtZgE/i3dceVoheXomONiGIEg+JBz+6GSGe7GOU 2PZsGesERokFjAyrGMVSC4pz01OLDQuM9IoTc4tL89L1kvNzNzGCI1DLbAfjonM+hxgFOBiV eHgrhFJihFgTy4orcw8xSnAwK4nw6kUBhXhTEiurUovy44tKc1KLDzFKc7AoifOud3COERJI TyxJzU5NLUgtgskycXBKNTB2ewe87l9wf/mOJZOLc/59D3O1bp0/Ycq1jw/zI1mUH3JY7ZUI 7Jl7akLLrWmhf38Grln7SD1ySV7wVo6/HHFLpGp/zD6edU0/po9p5vvlaYee7bMvmPfzWkKO pnbm1evhRTc63/nezJlW8y3y8+Fb55u3zfkwa8U1t8kr6v4zX3x9wnKJysTkECWW4oxEQy3m ouJEAOsL+um8AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDLMWRmVeSWpSXmKPExsVy+t9jQd3g1JQYg2MfdC2uXDzEZLFxxnpW i6kPn7BZnD+/gd3i25UOJovLu+awWcw4v4/JYu2Ru+wWh9+0s1pcXPGFyYHLY8PnJjaPnbPu sntsWtXJ5tG3ZRWjx+dNcgGsUVw2Kak5mWWpRfp2CVwZPVd2shXsZK+YvGoFUwPjUrYuRk4O CQETiZbd04FsLg4hgXWMEv3/djFBOL8YJf5sPcUKUsUmYCjRe7SPEcQWERCTuD2nkxmkiFmg iUli1+2L7CAJYYFEia1NO5lAbBYBVYnuK0/A4rwC1hIr1zSyQ6yTl1i94QAziM0JFP+39jlY XEjASmLih0vMExh5FjAyrGKUTC0ozk3PLTYqMMxLLdcrTswtLs1L10vOz93ECAyzbYe1+nYw 3l8Sf4hRgINRiYdXQSAlRog1say4MvcQowQHs5IIr14UUIg3JbGyKrUoP76oNCe1+BCjNAeL kjjv7bxjkUIC6YklqdmpqQWpRTBZJg5OqQbGzpmVh/Zoy/H98I/I1lvLlnOGXzm1umqxS6zn b+bkxL+/mXtK+f0CJ55zjfO0fvM7KkVgp6QL212F5KjTPb4v4z/NvRUs6O8tFLz79m62aKGf bdxfQlZUtzafWj2xn/2QVvrU0BaeKNaL08Jnr9jWtN1X5hPDzvVWXyMczdnK57ELcn9Pr1Zi Kc5INNRiLipOBACw08ycLwIAAA== X-CMS-MailID: 20190213184331epcas1p1651b43c8fe68d537a4f39ddfa91a38b1 CMS-TYPE: 101P X-CMS-RootMailID: 20190213184331epcas1p1651b43c8fe68d537a4f39ddfa91a38b1 References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 11/13] ASoC: samsung: i2s: Change indentation in SAMSUNG_I2S_FMTS definition 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 Change indentation so this macro definition spans 2 rows, it looks more consistent with surrounding code. Signed-off-by: Sylwester Nawrocki --- sound/soc/samsung/i2s.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 4f15b6af8268..e0c151843f9e 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1150,9 +1150,8 @@ static const struct snd_soc_component_driver samsung_i2s_component = { .num_dapm_routes = ARRAY_SIZE(samsung_i2s_dapm_routes), }; -#define SAMSUNG_I2S_FMTS (SNDRV_PCM_FMTBIT_S8 | \ - SNDRV_PCM_FMTBIT_S16_LE | \ - SNDRV_PCM_FMTBIT_S24_LE) +#define SAMSUNG_I2S_FMTS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | \ + SNDRV_PCM_FMTBIT_S24_LE) static int i2s_alloc_dais(struct samsung_i2s_priv *priv, const struct samsung_i2s_dai_data *i2s_dai_data, From patchwork Wed Feb 13 18:42:11 2019 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: 10810775 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 83EDE1575 for ; Wed, 13 Feb 2019 19:01:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71D332E066 for ; Wed, 13 Feb 2019 19:01:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6621B2E068; Wed, 13 Feb 2019 19:01:27 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 7008D2E084 for ; Wed, 13 Feb 2019 19:01:25 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BD7B52679AF; Wed, 13 Feb 2019 19:44:05 +0100 (CET) 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 014EF2679F2; Wed, 13 Feb 2019 19:44:02 +0100 (CET) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by alsa0.perex.cz (Postfix) with ESMTP id D20772679AF for ; Wed, 13 Feb 2019 19:43:37 +0100 (CET) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20190213184336epoutp040a92a066cedd526065566831129aabf0~DAKeEXxwj2883528835epoutp04d; Wed, 13 Feb 2019 18:43:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20190213184336epoutp040a92a066cedd526065566831129aabf0~DAKeEXxwj2883528835epoutp04d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083416; bh=rxPbxHGZybOFRecRRk8y8hUn782hn33+8lzAUhhh5k8=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=KagVYGp7hBYz76VYRcyWi2yHByAwClYoqnE0bAcMArL7iBBSBdNTj4otW5jQe7SyR JtxEmPK4lCdu63VpxxzYBy4B/JSR0M/MQFUjeBt9yKEe6YLb2UJsM1zylS6xQx9u5E 0p7YP+Xb7kJHut/7UYzMyi5OnXVrDerBHKrB5HO0= Received: from epsmges1p4.samsung.com (unknown [182.195.42.56]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190213184335epcas1p35130f257f69a8581c1172c6cc348cf0f~DAKdu2pz_2300523005epcas1p3a; Wed, 13 Feb 2019 18:43:35 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 64.D9.04288.755646C5; Thu, 14 Feb 2019 03:43:35 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190213184335epcas1p4e8d7ef4cfb788dc882fa3678ad66bec4~DAKdRILPH2480424804epcas1p4Z; Wed, 13 Feb 2019 18:43:35 +0000 (GMT) X-AuditID: b6c32a38-bf7ff700000010c0-3a-5c646557136f Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 0A.CE.04015.755646C5; Thu, 14 Feb 2019 03:43:35 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:43:35 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:11 +0100 Message-id: <20190213184212.5473-13-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWy7bCmrm54akqMwYy/RhZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6M3XvOMRZ8kq24fs23gfGaeBcjJ4eE gInE/g0LmLsYuTiEBHYwStybMZcNwvnOKHGi5RULTNW2vVcYIRIbGCXeHGxlgXB+MUo0TbzM DFLFJmAo0Xu0jxHEFhEQk7g9pxNsLrNAC5PEnLlLgRwODmEBe4mjP2VAalgEVCW2TfsPVs8r YC2xZuM7Zoht8hKrNxwAszmB4v/WPmcHmSMhsIBN4saSDYwQRS4Sq07cYQOZKSEgLXHpqC1E uFpi1/ZuZoj6DkaJlgvboYZaSxw+fpEVxGYW4JN497WHFaKXV6KjTQiixEPi3oR1UI/1AX35 7RLbBEaJBYwMqxjFUguKc9NTiw0LTPSKE3OLS/PS9ZLzczcxgmNQy2IH455zPocYBTgYlXh4 K4RSYoRYE8uKK3MPMUpwMCuJ8OpFAYV4UxIrq1KL8uOLSnNSiw8xSnOwKInzrndwjhESSE8s Sc1OTS1ILYLJMnFwSjUwatWW9Vo1Lg/hsD401eH0Q5653V4NXnOepZlNk1s2XfvOq9MvGcx2 rWUMvdkQ/GlSYuGJWeacV049/1rNtziI2+bmBaP403cfBH+RFrzlVy3x40yZk97Cxwp/zfi3 2i9bJm93fv5+v1odqRObjW7ZHn9Z3q9SF3D6eUvPCwmxv7P83jt585+7rcRSnJFoqMVcVJwI AByPXcG9AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFLMWRmVeSWpSXmKPExsVy+t9jQd3w1JQYg7mPBS2uXDzEZLFxxnpW i6kPn7BZnD+/gd3i25UOJovLu+awWcw4v4/JYu2Ru+wWh9+0s1pcXPGFyYHLY8PnJjaPnbPu sntsWtXJ5tG3ZRWjx+dNcgGsUVw2Kak5mWWpRfp2CVwZu/ecYyz4JFtx/ZpvA+M18S5GTg4J AROJbXuvMHYxcnEICaxjlFj+4Rg7hPOLUeLZ5J8sIFVsAoYSvUf7GEFsEQExidtzOplBipgF mpgkdt2+CNTBwSEsYC9x9KcMSA2LgKrEtmn/wep5Bawl1mx8xwyxTV5i9YYDYDYnUPzf2ufs ILaQgJXExA+XmCcw8ixgZFjFKJlaUJybnltsVGCYl1quV5yYW1yal66XnJ+7iREYYtsOa/Xt YLy/JP4QowAHoxIPr4JASowQa2JZcWXuIUYJDmYlEV69KKAQb0piZVVqUX58UWlOavEhRmkO FiVx3tt5xyKFBNITS1KzU1MLUotgskwcnFINjJM9djw6dDNups8k7/mCVwyCWx4yyfzWvC/T /+Rs2aRCjygWxapZ+Yr/rq68IlGaXWFYJZzG9LhninGk4L6WG83nDD54O5/qZt5jsmQ5M1+a QdhRZqb5S5+beeden/Lq4pnVDWtOqeraahpeY39pm+h6nGvKwoa12/+0CL89mRpSfWyTwjqx /UosxRmJhlrMRcWJAIflGyEtAgAA X-CMS-MailID: 20190213184335epcas1p4e8d7ef4cfb788dc882fa3678ad66bec4 CMS-TYPE: 101P X-CMS-RootMailID: 20190213184335epcas1p4e8d7ef4cfb788dc882fa3678ad66bec4 References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 12/13] ASoC: samsung: i2s: Comments clean up 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 Spelling error fixes, upper/lower case letter changes. Signed-off-by: Sylwester Nawrocki --- sound/soc/samsung/i2s.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index e0c151843f9e..4f13b514d9ce 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1,5 +1,4 @@ -/* sound/soc/samsung/i2s.c - * +/* * ALSA SoC Audio Layer - Samsung I2S Controller driver * * Copyright (c) 2010 Samsung Electronics Co. Ltd. @@ -61,10 +60,10 @@ struct i2s_dai { /* Platform device for this DAI */ struct platform_device *pdev; - /* Frame Clock */ + /* Frame clock */ unsigned frmclk; /* - * Specifically requested RCLK,BCLK by MACHINE Driver. + * Specifically requested RCLK, BCLK by machine driver. * 0 indicates CPU driver is free to choose any value. */ unsigned rfs, bfs; @@ -72,8 +71,9 @@ struct i2s_dai { struct i2s_dai *pri_dai; /* Pointer to the Secondary_Fifo if it has one, NULL otherwise */ struct i2s_dai *sec_dai; -#define DAI_OPENED (1 << 0) /* Dai is opened */ -#define DAI_MANAGER (1 << 1) /* Dai is the manager */ + +#define DAI_OPENED (1 << 0) /* DAI is opened */ +#define DAI_MANAGER (1 << 1) /* DAI is the manager */ unsigned mode; /* Driver for this DAI */ @@ -98,7 +98,7 @@ struct samsung_i2s_priv { /* Spinlock protecting access to the device's registers */ spinlock_t lock; - /* Lock for cross i/f checks */ + /* Lock for cross interface checks */ spinlock_t pcm_lock; /* CPU DAIs and their corresponding drivers */ @@ -309,7 +309,7 @@ static inline void set_rfs(struct i2s_dai *i2s, unsigned rfs) writel(mod, priv->addr + I2SMOD); } -/* Read Bit-Clock of I2S (in multiples of LRCLK) */ +/* Read bit-clock of I2S (in multiples of LRCLK) */ static inline unsigned get_bfs(struct i2s_dai *i2s) { struct samsung_i2s_priv *priv = i2s->priv; @@ -331,7 +331,7 @@ static inline unsigned get_bfs(struct i2s_dai *i2s) } } -/* Write Bit-Clock of I2S (in multiples of LRCLK) */ +/* Write bit-clock of I2S (in multiples of LRCLK) */ static inline void set_bfs(struct i2s_dai *i2s, unsigned bfs) { struct samsung_i2s_priv *priv = i2s->priv; @@ -383,7 +383,7 @@ static inline void set_bfs(struct i2s_dai *i2s, unsigned bfs) writel(mod, priv->addr + I2SMOD); } -/* Sample-Size */ +/* Sample size */ static inline int get_blc(struct i2s_dai *i2s) { int blc = readl(i2s->priv->addr + I2SMOD); @@ -397,7 +397,7 @@ static inline int get_blc(struct i2s_dai *i2s) } } -/* TX Channel Control */ +/* TX channel control */ static void i2s_txctrl(struct i2s_dai *i2s, int on) { struct samsung_i2s_priv *priv = i2s->priv; @@ -742,7 +742,7 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, switch (params_channels(params)) { case 6: val |= MOD_DC2_EN; - /* fall through */ + /* Fall through */ case 4: val |= MOD_DC1_EN; break; @@ -821,7 +821,7 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, return 0; } -/* We set constraints on the substream acc to the version of I2S */ +/* We set constraints on the substream according to the version of I2S */ static int i2s_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { @@ -1056,7 +1056,8 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) pm_runtime_get_sync(dai->dev); - if (is_secondary(i2s)) { /* If this is probe on the secondary DAI */ + if (is_secondary(i2s)) { + /* If this is probe on the secondary DAI */ snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, NULL); } else { snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, From patchwork Wed Feb 13 18:42:12 2019 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: 10810773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 512E0188E for ; Wed, 13 Feb 2019 19:01:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F60B2E066 for ; Wed, 13 Feb 2019 19:01:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C2302E068; Wed, 13 Feb 2019 19:01:27 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 474EA2E074 for ; Wed, 13 Feb 2019 19:01:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 789D2267A19; Wed, 13 Feb 2019 19:44:10 +0100 (CET) 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 179802679F0; Wed, 13 Feb 2019 19:44:08 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id ED62E267A13 for ; Wed, 13 Feb 2019 19:43:42 +0100 (CET) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190213184340epoutp03d5229fe998b4db7188a3da61dbd265fc~DAKiKfMmy1818718187epoutp032; Wed, 13 Feb 2019 18:43:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190213184340epoutp03d5229fe998b4db7188a3da61dbd265fc~DAKiKfMmy1818718187epoutp032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550083420; bh=vxCSWIaDE4hI6Ma9KubXpekIN8D1ajLOf3n1WhvNJ24=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=bQNTDouU2EnCVoPiiJipPpRnD5A+LOtXyVa7Al3PVaDtjEYQ6EJECSSLDfUXwbZPZ 7KpSX4HVmXkCiw9BQ9q2aIIVToA7no3M1TWblWyJ/hh31OKjOHuBjPBp21XSAcUn82 +p0qXCMEJrSH4HFvceR1CBdKkWhuuICIEIaKrf4c= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20190213184339epcas2p3d0e75210c439814022c6e7a408e33bae~DAKhj2sGf0253402534epcas2p3_; Wed, 13 Feb 2019 18:43:39 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 1B.3E.04093.B55646C5; Thu, 14 Feb 2019 03:43:39 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20190213184338epcas2p4a0384a9160084df777c92dd5bf55f04a~DAKghPCYJ2631326313epcas2p4S; Wed, 13 Feb 2019 18:43:38 +0000 (GMT) X-AuditID: b6c32a48-173ff70000000ffd-74-5c64655b2726 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id B9.ED.03689.A55646C5; Thu, 14 Feb 2019 03:43:38 +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 <0PMV00HOONZ3WX60@mmp2.samsung.com>; Thu, 14 Feb 2019 03:43:38 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Wed, 13 Feb 2019 19:42:12 +0100 Message-id: <20190213184212.5473-14-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190213184212.5473-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsWy7bCmuW50akqMwaP9JhZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6ML42vmAsOc1Ss+XOcpYGxk72LkZND QsBEov/+CuYuRi4OIYEdjBLPblxkgnC+M0rc2neTtYuRA6zq551iiPgGRom/k44zg3QLCfxi lFiwUQTEZhMwlOg92scIYosIiEncntMJNpVZoIVJYs7cpWANwgLBEleedrOC2CwCqhIHZ04H i/MKWEt8nryEGeIkeYnVGw6A2ZxA8X9rn0OduoRNYtrRGAjbRWLlhR5GCFta4tmqjVB2tcSu 7d1giyUEOhglWi5shxpqLXH4+EWwxcwCfBIdh/+yQ3zGK9HRJgRR4iGx5d4lFogv+xglOk91 sk4A+o+RYRWjWGpBcW56arFRgYlecWJucWleul5yfu4mRnAMannsYDxwzucQowAHoxIPb4VQ SowQa2JZcWXuIUYJDmYlEV69KKAQb0piZVVqUX58UWlOavEhRmkOFiVx3ofSc6OFBNITS1Kz U1MLUotgskwcnFINjKfrqqbI/i984Lf1h2pLv7Iaa4tRqOpz46xnU7edF9IzuV3apJZW11y3 3mpThLreXV+Fz+lLJP49P/rccHvJv3/GHpfY4553/F4omyA6xfundtvDOrswm7xYj/IaMbfs yl1WYQduF2T35s2Vualn+G5h4n3JrsLCBgcjX6HL+YKz28QvH/2jxFKckWioxVxUnAgAS6Ya n70CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNLMWRmVeSWpSXmKPExsVy+t9jQd2o1JQYg74JRhZXLh5istg4Yz2r xdSHT9gszp/fwG7x7UoHk8XlXXPYLGac38dksfbIXXaLw2/aWS0urvjC5MDlseFzE5vHzll3 2T02repk8+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6ML42vmAsOc1Ss+XOcpYGxk72LkYND QsBE4ued4i5GLg4hgXWMEq/vnmKEcH4xStzc/w+oiJODTcBQovdoHyOILSIgJnF7TiczSBGz QBOTxK7bF8GKhAWCJa487WYFsVkEVCUOzpzODGLzClhLfJ68BMyWEJCXWL3hAJjNCRT/t/Y5 WK+QgJXExA+XmCcw8ixgZFjFKJlaUJybnltsVGCUl1quV5yYW1yal66XnJ+7iREYZNsOa/Xv YHy8JP4QowAHoxIPb4VQSowQa2JZcWXuIUYJDmYlEV69KKAQb0piZVVqUX58UWlOavEhRmkO FiVxXv78Y5FCAumJJanZqakFqUUwWSYOTqkGxmMCoRN4PKcKZp8VeDUlpI/v+6tfP/55dx5y 3HT7Mm93p5tdV5VLef3kxWE5ctyv9aP3uX89rnXLoffCloVpG/xP7olNVeRPUSurydm36XLT +xPn2/+a14pemVPo/zl9Zpx62ofah1dsjnpP15Vb9qrwzcTmXd9P7Zl15pugI/fNO3dYJ6gV aSixFGckGmoxFxUnAgDI0fJDLgIAAA== X-CMS-MailID: 20190213184338epcas2p4a0384a9160084df777c92dd5bf55f04a CMS-TYPE: 102P X-CMS-RootMailID: 20190213184338epcas2p4a0384a9160084df777c92dd5bf55f04a References: <20190213184212.5473-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH v3 13/13] ASoC: samsung: i2s: Convert to SPDX License Indentifier 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 Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki --- sound/soc/samsung/i2s.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 4f13b514d9ce..5ffeb0129712 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1,13 +1,9 @@ -/* - * ALSA SoC Audio Layer - Samsung I2S Controller driver - * - * Copyright (c) 2010 Samsung Electronics Co. Ltd. - * Jaswinder Singh - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ +// SPDX-License-Identifier: GPL-2.0 +// +// ALSA SoC Audio Layer - Samsung I2S Controller driver +// +// Copyright (c) 2010 Samsung Electronics Co. Ltd. +// Jaswinder Singh #include #include