linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Olivier Moysan <olivier.moysan@st.com>
Cc: Mark Brown <broonie@kernel.org>,
	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: sai: fix oversampling mode" to the asoc tree
Date: Mon,  4 Mar 2019 00:05:56 +0000 (GMT)	[thread overview]
Message-ID: <20190304000556.F3B20440082@finisterre.ee.mobilebroadband> (raw)
In-Reply-To: <1551359965-25228-5-git-send-email-olivier.moysan@st.com>

The patch

   ASoC: stm32: sai: fix oversampling mode

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 71d9537fada47762a1a1b33a8a1f95a92d7edc11 Mon Sep 17 00:00:00 2001
From: Olivier Moysan <olivier.moysan@st.com>
Date: Thu, 28 Feb 2019 14:19:24 +0100
Subject: [PATCH] ASoC: stm32: sai: fix oversampling mode

Set OSR bit if mclk/fs ratio is 512.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/stm/stm32_sai_sub.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index cad415e03b5e..cb658463ccd1 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -913,7 +913,7 @@ static int stm32_sai_configure_clock(struct snd_soc_dai *cpu_dai,
 				     struct snd_pcm_hw_params *params)
 {
 	struct stm32_sai_sub_data *sai = snd_soc_dai_get_drvdata(cpu_dai);
-	int div = 0;
+	int div = 0, cr1 = 0;
 	int sai_clk_rate, mclk_ratio, den;
 	unsigned int rate = params_rate(params);
 
@@ -958,13 +958,19 @@ static int stm32_sai_configure_clock(struct snd_soc_dai *cpu_dai,
 		} else {
 			if (sai->mclk_rate) {
 				mclk_ratio = sai->mclk_rate / rate;
-				if ((mclk_ratio != 512) &&
-				    (mclk_ratio != 256)) {
+				if (mclk_ratio == 512) {
+					cr1 = SAI_XCR1_OSR;
+				} else if (mclk_ratio != 256) {
 					dev_err(cpu_dai->dev,
 						"Wrong mclk ratio %d\n",
 						mclk_ratio);
 					return -EINVAL;
 				}
+
+				regmap_update_bits(sai->regmap,
+						   STM_SAI_CR1_REGX,
+						   SAI_XCR1_OSR, cr1);
+
 				div = stm32_sai_get_clk_div(sai, sai_clk_rate,
 							    sai->mclk_rate);
 				if (div < 0)
-- 
2.20.1


  reply	other threads:[~2019-03-04  0:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 13:19 [PATCH 0/5] ASoC: stm32: sai: miscellaneous fixes Olivier Moysan
2019-02-28 13:19 ` [PATCH 1/5] ASoC: stm32: sai: fix iec958 controls indexation Olivier Moysan
2019-03-04  0:06   ` Applied "ASoC: stm32: sai: fix iec958 controls indexation" to the asoc tree Mark Brown
2019-02-28 13:19 ` [PATCH 2/5] ASoC: stm32: sai: fix exposed capabilities in spdif mode Olivier Moysan
2019-03-04  0:06   ` Applied "ASoC: stm32: sai: fix exposed capabilities in spdif mode" to the asoc tree Mark Brown
2019-02-28 13:19 ` [PATCH 3/5] ASoC: stm32: sai: fix race condition in irq handler Olivier Moysan
2019-03-04  0:05   ` Applied "ASoC: stm32: sai: fix race condition in irq handler" to the asoc tree Mark Brown
2019-02-28 13:19 ` [PATCH 4/5] ASoC: stm32: sai: fix oversampling mode Olivier Moysan
2019-03-04  0:05   ` Mark Brown [this message]
2019-02-28 13:19 ` [PATCH 5/5] ASoC: stm32: sai: fix set_sync service Olivier Moysan
2019-03-04  0:05   ` Applied "ASoC: stm32: sai: fix set_sync service" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190304000556.F3B20440082@finisterre.ee.mobilebroadband \
    --to=broonie@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=benjamin.gaignard@st.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=olivier.moysan@st.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).