From patchwork Thu Feb 14 09:37:35 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: 10812559 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 24D31188E for ; Thu, 14 Feb 2019 12:06:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DF472DBA7 for ; Thu, 14 Feb 2019 12:06:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 012212DBB9; Thu, 14 Feb 2019 12:06: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=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 F0C212DBA7 for ; Thu, 14 Feb 2019 12:06:23 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 59F292679E8; Thu, 14 Feb 2019 10:38: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 AD5A12679D8; Thu, 14 Feb 2019 10:38:31 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id 4B32B2679CF for ; Thu, 14 Feb 2019 10:38:29 +0100 (CET) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190214093826epoutp03e4a508eebb0ef4652a312bde51523b7a~DMXxX9ieU0840508405epoutp03I; Thu, 14 Feb 2019 09:38:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190214093826epoutp03e4a508eebb0ef4652a312bde51523b7a~DMXxX9ieU0840508405epoutp03I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137106; bh=UyhfJTbo6SaxmfkXHyy33sPK1/ZKpe2+WV/TfxZKw30=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=HcC90KAWyjA8N8UAR25x+MvLE2qMfLQOR/bq2aSsY3JTYHuINICMi13dn+RD+VDlG Hsx0ConZX1+3+ssxP24LE//Jy+MtshcOHLp7kaX+bcOJbzApH8MZWkXvG/AlPgwv3P s2HvoQZ9kf5hmwW3CjYZ75KBZjK5WOu7dYKvdltE= Received: from epsmges1p4.samsung.com (unknown [182.195.42.56]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20190214093826epcas1p1dea33f9450d4cdd089db78488c9cf003~DMXw6hzX70748207482epcas1p1M; Thu, 14 Feb 2019 09:38:26 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 83.14.04288.217356C5; Thu, 14 Feb 2019 18:38:26 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20190214093825epcas1p24af57e964af261c979af4d4cbffcfa6c~DMXwP_dV_2981729817epcas1p2K; Thu, 14 Feb 2019 09:38:25 +0000 (GMT) X-AuditID: b6c32a38-bf7ff700000010c0-6d-5c6537122c9b Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 89.F3.04015.117356C5; Thu, 14 Feb 2019 18:38:25 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:25 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:35 +0100 Message-id: <20190214093747.2414-2-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJIsWRmVeSWpSXmKPExsWy7bCmnq6QeWqMwYXDghZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8b15SIFmzMrLl06z9bA+Dq0i5GTQ0LAROLm4h6mLkYuDiGBHYwS L1ouMUM43xklDq+5xwhTtW79PBYQW0hgA6PE+lepEEW/GCX2TlnCBJJgEzCU6D3aB9YgIiAm cXtOJ9gkZoGVjBJb9m1iA0kIC6RL/N/xDaiIg4NFQFVi5yQlkDCvgJXEvovL2CCWyUus3nCA GcTmFLCWmLlpO9QRPWwSS3cVQdguEm/fgYzkALKlJS4dtYUIV0vs2t4NtlZCoINRouXCdmaI hLXE4eMXWUFsZgE+iXdfe1ghenklOtqEIEo8JDb9us4C8Vcfo8TmCQuZJjBKLGBkWMUollpQ nJueWmxYYKJXnJhbXJqXrpecn7uJERxhWhY7GPec8znEKMDBqMTDWyGUEiPEmlhWXJl7iFGC g1lJhPeiUWqMEG9KYmVValF+fFFpTmrxIUZpDhYlcd71Ds4xQgLpiSWp2ampBalFMFkmDk6p BsbtAobFe98s+vNIq75q6eSCh7t4djFfZ9HkF1WJeHHVOm6TteGnvf0+Ue5vZq19UPgncsYq jYr/LgEH++bKzPqTa2dkF8y87f57G6UdutlLaxiSJj70r1Hv/lf0yOJ9v7dtasbbsK+OzXef BajwpPeUBX+LmnZL8an8Yt1+jb5OefazbgYVi5VYijMSDbWYi4oTASuAPFGsAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupiluLIzCtJLcpLzFFi42I5/e+xoK6geWqMwfEVahZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8b15SIFmzMrLl06z9bA+Dq0i5GTQ0LARGLd+nksXYxcHEIC6xgl Lu3rY4dwfjFKPNzTxwRSxSZgKNF7tI8RxBYREJO4PaeTGaSIWWAlo8SR76vAEsIC6RJ/et8A JTg4WARUJXZOUgIJ8wpYSey7uIwNYpu8xOoNB5hBbE4Ba4mZm7YzgpQLAdWsO1Q+gZFnASPD KkbJ1ILi3PTcYqMCw7zUcr3ixNzi0rx0veT83E2MwBDadlirbwfj/SXxhxgFOBiVeHgVBFJi hFgTy4orcw8xSnAwK4nwXjRKjRHiTUmsrEotyo8vKs1JLT7EKM3BoiTOezvvWKSQQHpiSWp2 ampBahFMlomDU6qBkS+O56z2imUXXmx3YmGPulu5KTp+0z3/HofCdq9vJ1P3v8jXfi2ofOEU J4fei9Mserq63AfbxX0FY9x8ErOPThHRWfBi3WW2ZZ6iQqK3hPe4v1txr8/wZNgtFddHanxv dx9f3dYcW/zy6s+Su7knNXbraEgcbS5ZHlpkkJv5qSGJn4utMTNHiaU4I9FQi7moOBEAVski 5R0CAAA= X-CMS-MailID: 20190214093825epcas1p24af57e964af261c979af4d4cbffcfa6c CMS-TYPE: 101P X-CMS-RootMailID: 20190214093825epcas1p24af57e964af261c979af4d4cbffcfa6c References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Thu Feb 14 09:37:36 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: 10812245 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 8F77E13B4 for ; Thu, 14 Feb 2019 09:56:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A27028703 for ; Thu, 14 Feb 2019 09:56:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E6BF29416; Thu, 14 Feb 2019 09:56:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-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 E19422940E for ; Thu, 14 Feb 2019 09:56:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1EFEB2679F0; Thu, 14 Feb 2019 10:38:36 +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 CF5642679E8; Thu, 14 Feb 2019 10:38:33 +0100 (CET) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by alsa0.perex.cz (Postfix) with ESMTP id 4D76A267482 for ; Thu, 14 Feb 2019 10:38:31 +0100 (CET) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20190214093829epoutp040e692b47ca725f96d90f2d1a61a8d1b7~DMXznjF-41377113771epoutp04F; Thu, 14 Feb 2019 09:38:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20190214093829epoutp040e692b47ca725f96d90f2d1a61a8d1b7~DMXznjF-41377113771epoutp04F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137109; bh=g26M3vvo7rFQlqLQajT+REpGD/4KuQLx8Lv9IuQdqVM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=PhmHorRLbw+0631Nl5sVIz5aP/UzcaH8DDxex/efLHG2Jc8aN4FCuqgTRtQLwQI5k 3Y42wUMx3YCCL0wUbLCFAAPzO9kyEbEGWNtRAowpl+wSTRy3f5v0l8SN/E2H3zVw8B y/roNpkWjVTjSFywLa1wN3DIbczDd3zk3esfz85w= Received: from epsmges2p3.samsung.com (unknown [182.195.42.71]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20190214093829epcas2p34d2123e7b1e7d5600a591112e15c7c15~DMXzZ421X2153321533epcas2p32; Thu, 14 Feb 2019 09:38:29 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id C4.FC.04134.417356C5; Thu, 14 Feb 2019 18:38:29 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20190214093828epcas2p444b9d819fefb0eb730a716589a00218b~DMXy333hr1746217462epcas2p4K; Thu, 14 Feb 2019 09:38:28 +0000 (GMT) X-AuditID: b6c32a47-8abff70000001026-43-5c6537147b88 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 9B.52.03689.417356C5; Thu, 14 Feb 2019 18:38:28 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:28 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:36 +0100 Message-id: <20190214093747.2414-3-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsWy7bCmha6oeWqMwdtpjBZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8bKL2cYC7ZbVbT/W8fSwDjfoIuRk0NCwETi7ZefjCC2kMAORok/ /wq6GLmA7O+MErNePmCCKdo2YS0jRGIDo0Rb23V2COcXo8Tj57vAqtgEDCV6j/aBjRIREJO4 PaeTGaSIWWAlo8SWfZvYQBLCAhkSzz/vAWtgEVCVaJ85F6yBV8BK4tedg1Dr5CVWbzjADGJz ClhLzNy0HWy1hEAPm8SV/1eZIYpcJM69WcQKYUtLPFu1kRHCrpbYtb2bGaKhg1Gi5cJ2qAZr icPHL4I1MAvwSXQc/gv0AwdQnFeio00IwvSQePksHOKzPkaJ3yvvM05glFjAyLCKUSy1oDg3 PbXYqMBYrzgxt7g0L10vOT93EyM4zrTcdzBuO+dziFGAg1GJh7dCKCVGiDWxrLgy9xCjBAez kgjvRaPUGCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8D6XnRgsJpCeWpGanphakFsFkmTg4pRoY c2OO+TvU/bwR/Tq+6r/ekq1T/V/Vvr/ptr9opvUP5v9lulvemhw80ZeuGP5TVnXla6vTqfM7 XNILEqfKXIoXLPJ9lXB23uqN/EHRDezKBRo6BjNP2d88tnLC8ulPbE/HH7FdV6pWxpZvMy/q PNdWvYdpqVdLHDJvzr6ttdZry+E9Ah+vV6z9psRSnJFoqMVcVJwIALpr0WKvAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmluLIzCtJLcpLzFFi42I5/e+xoK6IeWqMwZ3dYhZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8bKL2cYC7ZbVbT/W8fSwDjfoIuRk0NCwERi24S1jF2MXBxCAusY Jfa9XMAM4fxilDi/tYUFpIpNwFCi92gfI4gtIiAmcXtOJ1gRs8BKRokj31cBJTg4hAUyJPbc TgapYRFQlWifOResnlfASuLXnYNMENvkJVZvOMAMYnMKWEvM3LQdrFUIqGbdofIJjDwLGBlW MUqmFhTnpucWGxUY5aWW6xUn5haX5qXrJefnbmIEBtG2w1r9OxgfL4k/xCjAwajEw1shlBIj xJpYVlyZe4hRgoNZSYT3olFqjBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXFe/vxjkUIC6Yklqdmp qQWpRTBZJg5OqQbG6vxMDuHVX8/rJDCufcaya9WpRLGQ//HrHqixcnps6Xv6596paXY6Xuq7 zkaWTYraY3yzL5jbs3vaKuVrTrPXnE3SPP+BWcVLQSfqd/yxzOmhO299/P7MQmmFxtqMwuVz Oz8GbelfvlPJ7raYfwXL1stPlpd4R5e8ttS8UJQ00d7hjmay2I0dSizFGYmGWsxFxYkAsU7K NB4CAAA= X-CMS-MailID: 20190214093828epcas2p444b9d819fefb0eb730a716589a00218b CMS-TYPE: 102P X-CMS-RootMailID: 20190214093828epcas2p444b9d819fefb0eb730a716589a00218b References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Thu Feb 14 09:37:37 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: 10812247 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 F3814746 for ; Thu, 14 Feb 2019 09:56:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0241292EE for ; Thu, 14 Feb 2019 09:56:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4D4229417; Thu, 14 Feb 2019 09:56:45 +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 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 F18712943D for ; Thu, 14 Feb 2019 09:56:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 14593267A14; Thu, 14 Feb 2019 10:38:40 +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 5190B2679F4; Thu, 14 Feb 2019 10:38:35 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id 4F28D2679E6 for ; Thu, 14 Feb 2019 10:38:33 +0100 (CET) Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190214093831epoutp03aa7d99acdd89ee30019ba56bc2b3837c~DMX1-cgn40834508345epoutp03T; Thu, 14 Feb 2019 09:38:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190214093831epoutp03aa7d99acdd89ee30019ba56bc2b3837c~DMX1-cgn40834508345epoutp03T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137111; bh=ksBuew1Xn57azxYCc3VjsmJS9DByah38YvNWRM7BLGs=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=RuKz0EPLGtdVKG9Xzb0FbuCzAmNheCK6C4pz+vko5N+C1ycXSg21Fc4jI1bgsge1h i7VSMC5f1NxZ0m8z0unAsRTfvuaE6w9KEuxPL9UmNCvm0jqMH0zM9hwpSvpraNnQi6 WPw0Vz6N2frUW0XRFrHiBFf45XJTHxxajG1QG2Xw= Received: from epsmges1p4.samsung.com (unknown [182.195.42.56]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20190214093831epcas1p1e948fc50b9af6bd621dc3e13b67dceff~DMX1xT7IL1434214342epcas1p1W; Thu, 14 Feb 2019 09:38:31 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id E6.14.04288.717356C5; Thu, 14 Feb 2019 18:38:31 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20190214093831epcas1p2a42c5b95424a251e7ae38dd21c1a4696~DMX1YBA9l2983229832epcas1p2L; Thu, 14 Feb 2019 09:38:31 +0000 (GMT) X-AuditID: b6c32a38-c0fff700000010c0-7a-5c653717c251 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 0A.F3.04015.617356C5; Thu, 14 Feb 2019 18:38: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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:30 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:37 +0100 Message-id: <20190214093747.2414-4-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsWy7bCmvq64eWqMQf8KOYsrFw8xWUx9+ITN 4vz5DewW3650MFlc3jWHzeLwm3ZWi4srvjA5sHts+NzE5rFz1l12j02rOtk8+rasYvT4vEku gDWKyyYlNSezLLVI3y6BK+PDh7UsBS/NKpYuvsfewDhJt4uRk0NCwETiW/Mq1i5GLg4hgR2M EtM2tLNAON8ZJe5deMoEU3X4+QM2iMQGRom5/+cyQji/GCWWbNzFCFLFJmAo0Xu0D8wWERCT uD2nkxmkiFlgJaPEln2b2EASwgLZEh8uz2MGsVkEVCVu3/wE1MDBwStgJXFvSQrENnmJ1RsO gJVwClhLzNy0HWyZhEAPm8TxDe1QJ7lILN//mxmkV0JAWuLSUVuIcLXEru3dzBD1HYwSLRe2 M0MkrCUOH7/ICmIzC/BJvPvawwrRyyvR0SYEUeIh8bP9CDvEY32MEg+vrGSewCixgJFhFaNY akFxbnpqsWGBiV5xYm5xaV66XnJ+7iZGcJxpWexg3HPO5xCjAAejEg9vhVBKjBBrYllxZe4h RgkOZiUR3otGqTFCvCmJlVWpRfnxRaU5qcWHGKU5WJTEedc7OMcICaQnlqRmp6YWpBbBZJk4 OKUaGPNWS3ctMnbrDBMOdezr+GD9rz0mQeJqz+62uMnT9gZlnjs+YU7oir2KkwzW3o/WvV3Q 0bDmZLuMkfrF4vP/bxuc/Ngq8HNew9/WaSvVvR+y7LsfvOhN00neD5+84t4ceHrr96GKWYa2 1Zx+bi/Onv+0mI91yt4HDB/dvk7IMznqx7jxqNqNCR5KLMUZiYZazEXFiQDy6sW6rwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmluLIzCtJLcpLzFFi42I5/e+xoK64eWqMwecTbBZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8aHD2tZCl6aVSxdfI+9gXGSbhcjJ4eEgInE4ecP2LoYuTiEBNYx Smzqvc4O4fxilLj07wgbSBWbgKFE79E+RhBbREBM4vacTmaQImaBlYwSR76vAksIC2RLfLg8 jxnEZhFQlbh98xNQnIODV8BK4t6SFIht8hKrNxwAK+EUsJaYuWk7WIkQUMm6Q+UTGHkWMDKs YpRMLSjOTc8tNiowzEst1ytOzC0uzUvXS87P3cQIDKJth7X6djDeXxJ/iFGAg1GJh1dBICVG iDWxrLgy9xCjBAezkgjvRaPUGCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8t/OORQoJpCeWpGan phakFsFkmTg4pRoYt04ra5W6tOXzlgs97tMzJ7qod5nKeLWen5dzrTT42/0QI/YGjts3UtIt Voiys8bv+qv3fNP+n8f579+9c7N4/Y3utBcn/11VnMitEvqQ93GNxffdho3OzopzdZXmLDb0 32h90W66rVMZz7wkv0OHV2ibPOBnWnvt5SHbnbs9765y3DD7ovZTIyWW4oxEQy3mouJEAJMr JmweAgAA X-CMS-MailID: 20190214093831epcas1p2a42c5b95424a251e7ae38dd21c1a4696 CMS-TYPE: 101P X-CMS-RootMailID: 20190214093831epcas1p2a42c5b95424a251e7ae38dd21c1a4696 References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Thu Feb 14 09:37:38 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: 10812237 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 6663D13B4 for ; Thu, 14 Feb 2019 09:56:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5594D28703 for ; Thu, 14 Feb 2019 09:56:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49FFE294E4; Thu, 14 Feb 2019 09:56:32 +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 D55AC28797 for ; Thu, 14 Feb 2019 09:56:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A970B267A05; Thu, 14 Feb 2019 10:38:42 +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 72D51267482; Thu, 14 Feb 2019 10:38:40 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id 95539267482 for ; Thu, 14 Feb 2019 10:38:36 +0100 (CET) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190214093835epoutp03c0a9a8899b3fd73ba1ca1a426da675ae~DMX4-wrq_0840808408epoutp03P; Thu, 14 Feb 2019 09:38:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190214093835epoutp03c0a9a8899b3fd73ba1ca1a426da675ae~DMX4-wrq_0840808408epoutp03P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137115; bh=cdxa69xtYLHciSEnv9sUjq5OE7F/lZIZBuYcOBsw/Hw=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=cZBu4IUkvunjH+fjQlsci/hMamGnOkoUiVPq86nz2Sd1YEeESUryhhjk9qlyQdA3e qhUEq5Hd7W6XOq08NQ9UDZUpJ7M8HLmrvbiwRjvljBFry9Alw9AE1omaOsdBWJw3O5 MomZ2DP45XS/eeSDGjHZMAPkLhUaVe8IfOJt6iq0= Received: from epsmges2p3.samsung.com (unknown [182.195.42.71]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20190214093834epcas2p4bf70ab607348b148a6b6921f6a4c8845~DMX4mm5fP2520525205epcas2p4q; Thu, 14 Feb 2019 09:38:34 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id D5.0D.04134.A17356C5; Thu, 14 Feb 2019 18:38:34 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20190214093833epcas2p1cd99c749360aadf06a551810862d9bf4~DMX35vhSJ1579015790epcas2p13; Thu, 14 Feb 2019 09:38:33 +0000 (GMT) X-AuditID: b6c32a47-8c3ff70000001026-58-5c65371a74dc Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 1C.52.03689.917356C5; Thu, 14 Feb 2019 18:38:33 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:33 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:38 +0100 Message-id: <20190214093747.2414-5-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRmVeSWpSXmKPExsWy7bCmqa6UeWqMwd8uVYsrFw8xWUx9+ITN 4vz5DewW3650MFlc3jWHzeLwm3ZWi4srvjA5sHts+NzE5rFz1l12j02rOtk8+rasYvT4vEku gDWKyyYlNSezLLVI3y6BK2N2k3BBm27F3VmXWBsY/6h0MXJySAiYSKz59Yipi5GLQ0hgB6PE /ksT2CCc74wSx7b/BnLYwap+10KENzBKvF57mRXC+cUocfvoXiaQSWwChhK9R/sYQWwRATGJ 23M6mUGKmAVWMkps2beJDSQhLJAusWDFR2YQm0VAVWJhx08wm1fASuLKlTWsECfJS6zecAAs zilgLTFz03ZGkEESAj1sEms/f4AqcpHo+XaZCcKWlni2aiMjhF0tsWt7NzNEQwejRMuF7cwQ CWuJw8cvgjUzC/BJdBz+y97FyAEU55XoaBOCKPGQ+HBwFdT7fYwSZ7+tYJnAKLGAkWEVo1hq QXFuemqxUYGxXnFibnFpXrpecn7uJkZwlGm572Dcds7nEKMAB6MSD2+FUEqMEGtiWXFl7iFG CQ5mJRHei0apMUK8KYmVValF+fFFpTmpxYcYpTlYlMR5H0rPjRYSSE8sSc1OTS1ILYLJMnFw SjUwGqyblCfb/kH2zctY3W+e8166bct+vbCqgXnmW+UJpvU8a6v3Mv6aLeysa7ODIy/iw53d xy1WXeSuzHm2L72t4ajdSrHC2xoJz9O3GfZEOwk+j2fJeaMbvrvJ8ezuTj0ZpeZnoqtrtE/O EdIwk7ryv+y0pBsf61T/U83cCds+/inY2WfoLLdBiaU4I9FQi7moOBEAyKaHO64CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkluLIzCtJLcpLzFFi42I5/e+xoK6keWqMQX+vscWVi4eYLKY+fMJm cf78BnaLb1c6mCwu75rDZnH4TTurxcUVX5gc2D02fG5i89g56y67x6ZVnWwefVtWMXp83iQX wBrFZZOSmpNZllqkb5fAlTG7SbigTbfi7qxLrA2Mf1S6GNk5JARMJH7XdjFycQgJrGOUeHPv ICuE84tR4nPzcfYuRk4ONgFDid6jfYwgtoiAmMTtOZ3MIEXMAisZJY58XwWWEBZIl5i6chZY A4uAqsTCjp/MIDavgJXElStrWEFsCQF5idUbDoDFOQWsJWZu2g7UywG0zUpi3aHyCYw8CxgZ VjFKphYU56bnFhsVGOWllusVJ+YWl+al6yXn525iBAbQtsNa/TsYHy+JP8QowMGoxMNbIZQS I8SaWFZcmXuIUYKDWUmE96JRaowQb0piZVVqUX58UWlOavEhRmkOFiVxXv78Y5FCAumJJanZ qakFqUUwWSYOTqkGxmPRx55Z5+9keF8d98lNUceA99vN7b3fbt3WkL7r7/9mUtTLdbdzPfYw qgjN+rOoaD+X2QVbhvlaziFPWV5lLnI8u0hEKbD4gOv0cxHiT+o/Zk7aZJX7/yGnv1otd9tl qaOrud9P7037+5S/IOTp7LTL4fXzOowZ+XW2pt1xU/O9Pkm3w8xihRJLcUaioRZzUXEiAD11 ZmocAgAA X-CMS-MailID: 20190214093833epcas2p1cd99c749360aadf06a551810862d9bf4 CMS-TYPE: 102P X-CMS-RootMailID: 20190214093833epcas2p1cd99c749360aadf06a551810862d9bf4 References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Thu Feb 14 09:37:39 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: 10812553 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 4253F1399 for ; Thu, 14 Feb 2019 12:06:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2ED4E2DBB6 for ; Thu, 14 Feb 2019 12:06:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FDA92DBD6; Thu, 14 Feb 2019 12:06: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=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 F15332DBB6 for ; Thu, 14 Feb 2019 12:06:23 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 3C050267A0E; Thu, 14 Feb 2019 10:38:48 +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 D50F4267A30; Thu, 14 Feb 2019 10:38:45 +0100 (CET) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by alsa0.perex.cz (Postfix) with ESMTP id 32BBB2679E6 for ; Thu, 14 Feb 2019 10:38:40 +0100 (CET) Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190214093838epoutp02745750143189e226d93f4baa4861aa18~DMX8LPbDO1800018000epoutp02e; Thu, 14 Feb 2019 09:38:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190214093838epoutp02745750143189e226d93f4baa4861aa18~DMX8LPbDO1800018000epoutp02e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137118; bh=RiH3ahhVKOH75JYNzV0klrcfLZmbHDaDh+RWeur8M9c=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=VtP0q9eAdnYD/Pr/74UrP6UVE1FUZhX2RzBPSFWIf0WC7YFSZ/ZNPJpbakVyk3Kkh ojkE9TmZBlp21yJM+sHFjtMHrKxp0kk2JKEvZWXXIAWYBb/Wcsc7VWs2/+dSd4cYd6 /x73B1FZJMqvsoWcaDu3GAmDdvGednYknKWI4XDg= Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20190214093837epcas1p2b88c313fbee03c253182817d035cf98d~DMX7K2rXl2981829818epcas1p2R; Thu, 14 Feb 2019 09:38:37 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 36.C9.04206.D17356C5; Thu, 14 Feb 2019 18:38:37 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190214093836epcas1p36ff39d1a7ae59bf475256c6ae5c6171c~DMX6f0NQ-2145421454epcas1p3g; Thu, 14 Feb 2019 09:38:36 +0000 (GMT) X-AuditID: b6c32a39-d7dff7000000106e-a8-5c65371df436 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 8A.F3.04015.C17356C5; Thu, 14 Feb 2019 18:38:36 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:36 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:39 +0100 Message-id: <20190214093747.2414-6-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFIsWRmVeSWpSXmKPExsWy7bCmvq6seWqMQfNUUYsrFw8xWUx9+ITN 4vz5DewW3650MFlc3jWHzeLwm3ZWi4srvjA5sHts+NzE5rFz1l12j02rOtk8+rasYvT4vEku gDWKyyYlNSezLLVI3y6BK2PFjiOsBTNFK1Z0X2VtYDwq2MXIySEhYCKx5fUOti5GLg4hgR2M Egvf7WIDSQgJfGeU+HpDE6bo2utPUEUbGCXePH7CDOH8YpT4OHctWAebgKFE79E+RhBbREBM 4vacTrAiZoGVjBJb9m0CKuLgEBYIlvi4MAKkhkVAVWLJ7D52EJtXwEriy55r7BDb5CVWbzjA DGJzClhLzNy0nRFkjoTABDaJNyeeMoLMkRBwkdi9xxrClJa4dNQWorVaYtf2bmaI8g5GiZYL 25khEtYSh49fZAWxmQX4JN597WGF6OWV6GgTgijxkHi+eCIrxF99jBIz21+yTWCUWMDIsIpR LLWgODc9tdiwwFSvODG3uDQvXS85P3cTIzjGtCx3MB4753OIUYCDUYmHt0IoJUaINbGsuDL3 EKMEB7OSCO9Fo9QYId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rzrHZxjhATSE0tSs1NTC1KLYLJM HJxSDYymU/pvHAz4wGMg2HQvI1F1XbK7Sofdq9YH7K8DzgTzV03ewxTYlfHvcnPamvIzIjkP Vxs+Yuza9sFu2ezJWxbkMhSJScveaHtwa6ngofe7+Y589CvdfMKQ44pFcdm/9YH3EkRlj91Y 3xj07s03uc//t1zcoah/M/3J/d/GWV0rzG4Fcz77fn2KEktxRqKhFnNRcSIAmMk2Aq0CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmluLIzCtJLcpLzFFi42I5/e+xoK6MeWqMwd1fihZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8aKHUdYC2aKVqzovsrawHhUsIuRk0NCwETi2utPbF2MXBxCAusY JU50LmSFcH4xSsy7vZQdpIpNwFCi92gfI4gtIiAmcXtOJzNIEbPASkaJI99XASU4OIQFgiU+ LowAqWERUJVYMrsPrJdXwEriy55r7BDb5CVWbzjADGJzClhLzNy0HaxVCKhm3aHyCYw8CxgZ VjFKphYU56bnFhsVGOallusVJ+YWl+al6yXn525iBAbRtsNafTsY7y+JP8QowMGoxMOrIJAS I8SaWFZcmXuIUYKDWUmE96JRaowQb0piZVVqUX58UWlOavEhRmkOFiVx3tt5xyKFBNITS1Kz U1MLUotgskwcnFINjExpP8Km+0pHmO4NCP7iNIVbMfeWQjrDx1d/pr+25zsmFfLSU4y5y26v 64Y96592npPJ3+Gau9/24dke3Ui2zQ4FamEMSxb5vhT/au8ltU7x990pN2WdrhTxyZ12rFxX snA5w/RbXIfTXqn8Wb3F8JHY+TOTTs290//5wCGJfds5Ln4Sk2rrFlBiKc5INNRiLipOBACK SnYGHgIAAA== X-CMS-MailID: 20190214093836epcas1p36ff39d1a7ae59bf475256c6ae5c6171c CMS-TYPE: 101P X-CMS-RootMailID: 20190214093836epcas1p36ff39d1a7ae59bf475256c6ae5c6171c References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Thu Feb 14 09:37:40 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: 10812557 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 D822413B4 for ; Thu, 14 Feb 2019 12:06:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C38752DBB6 for ; Thu, 14 Feb 2019 12:06:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B78EF2DBB9; Thu, 14 Feb 2019 12:06: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=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 25E462DBBB for ; Thu, 14 Feb 2019 12:06:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 34FD1267A46; Thu, 14 Feb 2019 10:38:57 +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 CEA5E267A46; Thu, 14 Feb 2019 10:38:51 +0100 (CET) Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by alsa0.perex.cz (Postfix) with ESMTP id 80E54267A13 for ; Thu, 14 Feb 2019 10:38:43 +0100 (CET) Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20190214093840epoutp01ea49c853f1413b6a1870fd3f38eb7835~DMX97gNsi0518605186epoutp01U; Thu, 14 Feb 2019 09:38:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20190214093840epoutp01ea49c853f1413b6a1870fd3f38eb7835~DMX97gNsi0518605186epoutp01U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137120; bh=Lloc17coHXXtqiANsKzhHW0cVZNS2ka3G/t6w/A7ymg=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=MaUDkOPzek9QZKTbZYUv/FU9UQG+AqKJoElaJXHSihYFmihI6odKFg1Gr6OYxaBMP p9CiMQrSdO6453ID2g609lOEbYzAwXlfu8/qvJZj7HtkQFbTONpc3mpIOTMsNb6jyu LQy3VR7h4qKufSuxP2XBvyfuFV0anaXYuSWHMKMc= Received: from epsmges2p2.samsung.com (unknown [182.195.42.70]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20190214093839epcas2p3259fa750e79cd06603c27a7e712628cf~DMX9lNQm32485224852epcas2p37; Thu, 14 Feb 2019 09:38:39 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id C1.F0.04136.F17356C5; Thu, 14 Feb 2019 18:38:39 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190214093839epcas2p2609ddf53eb48143ff2160d6a30dad615~DMX9BqGP81576215762epcas2p2p; Thu, 14 Feb 2019 09:38:39 +0000 (GMT) X-AuditID: b6c32a46-2a7ff70000001028-1a-5c65371f49f2 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 9C.52.03689.F17356C5; Thu, 14 Feb 2019 18:38:39 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:39 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:40 +0100 Message-id: <20190214093747.2414-7-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsWy7bCmqa68eWqMwdETZhZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8a0ycIF38wqFs87xdbA2K3bxcjJISFgIrG1awdbFyMXh5DADkaJ fYufMEI43xklNv2/wwhTtfz0TyaIxAZGiT3XTzFDOL8YJQ7f38kMUsUmYCjRe7QPrENEQEzi 9pxOsCJmgZWMElv2bWIDSQgLREvMObyFBcRmEVCVOP3xGVgDr4CVxJQ3j1kh1slLrN5wAGwo p4C1xMxN28FukhDoYZPo/7yeCaLIReLQzjPsELa0xLNVG6FurZbYtb2bGaKhg1Gi5cJ2ZoiE tcTh4xfBNjAL8El0HP4L1MwBFOeV6GgTgjA9JJqnG0B81sco8edHD9MERokFjAyrGMVSC4pz 01OLjQqM9IoTc4tL89L1kvNzNzGC40zLbQfjknM+hxgFOBiVeHgrhFJihFgTy4orcw8xSnAw K4nwXjRKjRHiTUmsrEotyo8vKs1JLT7EKM3BoiTO+1B6brSQQHpiSWp2ampBahFMlomDU6qB 0f788eeeQnPbFpamPL9zavbv1ytOXrBIm10zZ6mA2j7VeOMvTaY6R+barPl7683TXenFnb/d HB6K2BhyRJg0ZDDHMMqybf5qtPzrH1nnbYG763yecr6OyWyRLmPw4z/tcGN1iZIvJ1NfsLHt k6JQSdeDHQdY9wayX7aYw9bPcWZFXhz7InULJZbijERDLeai4kQAf58w7a8CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmluLIzCtJLcpLzFFi42I5/e+xoK68eWqMwZpJQhZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8a0ycIF38wqFs87xdbA2K3bxcjJISFgIrH89E+mLkYuDiGBdYwS 26d/ZYRwfjFKXP66jAWkik3AUKL3aB8jiC0iICZxe04nM0gRs8BKRokj31eBJYQFoiXmHN4C 1sAioCpx+uMzsDivgJXElDePWSHWyUus3nCAGcTmFLCWmLlpO1ANB9A2K4l1h8onMPIsYGRY xSiZWlCcm55bbFRglJdarlecmFtcmpeul5yfu4kRGETbDmv172B8vCT+EKMAB6MSD2+FUEqM EGtiWXFl7iFGCQ5mJRHei0apMUK8KYmVValF+fFFpTmpxYcYpTlYlMR5+fOPRQoJpCeWpGan phakFsFkmTg4pRoYRU0cd8Y8dTykcEnqUnRdfP7G7zwq77gl98umnlsRsZjJuNS3uMDHuDrR wWfeF7dszVUL7R9euugl/uIQW8s1T9c/D6VyQp6Gs1+fcu35gRV/7jl9+Xd3YZWRyvZdKhLd qtbN727/S9KRqauburzIWNKtr9FFPWOmQ9qFnclCOz+oi4QEZZ5WYinOSDTUYi4qTgQAtyjf tB4CAAA= X-CMS-MailID: 20190214093839epcas2p2609ddf53eb48143ff2160d6a30dad615 CMS-TYPE: 102P X-CMS-RootMailID: 20190214093839epcas2p2609ddf53eb48143ff2160d6a30dad615 References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Thu Feb 14 09:37:41 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: 10812235 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 4FFB3184E for ; Thu, 14 Feb 2019 09:56:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E6F828703 for ; Thu, 14 Feb 2019 09:56:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3253A2D0D3; Thu, 14 Feb 2019 09:56:32 +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 EDCF829417 for ; Thu, 14 Feb 2019 09:56:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0E3CA267A3C; Thu, 14 Feb 2019 10:39:04 +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 3211C267A2D; Thu, 14 Feb 2019 10:38:56 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id 3BF7B267A2F for ; Thu, 14 Feb 2019 10:38:44 +0100 (CET) Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190214093842epoutp03ad8167977eaad08cc468479435ac5f01~DMYAVnsnc0713907139epoutp03D; Thu, 14 Feb 2019 09:38:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190214093842epoutp03ad8167977eaad08cc468479435ac5f01~DMYAVnsnc0713907139epoutp03D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137122; bh=J6H+Vy/rMx02aXMq9DQh06tQn/cC6LHTpLKn919N9e0=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=O9bM0ywdvYQNtrbiE98bkqhRIj4kGY98E3HeTxy/J5/vCcDezHsJn6v3FLogx7hyr PkLH5iXWD5HdPvLqtNi7uU861c6YgUO6DGEbydSU/MiTDT+gWRZXzw6rJhR89vbvW7 zGKFh6ojJ8R7I6VoXW+gK1Is+ZNxDhJXk9i9ZBVo= Received: from epsmges1p4.samsung.com (unknown [182.195.42.56]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190214093842epcas1p43261c10e6848cb87f7aa4c5e9f303de9~DMX-69sag0727007270epcas1p4L; Thu, 14 Feb 2019 09:38:42 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id ED.14.04288.227356C5; Thu, 14 Feb 2019 18:38:42 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20190214093842epcas1p154bd9c945a6897d5211c152aefabb32c~DMX-hwURB0747507475epcas1p1W; Thu, 14 Feb 2019 09:38:42 +0000 (GMT) X-AuditID: b6c32a38-c0fff700000010c0-94-5c65372227e7 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 4B.F3.04015.127356C5; Thu, 14 Feb 2019 18:38:42 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:41 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:41 +0100 Message-id: <20190214093747.2414-8-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRmVeSWpSXmKPExsWy7bCmga6SeWqMwZkJUhZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8auY7NYClplKi4c7WBsYNwn3sXIySEhYCJxYN8/JhBbSGAHo8TV c+VdjFxA9ndGifUf2hhhihZP28gIkdjAKLF3xSMo5xejRP+JbSwgVWwChhK9R/vAOkQExCRu z+lkBiliFljJKLFl3yY2kISwQKrE344OsAYWAVWJF2dOgDXwClhJHJq+jBlinbzE6g0HwGxO AWuJmZu2Q53Rwybx4kI2hO0icX/dX6CZHEC2tMSlo7YQ4WqJXdu7wfZKCHQwSrRc2A4101ri 8PGLrCA2swCfxLuvPawQvbwSHW1CECUeEg3HvrJBPNYH9P6JlWwTGCUWMDKsYhRLLSjOTU8t Niww0StOzC0uzUvXS87P3cQIjjItix2Me875HGIU4GBU4uGtEEqJEWJNLCuuzD3EKMHBrCTC e9EoNUaINyWxsiq1KD++qDQntfgQozQHi5I473oH5xghgfTEktTs1NSC1CKYLBMHp1QDo7vT jpcMy+4I3v/DnCDnqnxywaeNp6p046r0p8Y+Wq4lmLXVZEX304feRuHch3szjqhOV14e+Fss qdO44GLSlTexaY9qu0um7mPdtafTNvSKk/VMU738iY/lnr5uCNhzYGLe0Qpvjcizby0qtdQi JbOXCjZOuCe8cdPk35+9r22qdNxoWfxvlhJLcUaioRZzUXEiAIFyIUuuAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmluLIzCtJLcpLzFFi42I5/e+xoK6SeWqMwa5zjBZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8auY7NYClplKi4c7WBsYNwn3sXIySEhYCKxeNpGRhBbSGAdo8Sv w6pdjFxA9i9Gid8n5jGBJNgEDCV6j/aBFYkIiEncntPJDFLELLCSUeLI91VgCWGBVIm/HR0s IDaLgKrEizMnwOK8AlYSh6YvY4bYJi+xesMBMJtTwFpi5qbtQDUcQNusJNYdKp/AyLOAkWEV o2RqQXFuem6xUYFhXmq5XnFibnFpXrpecn7uJkZgEG07rNW3g/H+kvhDjAIcjEo8vAoCKTFC rIllxZW5hxglOJiVRHgvGqXGCPGmJFZWpRblxxeV5qQWH2KU5mBREue9nXcsUkggPbEkNTs1 tSC1CCbLxMEp1cCYp+lr0ZPixHksZs1K5ZT9r5bzaXRmqLAGT39x9ZWub8+t7skfpv6qDj1d 9idawEdd79+97nQFa4XpyjKBc6+q/FVNms/68MaGdtblt5+bCc+9nbVOzDXV3WdHLsdu70d/ BCKqqq78e1p2+VdDfNzP1+uPNIsfUObpt0hJ8Dj/+qWL+Po4ozlKLMUZiYZazEXFiQDW/ofJ HgIAAA== X-CMS-MailID: 20190214093842epcas1p154bd9c945a6897d5211c152aefabb32c CMS-TYPE: 101P X-CMS-RootMailID: 20190214093842epcas1p154bd9c945a6897d5211c152aefabb32c References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Thu Feb 14 09:37:42 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: 10812243 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 A72EA184E for ; Thu, 14 Feb 2019 09:56:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9243828703 for ; Thu, 14 Feb 2019 09:56:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 864B629416; Thu, 14 Feb 2019 09:56:33 +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 DE7032934D for ; Thu, 14 Feb 2019 09:56:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 16BAA267A16; Thu, 14 Feb 2019 10:39:11 +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 A7884267A47; Thu, 14 Feb 2019 10:38:58 +0100 (CET) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by alsa0.perex.cz (Postfix) with ESMTP id 05B2C2679FD for ; Thu, 14 Feb 2019 10:38:46 +0100 (CET) Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190214093845epoutp0224cb7aa3ef564c177070e99c7c8dc5c1~DMYCu2KLJ1800018000epoutp02l; Thu, 14 Feb 2019 09:38:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190214093845epoutp0224cb7aa3ef564c177070e99c7c8dc5c1~DMYCu2KLJ1800018000epoutp02l DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137125; bh=4r9BDhjJdgjV+qJedBadvh8+VBJ5DIXEhHxwe0CLdFI=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=q7YEc2WZOLw5zpurKIksBRKLFBl8A3T5wXAXwvjJi2S8Kj0CV0xjqgWunoTqMSYru OBSpWSl6EsBrGJCT4JFhQeZIwyvsJpmU5QfjbK9xmgdHQsf7EOQLVgDX/OP/CYaERQ j7/rjRkkT9PYwKfZpVGQUZL6fBsbtizrwGXC5TC4= Received: from epsmges1p2.samsung.com (unknown [182.195.42.54]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20190214093845epcas1p2f74acb4ee8580a9f2d51863e3a666239~DMYCglHl62812928129epcas1p2F; Thu, 14 Feb 2019 09:38:45 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id E6.CE.04173.527356C5; Thu, 14 Feb 2019 18:38:45 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190214093844epcas1p432e337986df8edc10206413da8a7cd08~DMYCM-4Ix0480804808epcas1p4h; Thu, 14 Feb 2019 09:38:44 +0000 (GMT) X-AuditID: b6c32a36-5c1ff7000000104d-01-5c653725ddc0 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id DB.F3.04015.427356C5; Thu, 14 Feb 2019 18:38:44 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:44 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:42 +0100 Message-id: <20190214093747.2414-9-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJIsWRmVeSWpSXmKPExsWy7bCmvq6qeWqMwctFnBZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV0bX/6CCNUIVKyf1MTcwbubvYuTkkBAwkVh5fAlrFyMXh5DADkaJ vpVnmSCc74wSUy/uYYepam25yAyR2MAo8fniRnYI5xejxIfpX5lAqtgEDCV6j/YxgtgiAmIS t+d0gnUwC6xklNiybxMbSEJYIFLi55ftYEUsAqoSjT+OADVzcPAKWEmc/BUGsU1eYvWGA8wg NqeAtcTMTRDlEgIdbBJ3pvNC2C4SXz7NYwVplRCQlrh01BYiXC2xa3s32FqgckaJlgvbmSES 1hKHj19kBbGZBfgk3n3tgerllehoE4IwPSTutzhCvNXHKHHp/RrWCYwSCxgZVjGKpRYU56an FhsWGOkVJ+YWl+al6yXn525iBEeYltkOxkXnfA4xCnAwKvHwVgilxAixJpYVV+YeYpTgYFYS 4b1olBojxJuSWFmVWpQfX1Sak1p8iFGag0VJnHe9g3OMkEB6YklqdmpqQWoRTJaJg1OqgdGR W2nmC9+/cTc5Vny8/p/pZ+70lbL8Sq/3TPdQ+5jCut3p+7ovYcGZL0RMdazYQv51C7RcTdXL Vyt3MDN9M2fZuY2lc3TDLVWvvHf4xZV918SyIrj87RQWxy8H3PsLpJP92ngn2TwWNOJ93rWM V1Ji56WJ6U796nEmwmJdqTrtwXMb/yiqK7EUZyQaajEXFScCAAf0N4ysAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupiluLIzCtJLcpLzFFi42I5/e+xoK6KeWqMwbNbZhZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV0bX/6CCNUIVKyf1MTcwbubvYuTkkBAwkWhtucjcxcjFISSwjlFi 4Yr5LBDOL0aJhrf7GEGq2AQMJXqP9oHZIgJiErfndIJ1MAusZJQ48n0VWEJYIFLi55ftYDaL gKpE448jTF2MHBy8AlYSJ3+FQWyTl1i94QAziM0pYC0xcxNIOQfQMiuJdYfKJzDyLGBkWMUo mVpQnJueW2xUYJiXWq5XnJhbXJqXrpecn7uJERhC2w5r9e1gvL8k/hCjAAejEg+vgkBKjBBr YllxZe4hRgkOZiUR3otGqTFCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeW/nHYsUEkhPLEnNTk0t SC2CyTJxcEo1MHpMYFzTOTvmbLEp12ut76FfY/tWf2S93COqq8d/bLW76AVOjdJG9mmXD/ju Wi4lvapJVeRaNHNL0MYL5w/yOr76brWhSXrPzZ8NEU+CzYPYJzpdW+vSNo3VWlP7AIvQ8+tu fv3fbri2RycvflgSKVfUte/aZ+Wgk7Efvm3gnBaw+BvXIu7lfkosxRmJhlrMRcWJABLfeokd AgAA X-CMS-MailID: 20190214093844epcas1p432e337986df8edc10206413da8a7cd08 CMS-TYPE: 101P X-CMS-RootMailID: 20190214093844epcas1p432e337986df8edc10206413da8a7cd08 References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Thu Feb 14 09:37:43 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: 10812555 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 7852C17E0 for ; Thu, 14 Feb 2019 12:06:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66E492DBB6 for ; Thu, 14 Feb 2019 12:06:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B63C2DBC8; Thu, 14 Feb 2019 12:06: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=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 F1C462DBB9 for ; Thu, 14 Feb 2019 12:06:23 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 60546267A0C; Thu, 14 Feb 2019 10:39:29 +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 A05F0267A30; Thu, 14 Feb 2019 10:39:06 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id 135B6267A41 for ; Thu, 14 Feb 2019 10:38:50 +0100 (CET) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190214093848epoutp034c0096651d08647ccd0e506fb3d8218b~DMYFuY34a0834508345epoutp03d; Thu, 14 Feb 2019 09:38:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190214093848epoutp034c0096651d08647ccd0e506fb3d8218b~DMYFuY34a0834508345epoutp03d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137128; bh=hE+X8z3qdk71D0LxrGPVgTUUa5zoHoXIy316WRLsK/k=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=oZwu9T5T57sD4TX73K2nFv6Lm4NmGOsq9kgODMqsPJ3ZKEsgz1b3ztLiYXuSulZfK 4A4eeBhzvnJ/gaKpNzNpnGzhiVuVVgU6DYCjOpB2j87dCr8PMobk+jW6Rd5xyMjs2X upxAip6zLRK8jEk1sRydUO7tUcj4Knzkwh/XE53c= Received: from epsmges2p3.samsung.com (unknown [182.195.42.71]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190214093848epcas2p2b4bd3c35348e9745f9fdeb6c44bec4d3~DMYFTBufe1576715767epcas2p2t; Thu, 14 Feb 2019 09:38:48 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 3A.2D.04134.827356C5; Thu, 14 Feb 2019 18:38:48 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20190214093847epcas2p1056c7371ba485f375a9d408ea45078e4~DMYE-X7ew2279822798epcas2p1x; Thu, 14 Feb 2019 09:38:47 +0000 (GMT) X-AuditID: b6c32a47-8abff70000001026-81-5c65372801a4 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id BD.52.03689.727356C5; Thu, 14 Feb 2019 18:38:47 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:47 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:43 +0100 Message-id: <20190214093747.2414-10-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsWy7bCmma6GeWqMweZ1nBZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8bqb/+YCp5JV9x9uYWtgXGqeBcjJ4eEgInEmTVHGbsYuTiEBHYw SlxZtYsFwvnOKPF9xSZWmKrHS59CVW1glLi7+xAzhPOLUaLj2XU2kCo2AUOJ3qN9jCC2iICY xO05nWBFzAIrGSW27NsEViQsUCix4mAPE4jNIqAqsf/qGzCbV8Ba4vn/Q2wQ6+QlVm84wAxi cwLFZ27aDrZaQqCHTWLF+j9QN7lI7Pg9mwXClpZ4tmojI4RdLbFrezczREMHo0TLhe3MEAlr icPHL4I1MwvwSXQc/svexcgBFOeV6GgTgjA9JGb0uUF81sco8fvXZbYJjBILGBlWMYqlFhTn pqcWGxUY6xUn5haX5qXrJefnbmIER5qW+w7Gbed8DjEKcDAq8fBWCKXECLEmlhVX5h5ilOBg VhLhvWiUGiPEm5JYWZValB9fVJqTWnyIUZqDRUmc96H03GghgfTEktTs1NSC1CKYLBMHp1QD o5PsEVfNL7IXfyo3famcqZRa18E037RB/O+RC/vP+YUa5zySE9j9mTWgzLr2397Eh7F713w0 FxIp/iw2d3XTDleplgnzFsq8b/o32c9N03W5H0PTgautzY2M9zObVn2+sPvjUnfF58oZP/yq 5gmEb2/cnTX/1ln9+F0Tq3Ye3RzB77Nl+i+bG0osxRmJhlrMRcWJABUG/TSwAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphluLIzCtJLcpLzFFi42I5/e+xoK66eWqMwYVGA4srFw8xWUx9+ITN 4vz5DewW3650MFlc3jWHzeLwm3ZWi4srvjA5sHts+NzE5rFz1l12j02rOtk8+rasYvT4vEku gDWKyyYlNSezLLVI3y6BK2P1t39MBc+kK+6+3MLWwDhVvIuRk0NCwETi8dKnjF2MXBxCAusY JeZ1H2GBcH4xSsw83MMKUsUmYCjRe7SPEcQWERCTuD2nkxmkiFlgJaPEke+rwBLCAoUSKw72 MIHYLAKqEvuvvgGzeQWsJZ7/P8QGsU5eYvWGA8wgNidQfOam7UC9HEDbrCTWHSqfwMizgJFh FaNkakFxbnpusVGBUV5quV5xYm5xaV66XnJ+7iZGYBhtO6zVv4Px8ZL4Q4wCHIxKPLwVQikx QqyJZcWVuYcYJTiYlUR4LxqlxgjxpiRWVqUW5ccXleakFh9ilOZgURLn5c8/FikkkJ5Ykpqd mlqQWgSTZeLglGpgnFvRVLCR9f3s2JTI+7ZKClzr7/3eNCWI07nlMfOJa9M8vx/YwLxy/ZN3 zG0RLzWL4h8lJj9+w/D187zdMwTn/O/majkcrLOEmeHfv6Tq86+MK4OfyN1WNjRsrJt1Zp5n h2hf5CGGRNupvA6ndI16H+7QieW8OKH7TO+F37mtsz4wrN9ixqlwWImlOCPRUIu5qDgRAP7R jesfAgAA X-CMS-MailID: 20190214093847epcas2p1056c7371ba485f375a9d408ea45078e4 CMS-TYPE: 102P X-CMS-RootMailID: 20190214093847epcas2p1056c7371ba485f375a9d408ea45078e4 References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Thu Feb 14 09:37:44 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: 10812239 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 33CD313B5 for ; Thu, 14 Feb 2019 09:56:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21BD428703 for ; Thu, 14 Feb 2019 09:56:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15AFF28797; Thu, 14 Feb 2019 09:56:33 +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 00B3C29458 for ; Thu, 14 Feb 2019 09:56:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C28C3267A48; Thu, 14 Feb 2019 10:39:35 +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 30954267A43; Thu, 14 Feb 2019 10:39:09 +0100 (CET) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by alsa0.perex.cz (Postfix) with ESMTP id 49B23267A45 for ; Thu, 14 Feb 2019 10:38:54 +0100 (CET) Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20190214093852epoutp046d3ff03d92ed568a5683c302e85037ff~DMYI7yDKR1365913659epoutp04g; Thu, 14 Feb 2019 09:38:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20190214093852epoutp046d3ff03d92ed568a5683c302e85037ff~DMYI7yDKR1365913659epoutp04g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137132; bh=PdXUiHMjO8jWQA+bA7KAm5R1xW5ACTcrowF1ypy2U0E=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=YVDkPODZxgprhdA5Idnu6wMuGXq/kQQ94pVkJVnDCbH+zgd9hIBCshE650XSFqd4S K4sZLW+N405RWc07VHhEUsZr+0HNBUKFp4BOG40ZawTsEA2G0JjywWtXZz1hThdsOQ Tl5eX/AkCyHqD9yYI4QZmTeZH9jxACgnt5OAR6UQ= Received: from epsmges1p4.samsung.com (unknown [182.195.42.56]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190214093851epcas1p306dc679f25a40a20c3b89ccfa00198b5~DMYIrXAfC1440014400epcas1p3B; Thu, 14 Feb 2019 09:38:51 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 54.24.04288.B27356C5; Thu, 14 Feb 2019 18:38:51 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20190214093850epcas1p2ced5d0673c9c4aebe57aa0ab4b08aeaf~DMYHcWcFy2981729817epcas1p2X; Thu, 14 Feb 2019 09:38:50 +0000 (GMT) X-AuditID: b6c32a38-c0fff700000010c0-ac-5c65372b0059 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 4D.F3.04015.A27356C5; Thu, 14 Feb 2019 18:38:50 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:50 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:44 +0100 Message-id: <20190214093747.2414-11-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsWy7bCmnq62eWqMwa11OhZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8bVu50sBfe4KlZ9aGFrYLzD0cXIySEhYCKxds409i5GLg4hgR2M EtOn3oFyvjNKnLz4kRGm6tbSeUwQiQ2MEr++rWeDcH4xSux/t4sdpIpNwFCi92gfWIeIgJjE 7TmdzCBFzAIrGSW27NvEBpIQFoiXaFj+iAnEZhFQlTh9eQlYM6+AtcTc2wuZINbJS6zecIAZ xOYEis/ctB3qjB42iZ7d3BC2i8Sk08tYuhg5gGxpiUtHbSHC1RK7tneD7ZUQ6GCUaLmwnRki YS1x+PhFVhCbWYBP4t3XHlaIXl6JjjYhiBIPif1NsxghHutjlDh2dhPrBEaJBYwMqxjFUguK c9NTiw0LTPSKE3OLS/PS9ZLzczcxguNMy2IH455zPocYBTgYlXh4K4RSYoRYE8uKK3MPMUpw MCuJ8F40So0R4k1JrKxKLcqPLyrNSS0+xCjNwaIkzrvewTlGSCA9sSQ1OzW1ILUIJsvEwSnV wFhm1i647iHT/5THs+zMYh/2SPn4f/t09/2l9b4Z+2PYuU6fKLA7XPtLeOatlKkyj2rjbwfs vBYYIMP60eJ+q9znPNFPBUs8XcqmpDKvijg24xJTxNmUmWlMBgsvMmy6fvIvl4TtdNYUpk3/ tn/98CVn9cNjszcEcSU4txXubpXrKArc23q66ZkSS3FGoqEWc1FxIgCEXCJ2rwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphluLIzCtJLcpLzFFi42I5/e+xoK6WeWqMwZVD8hZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8bVu50sBfe4KlZ9aGFrYLzD0cXIySEhYCJxa+k8pi5GLg4hgXWM EjPe/GWGcH4xShxZ8ZIFpIpNwFCi92gfI4gtIiAmcXtOJ1gRs8BKoKLvq8ASwgLxEg3LHzGB 2CwCqhKnLy9hB7F5Bawl5t5eyASxTl5i9YYDzCA2J1B85qbtQL0cQNusJNYdKp/AyLOAkWEV o2RqQXFuem6xUYFhXmq5XnFibnFpXrpecn7uJkZgGG07rNW3g/H+kvhDjAIcjEo8vAoCKTFC rIllxZW5hxglOJiVRHgvGqXGCPGmJFZWpRblxxeV5qQWH2KU5mBREue9nXcsUkggPbEkNTs1 tSC1CCbLxMEp1cAo+mVyQJT2lziP7YretbqrbOS+FZTVMXROWLxccd+8dycZDM+fWs3moqQg Zc1bmGT1/1jBQTbvnb5Htiue8PcvbdLgXn2c11HkfkTShNU+5ifmPJzSXWXximdD+4LP3FMS 2m6c2B3Wc+tQNLPUbn3rYiWDxqlBAer539tXXZucpnNnqUpKdLUSS3FGoqEWc1FxIgD9jxTe HwIAAA== X-CMS-MailID: 20190214093850epcas1p2ced5d0673c9c4aebe57aa0ab4b08aeaf CMS-TYPE: 101P X-CMS-RootMailID: 20190214093850epcas1p2ced5d0673c9c4aebe57aa0ab4b08aeaf References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 10/13] ASoC: samsung: i2s: Simplify pri_dai, sec_dai pointers usage 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 If the probe call is on the primary DAI we can use 'other' in place of i2s->sec_dai, if the probe call is on the secondary DAI we can use 'i2s' in place of other->sec_dai. While at it fix one whitespace issue. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/i2s.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 16e6868376f6..4f15b6af8268 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1057,18 +1057,17 @@ 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 */ - snd_soc_dai_init_dma_data(dai, &other->sec_dai->dma_playback, - NULL); + snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, NULL); } else { snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, - &i2s->dma_capture); + &i2s->dma_capture); if (priv->quirks & QUIRK_NEED_RSTCLR) writel(CON_RSTCLR, priv->addr + I2SCON); if (priv->quirks & QUIRK_SUPPORTS_IDMA) idma_reg_addr_init(priv->addr, - i2s->sec_dai->idma_playback.addr); + other->idma_playback.addr); } /* Reset any constraint on RFS and BFS */ From patchwork Thu Feb 14 09:37:45 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: 10812249 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 7AC6613B5 for ; Thu, 14 Feb 2019 09:56:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67869292EE for ; Thu, 14 Feb 2019 09:56:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BFC829416; Thu, 14 Feb 2019 09:56:46 +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 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 04CA5294AC for ; Thu, 14 Feb 2019 09:56:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D1DA52679CF; Thu, 14 Feb 2019 10:39: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 18638267A36; Thu, 14 Feb 2019 10:39:10 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id AE858267A16 for ; Thu, 14 Feb 2019 10:38:55 +0100 (CET) Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190214093854epoutp03d8cac5f1c482fa34dcda77abf48e8c5d~DMYK5AmpN0834508345epoutp03g; Thu, 14 Feb 2019 09:38:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190214093854epoutp03d8cac5f1c482fa34dcda77abf48e8c5d~DMYK5AmpN0834508345epoutp03g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137134; bh=+melQFnhucKXec64n3LxQa4qD0lcZ3kQ1hkEfDibqRM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=M0aG66/CuOXis17Egx7In3VL0WqBlHIJJmaRh0qKtpvJLbjTe6n27h/6tnbgYdEZm iSzS9YQ+mAsaAG2sT2Kco2+xTj4OwSBJ1CGjdxYLsrRge/8a7qD6LO97YGshSb+klu 9DbymjmXqHJSqfYz87BMdISYHLygnJbt7OmyjpJI= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190214093854epcas2p23b54a4f765eafc97824f4a3cb6a470ee~DMYKqobpN1576715767epcas2p24; Thu, 14 Feb 2019 09:38:54 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 0F.D6.04093.D27356C5; Thu, 14 Feb 2019 18:38:53 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190214093853epcas2p2f48340585495bf0ba662ae42399d1cab~DMYJ_1sck1576715767epcas2p22; Thu, 14 Feb 2019 09:38:53 +0000 (GMT) X-AuditID: b6c32a48-18bff70000000ffd-7b-5c65372d341e Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 5E.52.03689.D27356C5; Thu, 14 Feb 2019 18:38:53 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:53 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:45 +0100 Message-id: <20190214093747.2414-12-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsWy7bCmqa6ueWqMwa0nlhZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8beTScZC16xV2x4tYWxgfEiWxcjB4eEgInE51bRLkYuDiGBHYwS zdsvskI43xkljpzqYepi5AQrOvR/HxtEYgOjxK+ZG6CcX4wS654vZQSpYhMwlOg92gdmiwiI Sdye08kMUsQssJJRYsu+TWwgCWGBDInV2+ewg9gsAqoSZ9ccB1vBK2AtMeHJXxaIdfISqzcc YAaxOYHiMzdtZwQZJCHQwyZxcv0lqJtcJFZMW88MYUtLPFu1kRHCrpbYtb2bGaKhg1Gi5cJ2 qCJricPHQb7jBDqJT6Lj8F92SAjwSnS0CUGYHhLdL/whPutjlJiw6wrbBEaJBYwMqxjFUguK c9NTi40KTPSKE3OLS/PS9ZLzczcxguNMy2MH44FzPocYBTgYlXh4K4RSYoRYE8uKK3MPMUpw MCuJ8F40So0R4k1JrKxKLcqPLyrNSS0+xCjNwaIkzvtQem60kEB6YklqdmpqQWoRTJaJg1Oq gbHv8ZJQDbb4h/9zvpkETO6bMGF9T3ho4/5spUrFv7x7gxZE9pVXLo+ve+LLfaKvUHldcLJv lq2mldqj9X5r54hP2XyY27jW8/HFrs+ZplXvu4SeKDt8eSD5jy+sfq/Tpk8P9vsaq1lYfemv etV6vMjx9ZeDxksX3Zl+Ps77rmU7O9fbonNSnUosxRmJhlrMRcWJAMXBZV+vAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphluLIzCtJLcpLzFFi42I5/e+xoK6ueWqMwYJ2fosrFw8xWUx9+ITN 4vz5DewW3650MFlc3jWHzeLwm3ZWi4srvjA5sHts+NzE5rFz1l12j02rOtk8+rasYvT4vEku gDWKyyYlNSezLLVI3y6BK2PvppOMBa/YKza82sLYwHiRrYuRk0NCwETi0P99QDYXh5DAOkaJ Pf+PM0I4vxglbjx7ww5SxSZgKNF7tI8RxBYREJO4PaeTGaSIWWAlo8SR76vAEsICGRKrt88B a2ARUJU4u+Y4E4jNK2AtMeHJXxaIdfISqzccYAaxOYHiMzdtB+rlANpmJbHuUPkERp4FjAyr GCVTC4pz03OLjQqM8lLL9YoTc4tL89L1kvNzNzECw2jbYa3+HYyPl8QfYhTgYFTi4a0QSokR Yk0sK67MPcQowcGsJMJ70Sg1Rog3JbGyKrUoP76oNCe1+BCjNAeLkjgvf/6xSCGB9MSS1OzU 1ILUIpgsEwenVANjdsPflx5rJRNlV1zS/LuiZM6sG0tn/7+XuPkmz6wHqX8nxFxQ5OcWm3f+ T970TJElgV/0P9v9r812/CV9yD7Pw7254nz6BOmpcx98T8+KuXW5vGpb4uzCrWz/O5Kln87T fDz5ZXiW4MOHu50tl8VIViUyr/RfKts8/cylx28+pilu/rY0+lLRAyWW4oxEQy3mouJEAE/F UI4fAgAA X-CMS-MailID: 20190214093853epcas2p2f48340585495bf0ba662ae42399d1cab CMS-TYPE: 102P X-CMS-RootMailID: 20190214093853epcas2p2f48340585495bf0ba662ae42399d1cab References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 and looks more consistent with surrounding code. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- 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 Thu Feb 14 09:37:46 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: 10812241 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 8D0FD746 for ; Thu, 14 Feb 2019 09:56:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C49928703 for ; Thu, 14 Feb 2019 09:56:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7044928797; Thu, 14 Feb 2019 09:56:33 +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 D45A928770 for ; Thu, 14 Feb 2019 09:56:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1D760267A35; Thu, 14 Feb 2019 10:39:47 +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 ECDAE2679E2; Thu, 14 Feb 2019 10:39:20 +0100 (CET) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by alsa0.perex.cz (Postfix) with ESMTP id 5DC88267A48 for ; Thu, 14 Feb 2019 10:38:59 +0100 (CET) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20190214093856epoutp047f62aebdaa01d54e8e121e8eaae8b397~DMYNZMs701365913659epoutp04o; Thu, 14 Feb 2019 09:38:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20190214093856epoutp047f62aebdaa01d54e8e121e8eaae8b397~DMYNZMs701365913659epoutp04o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137136; bh=ufBzQMs8s4s7HJA/lN/kwyttViP+POxX5tShUtXQ1E4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=ovgP+pi+pjHIJtaj8t8oY8xNrLOZ2bbATTDP4U+WN68phFihKRH2Oorde+u9hxvPA eNZPDCEONjs3BTZi1LbO19wYNqL4KL1nTSiRPWGusa8tmpGDcs0jLT93YRb5C/faXj iczcbJNzkH5HyUPItIjn/dhGGFLvwKPDT5/V1kmc= Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190214093856epcas1p331f4f39101aa1e17f9d127a7cafc5f8c~DMYM4hz0C2145421454epcas1p3s; Thu, 14 Feb 2019 09:38:56 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id B0.D9.04206.037356C5; Thu, 14 Feb 2019 18:38:56 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190214093856epcas1p333b119e4b70f2c0edaf0c181e45adfb7~DMYMkgLoL2145421454epcas1p3r; Thu, 14 Feb 2019 09:38:56 +0000 (GMT) X-AuditID: b6c32a39-d7dff7000000106e-d8-5c65373008e4 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id ED.F3.04015.F27356C5; Thu, 14 Feb 2019 18:38:55 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:55 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:46 +0100 Message-id: <20190214093747.2414-13-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsWy7bCmnq6BeWqMwdyZQhZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8brJbvYCxbLVexo38XWwNgk0cXIySEhYCKxb/Y35i5GLg4hgR2M EufPN0I53xklpve9ZYWpaj21hgkisYFR4mr7CTYI5xejxIozXYwgVWwChhK9R/vAbBEBMYnb czrBRjELrGSU2LJvExtIQljATeLJm50sIDaLgKrErI1bweK8AtYSu5tesUCsk5dYveEAM4jN CRSfuWk7I8ggCYEJbBJf3/QwQRS5SOzY8BGogQPIlpa4dNQWIlwtsWt7NzNEfQejRMuF7cwQ CWuJw8cvgv3DLMAn8e5rDytEL69ER5sQRImHxJuuBVBv9jFKrHv+hXUCo8QCRoZVjGKpBcW5 6anFhgWmesWJucWleel6yfm5mxjBkaZluYPx2DmfQ4wCHIxKPLwVQikxQqyJZcWVuYcYJTiY lUR4LxqlxgjxpiRWVqUW5ccXleakFh9ilOZgURLnXe/gHCMkkJ5YkpqdmlqQWgSTZeLglGpg lHV6Fs2XMmf1ybM7lm/yWezwJLBWuHBZziz/8LifTdqcnIYWf7ZbM0x7dDrbsy18ls3nNNV7 sevLTa8yFbj/bd1i9mjd839Ltkld5f/fzsJUcJSvLLjYd9uDncGPmyrN9Of9DQpfy/5w/f+i gl2CM4W95TI9pHj/zGm6uvDO53avVJ9FCjvKlViKMxINtZiLihMBzbdzM7ACAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphluLIzCtJLcpLzFFi42I5/e+xoK6+eWqMwYYma4srFw8xWUx9+ITN 4vz5DewW3650MFlc3jWHzeLwm3ZWi4srvjA5sHts+NzE5rFz1l12j02rOtk8+rasYvT4vEku gDWKyyYlNSezLLVI3y6BK+P1kl3sBYvlKna072JrYGyS6GLk5JAQMJFoPbWGqYuRi0NIYB2j xPLXJ1ghnF+MEu9PL2QHqWITMJToPdrHCGKLCIhJ3J7TyQxSxCywklHiyPdVYAlhATeJJ292 soDYLAKqErM2bmUDsXkFrCV2N71igVgnL7F6wwFmEJsTKD5z03agXg6gbVYS6w6VT2DkWcDI sIpRMrWgODc9t9iowDAvtVyvODG3uDQvXS85P3cTIzCMth3W6tvBeH9J/CFGAQ5GJR5eBYGU GCHWxLLiytxDjBIczEoivBeNUmOEeFMSK6tSi/Lji0pzUosPMUpzsCiJ897OOxYpJJCeWJKa nZpakFoEk2Xi4JRqYKz9tZeBUaJH4uC6gBzjr7v9joRE/JbhjI8TeeZV/Tv+/ovTga9f7oxf WLPgnsiK9i/KMVs4/bdMVOgytvcWCDK/vmTC5u6lsn53XON+f2HJrVqY2LRh/03fLSZ7nwae FfCQ+bLTOupR4ZrT4n9/1GbPEXmwQuz8getJ1/jCnz//8tH98A0GUQ0lluKMREMt5qLiRACv 801gHwIAAA== X-CMS-MailID: 20190214093856epcas1p333b119e4b70f2c0edaf0c181e45adfb7 CMS-TYPE: 101P X-CMS-RootMailID: 20190214093856epcas1p333b119e4b70f2c0edaf0c181e45adfb7 References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Acked-by: Krzysztof Kozlowski --- 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 Thu Feb 14 09:37:47 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: 10812233 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 391C213B5 for ; Thu, 14 Feb 2019 09:56:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 231B1294E4 for ; Thu, 14 Feb 2019 09:56:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 179E3294C1; Thu, 14 Feb 2019 09:56:32 +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 DA7E4292EE for ; Thu, 14 Feb 2019 09:56:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A4127267A41; Thu, 14 Feb 2019 10:39:45 +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 CB9D2267A13; Thu, 14 Feb 2019 10:39:22 +0100 (CET) Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by alsa0.perex.cz (Postfix) with ESMTP id 13BE4267A49 for ; Thu, 14 Feb 2019 10:39:00 +0100 (CET) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20190214093859epoutp0169f682315b14b13ee26826156372b8cd~DMYPyZncL0371703717epoutp01i; Thu, 14 Feb 2019 09:38:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20190214093859epoutp0169f682315b14b13ee26826156372b8cd~DMYPyZncL0371703717epoutp01i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550137139; bh=uOOFlaZ/AaritXHNmHt5SGdfNUm7J0x01Do3VV/NLqI=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=igMd9g905ANw8x+VLm4q62GmvBCFe1qQ+RqnTjIRPMBAxNT8sde5BcxOTk0UfLkBS maA7LyRBf9OHYQRGTs6Bd6/8/cI/SqdAHkaaC6K+9Yx4G18XhZqnr1IR1xl+TAq6C7 VajrEabSP9NN6qP7pLMM8Vz8a2CYL/Mk8b9bFbjs= Received: from epsmges2p2.samsung.com (unknown [182.195.42.70]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190214093859epcas2p2b012587960bff377cd135df1d23e4db0~DMYPlGbEI1885718857epcas2p2i; Thu, 14 Feb 2019 09:38:59 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 6C.F0.04136.337356C5; Thu, 14 Feb 2019 18:38:59 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20190214093858epcas2p10993b30cf39b6c12d3fe0a4dfd20f6e8~DMYPGqP530693006930epcas2p1u; Thu, 14 Feb 2019 09:38:58 +0000 (GMT) X-AuditID: b6c32a46-2a7ff70000001028-4c-5c653733f5bc Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id DE.52.03689.237356C5; Thu, 14 Feb 2019 18:38:58 +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 <0PMW0074FTFANE00@mmp2.samsung.com>; Thu, 14 Feb 2019 18:38:58 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Thu, 14 Feb 2019 10:37:47 +0100 Message-id: <20190214093747.2414-14-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190214093747.2414-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsWy7bCmua6xeWqMweqHPBZXLh5ispj68Amb xfnzG9gtvl3pYLK4vGsOm8XhN+2sFhdXfGFyYPfY8LmJzWPnrLvsHptWdbJ59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8bBiXuYCj5zVMxf8ZS5gXErexcjJ4eEgInE5K4uti5GLg4hgR2M Eos717NAON8ZJZp3nmWEqTr2+iBUYgOjxM1fs1ghnF+MEifvzwabxSZgKNF7tA+sQ0RATOL2 nE5mkCJmgZWMElv2bWIDSQgLREnceDgXrIFFQFXi2dk3zCA2r4C1xI41P5gg1slLrN5wACzO CRSfuWk7I8ggCYEeNol5a5cCreYAclwk7h0qhaiXlni2aiPUqdUSu7Z3M0PUdzBKtFzYzgyR sJY4fPwiK4jNLMAn0XH4LzvEHF6JjjYhiBIPidYd99khPutjlOhecoJtAqPEAkaGVYxiqQXF uempxUYFRnrFibnFpXnpesn5uZsYwZGm5baDcck5n0OMAhyMSjy8FUIpMUKsiWXFlbmHGCU4 mJVEeC8apcYI8aYkVlalFuXHF5XmpBYfYpTmYFES530oPTdaSCA9sSQ1OzW1ILUIJsvEwSnV wHiTb/3N9XMumJ95XfVkx70dqXtcFnU84Otyma9QPq/Y1WW+oFHai+wlZtyxb46b77tTYv7a SGLLh4L6c7GWUben5mWxcIu9ez/l7p8rkzmu60sHTL70z2zGc+b2Yr2uzw0G90PNDZn6m4sq uANd/4hsW3Uon1nj4eoQYe/FP+Yzt4pLBvw2rVJiKc5INNRiLipOBABzkmlqsAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphluLIzCtJLcpLzFFi42I5/e+xoK6ReWqMQddRLYsrFw8xWUx9+ITN 4vz5DewW3650MFlc3jWHzeLwm3ZWi4srvjA5sHts+NzE5rFz1l12j02rOtk8+rasYvT4vEku gDWKyyYlNSezLLVI3y6BK+PgxD1MBZ85KuaveMrcwLiVvYuRk0NCwETi2OuDLF2MXBxCAusY Jb62rWCGcH4xSmzubGYFqWITMJToPdrHCGKLCIhJ3J7TCVbELLCSUeLI91VgCWGBKIkbD+eC jWURUJV4dvYNM4jNK2AtsWPNDyaIdfISqzccAItzAsVnbtoO1MsBtM1KYt2h8gmMPAsYGVYx SqYWFOem5xYbFRjlpZbrFSfmFpfmpesl5+duYgSG0bbDWv07GB8viT/EKMDBqMTDWyGUEiPE mlhWXJl7iFGCg1lJhPeiUWqMEG9KYmVValF+fFFpTmrxIUZpDhYlcV7+/GORQgLpiSWp2amp BalFMFkmDk6pBsaG4tdruO86BTJ6a0wKFvujXpIo5M6tlprUNuVfvd4MufRpkxr1wiew/z5d GMp2VmrNYtaHEpJ7tmbNky85tV89IMKqXi/tgGVV7eqXDtN+MHJEfDx+8dKCx759Yov+BsdF szJfvvlI/mL85O0+T4++ubr2HUfY4merutYz7T66dS3/yz8OD2crsRRnJBpqMRcVJwIAVChT gh8CAAA= X-CMS-MailID: 20190214093858epcas2p10993b30cf39b6c12d3fe0a4dfd20f6e8 CMS-TYPE: 102P X-CMS-RootMailID: 20190214093858epcas2p10993b30cf39b6c12d3fe0a4dfd20f6e8 References: <20190214093747.2414-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH v3 Resend 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 Acked-by: Krzysztof Kozlowski --- 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..304b3138b3ff 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