All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Yong Zhi <yong.zhi@intel.com>
Subject: [PATCH 5/6] ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freq
Date: Fri, 17 Jul 2020 16:13:36 -0500	[thread overview]
Message-ID: <20200717211337.31956-6-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20200717211337.31956-1-pierre-louis.bossart@linux.intel.com>

From: Yong Zhi <yong.zhi@intel.com>

In commit d696a61413b4 ("ASoC: rt1015: Add condition to prevent SoC
providing bclk in ratio of 50 times of sample rate."), PLL input at 50fs
is no longer supported, the new recommended settings at 48Khz rate are:

PLL input       SSP bclk
------------------------
64fs            3.073Mhz
100fs           4.8Mhz

(bclk update is reflected in topoplogy.)

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/sof_rt5682.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index cc8b0f26f724..61a61dcca82a 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -284,8 +284,15 @@ static int sof_rt1015_hw_params(struct snd_pcm_substream *substream,
 		return 0;
 
 	for_each_rtd_codec_dais(rtd, i, codec_dai) {
+		/* Set tdm/i2s1 master bclk ratio */
+		ret = snd_soc_dai_set_bclk_ratio(codec_dai, 64);
+		if (ret < 0) {
+			dev_err(card->dev, "failed to set bclk ratio\n");
+			return ret;
+		}
+
 		ret = snd_soc_dai_set_pll(codec_dai, 0, RT1015_PLL_S_BCLK,
-					  params_rate(params) * 50,
+					  params_rate(params) * 64,
 					  params_rate(params) * 256);
 		if (ret < 0) {
 			dev_err(card->dev, "failed to set pll\n");
-- 
2.25.1


  parent reply	other threads:[~2020-07-17 21:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 21:13 [PATCH 0/6] ASoC: Intel: machine driver updates for 5.9 Pierre-Louis Bossart
2020-07-17 21:13 ` [PATCH 1/6] ASoC: Intel: sof_sdw_rt711: remove hard-coded codec name Pierre-Louis Bossart
2020-07-17 21:13 ` [PATCH 2/6] ASoC: Intel: sof_sdw_rt711: remove properties in card remove Pierre-Louis Bossart
2020-07-17 21:13 ` [PATCH 3/6] ASoC: Intel: sof_sdw: add support for systems without i915 audio Pierre-Louis Bossart
2020-07-17 21:13 ` [PATCH 4/6] ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded Pierre-Louis Bossart
2020-07-17 21:13 ` Pierre-Louis Bossart [this message]
2020-07-17 21:13 ` [PATCH 6/6] ASoC: Intel: common: change match table ehl-rt5660 Pierre-Louis Bossart
2020-07-20 11:51   ` Mark Brown
2020-07-20 14:38 ` [PATCH 0/6] ASoC: Intel: machine driver updates for 5.9 Mark Brown
2020-07-20 15:32 ` 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=20200717211337.31956-6-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=yong.zhi@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.