Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebac95a9 authored by Juergen Borleis's avatar Juergen Borleis Committed by Mark Brown
Browse files

ASoC: fsl-ssi: Fix bitclock calculation for master mode



According to the datasheet 'pm', 'psr' and 'div2' should never be all 0.
Since commit 541b03ad ("ASoC: fsl_ssi: Fix the incorrect limitation of
the bit clock rate") this can happen, because for some bitclock rates
'pm' = 0 seems to be a valid choice but does not work due to hardware
restrictions. This results into a bad hardware behaviour (slow audio for
example). Feature tested on a i.MX25.

Signed-off-by: default avatarJuergen Borleis <jbe@pengutronix.de>
Acked-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d770e558
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -633,7 +633,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
		sub *= 100000;
		do_div(sub, freq);

		if (sub < savesub) {
		if (sub < savesub && !(i == 0 && psr == 0 && div2 == 0)) {
			baudrate = tmprate;
			savesub = sub;
			pm = i;