Skip to content

Commit 4524b1e

Browse files
brentlubroonie
authored andcommitted
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: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-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: Mark Brown <broonie@kernel.org>
1 parent b5aaf6a commit 4524b1e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sound/soc/intel/boards/sof_rt5682.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,12 @@ static int sof_rt5682_hw_params(struct snd_pcm_substream *substream,
317317
return -EINVAL;
318318
}
319319

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

323328
pll_out = params_rate(params) * 512;

0 commit comments

Comments
 (0)