diff options
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 2595611e8a6d..b9fabbf69db6 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c | |||
@@ -603,10 +603,6 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream, | |||
603 | factor = (div2 + 1) * (7 * psr + 1) * 2; | 603 | factor = (div2 + 1) * (7 * psr + 1) * 2; |
604 | 604 | ||
605 | for (i = 0; i < 255; i++) { | 605 | for (i = 0; i < 255; i++) { |
606 | /* The bclk rate must be smaller than 1/5 sysclk rate */ | ||
607 | if (factor * (i + 1) < 5) | ||
608 | continue; | ||
609 | |||
610 | tmprate = freq * factor * (i + 2); | 606 | tmprate = freq * factor * (i + 2); |
611 | 607 | ||
612 | if (baudclk_is_used) | 608 | if (baudclk_is_used) |
@@ -614,6 +610,13 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream, | |||
614 | else | 610 | else |
615 | clkrate = clk_round_rate(ssi_private->baudclk, tmprate); | 611 | clkrate = clk_round_rate(ssi_private->baudclk, tmprate); |
616 | 612 | ||
613 | /* | ||
614 | * Hardware limitation: The bclk rate must be | ||
615 | * never greater than 1/5 IPG clock rate | ||
616 | */ | ||
617 | if (clkrate * 5 > clk_get_rate(ssi_private->clk)) | ||
618 | continue; | ||
619 | |||
617 | clkrate /= factor; | 620 | clkrate /= factor; |
618 | afreq = clkrate / (i + 1); | 621 | afreq = clkrate / (i + 1); |
619 | 622 | ||