Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp775132img; Tue, 26 Feb 2019 08:23:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IYTCsMaLmW2T8uX8i2Qo3nFwmZsub7bgsf9/6ZEeZcZuGzWTwH3+bTOJ3M0YCQo/tLjw8X0 X-Received: by 2002:a62:be08:: with SMTP id l8mr26560239pff.162.1551198217623; Tue, 26 Feb 2019 08:23:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551198217; cv=none; d=google.com; s=arc-20160816; b=ghpaDdCEfPOvlIr6flqcTSzK+kQgrkAn4+NeeXRlvDumAHZQUHyfIdjla+XZvP1h52 tp5PbhCixNS88CWtMHu4XIdL2nH2PeHKaDhgJrb5C7J6+IFADFt9DrOi1FCsCO51PJ+N qzr/EOFYc4l0bpVbeOZyKhiuhabxtu39MS9Jx1ab/OmlwmUuaujUcvzfVMIjG48K+iU7 IIqJsIjdG4wbsXj/jqbpOMH1yXqnqymyf3PPKADqKgpj5x4zpXGeClNw6Dy3x3ixbfFi T8tqsXZ2RCzo1c+FahydQB+Z7Nr8RpeKkOoTMf7nXFL4FMxlC2LD0M0cxqD/DZuT4d1r enwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=kacyJVHrI2bgXHeMK6B1LJPVjPr/vUqbxONyCmF568k=; b=c7edjDRVrUFNtSDOzZDI48yw7FyZpr/uGZE6P8dNL0fHXOmWPW3Ms/D5cOH3RE/A+j iQAJdvIgadYvly7NW/YTevJ9zlRbMI5D1dt/cXi9NGbZCmf3DbAZujY83/amAEU8FL2y bzSmY3FpB1OpkZQFLQM+sLTRmJXeP41ALq0b7xwgXOv92ZLKI9uNq9g/p0qFP1WpGROX Dwx0wLIj1ayXj2EDKXVVO8gtXaYkpV2k6r12BUcJ+38F0a8ywc7xEZUCA2+OvdbbFKcD OYyu7Wxw6xVT7EKb+3SGzuzso4Pr8+3snC++aSr+3VD5Qq6bEz861LYjnRMvSQ986IUT EcQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="T1x2/Wyr"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17si12989676pfh.6.2019.02.26.08.23.22; Tue, 26 Feb 2019 08:23:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="T1x2/Wyr"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728996AbfBZQWm (ORCPT + 99 others); Tue, 26 Feb 2019 11:22:42 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:36038 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727286AbfBZQWl (ORCPT ); Tue, 26 Feb 2019 11:22:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=kacyJVHrI2bgXHeMK6B1LJPVjPr/vUqbxONyCmF568k=; b=T1x2/WyrHqMb 1H3+byDTW3bVHCAnB99nTCaa8LXO5FXnPzygznHpYKv6KjD5lL1sx3QhnS6KWHOf4ibdU1TG/AW4J MrN4R8BEvdRMVUqoa2kS/3Y8ZSaHJTtUURaGW2edYzSd+yWmYJRCG8Llxw4H4ZYGPFVr2Bi6nixb1 kg3vc=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gyfV0-000099-1i; Tue, 26 Feb 2019 16:22:30 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 980C41121A0A; Tue, 26 Feb 2019 16:22:29 +0000 (GMT) From: Mark Brown To: Olivier Moysan Cc: Mark Brown , lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org, olivier.moysan@st.com, arnaud.pouliquen@st.com, benjamin.gaignard@st.com, alsa-devel@alsa-project.org Subject: Applied "ASoC: stm32: i2s: fix dma configuration" to the asoc tree In-Reply-To: <1551189070-15469-5-git-send-email-olivier.moysan@st.com> X-Patchwork-Hint: ignore Message-Id: <20190226162229.980C41121A0A@debutante.sirena.org.uk> Date: Tue, 26 Feb 2019 16:22:29 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: stm32: i2s: fix dma configuration has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 1ac2bd16448997d9ec01922423486e1e85535eda Mon Sep 17 00:00:00 2001 From: Olivier Moysan Date: Tue, 26 Feb 2019 14:51:07 +0100 Subject: [PATCH] ASoC: stm32: i2s: fix dma configuration DMA configuration is not balanced on start/stop. Move DMA configuration to trigger callback. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown --- sound/soc/stm/stm32_i2s.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c index 7f56d7b51ba3..95fffb61faa5 100644 --- a/sound/soc/stm/stm32_i2s.c +++ b/sound/soc/stm/stm32_i2s.c @@ -488,7 +488,7 @@ static int stm32_i2s_configure(struct snd_soc_dai *cpu_dai, { struct stm32_i2s_data *i2s = snd_soc_dai_get_drvdata(cpu_dai); int format = params_width(params); - u32 cfgr, cfgr_mask, cfg1, cfg1_mask; + u32 cfgr, cfgr_mask, cfg1; unsigned int fthlv; int ret; @@ -529,15 +529,11 @@ static int stm32_i2s_configure(struct snd_soc_dai *cpu_dai, if (ret < 0) return ret; - cfg1 = I2S_CFG1_RXDMAEN | I2S_CFG1_TXDMAEN; - cfg1_mask = cfg1; - fthlv = STM32_I2S_FIFO_SIZE * I2S_FIFO_TH_ONE_QUARTER / 4; - cfg1 |= I2S_CFG1_FTHVL_SET(fthlv - 1); - cfg1_mask |= I2S_CFG1_FTHVL_MASK; + cfg1 = I2S_CFG1_FTHVL_SET(fthlv - 1); return regmap_update_bits(i2s->regmap, STM32_I2S_CFG1_REG, - cfg1_mask, cfg1); + I2S_CFG1_FTHVL_MASK, cfg1); } static int stm32_i2s_startup(struct snd_pcm_substream *substream, @@ -592,6 +588,10 @@ static int stm32_i2s_trigger(struct snd_pcm_substream *substream, int cmd, /* Enable i2s */ dev_dbg(cpu_dai->dev, "start I2S\n"); + cfg1_mask = I2S_CFG1_RXDMAEN | I2S_CFG1_TXDMAEN; + regmap_update_bits(i2s->regmap, STM32_I2S_CFG1_REG, + cfg1_mask, cfg1_mask); + ret = regmap_update_bits(i2s->regmap, STM32_I2S_CR1_REG, I2S_CR1_SPE, I2S_CR1_SPE); if (ret < 0) { -- 2.20.1