Unverified Commit 4524b1e3 authored by Brent Lu's avatar Brent Lu Committed by Mark Brown
Browse files

ASoC: Intel: sof-rt5682: get bclk frequency from topology



A different bclk frequency 3.072MHz was introduced to tgl platform and
is used in mtl topologies. Use SOF API to get frequency from topology
instead of hardcoding.

Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarBrent Lu <brent.lu@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-23-pierre-louis.bossart@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b5aaf6a5
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -317,7 +317,12 @@ static int sof_rt5682_hw_params(struct snd_pcm_substream *substream,
			return -EINVAL;
		}

		pll_in = params_rate(params) * 50;
		/* get the tplg configured bclk. */
		pll_in = sof_dai_get_bclk(rtd);
		if (pll_in <= 0) {
			dev_err(rtd->dev, "invalid bclk freq %d\n", pll_in);
			return -EINVAL;
		}
	}

	pll_out = params_rate(params) * 512;