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 <[email protected]> Signed-off-by: Brent Lu <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent b5aaf6a commit 4524b1e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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)